1 2011-12-21 Pascal Obry <obry@adacore.com>
3 * prj-attr.adb, snames.ads-tmpl: Add Library_Standalone,
4 Library_Fully_Standalone_Options and
5 Library_Fully_Standalone_Supported attributes.
6 * prj-nmsc.adb (Check_Library): Update check to take into
7 account fully standalone libraries. Such shared libraries can
8 only depend on static libraries.
9 (Check_Stand_Alone_Library): Add support for fully standalone libraries.
10 (Process_Project_Level_Simple_Attributes): Store value for
11 configuration attribute Library_Fully_Standalone_Supported.
12 * prj.ads, makeutl.adb (Standalone): New enumeration type.
13 (Project_Data): Standalone_Library now of type Standlone.
14 (Project_Configuration): Add Lib_Fully_Standalone_Supported
16 (Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported
18 * clean.adb (Clean_Project): Adjust to new type for Standalone.
19 * make.adb (Library_Phase): Adjust to new type for Standalone.
21 * mlib-prj.adb (Build_Library): Adjust to new type for
24 2011-12-21 Thomas Quinot <quinot@adacore.com>
26 * gnatls.adb (Gnatls): Call Set_Standard_Error at startup, and then
27 Set_Standard_Output just before producing normal (non-diagnostic)
29 * gnatcmd.adb (Gnatcmd): Call Set_Standard_Error at initialization
30 (and again after parsing project files).
32 2011-12-21 Vincent Celier <celier@adacore.com>
34 * prj-conf.adb (Do_Autoconf): When the object directory does
35 not exist, create auto.cgpr in the directory where temporary
38 2011-12-20 Ed Schonberg <schonberg@adacore.com>
40 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Further
41 refinements on the placement of a freeze node for a package
42 instantiation, when the generic appears within a previous
43 instantiation in the same unit.If the current instance is within
44 the one that contains the generic, the freeze node for the
45 current one must appear in the current declarative part. Ditto
46 if the current instance is within another package instance. In
47 these cases the freeze node of the previous instance is is not
48 relevant. New predicate Enclosing_Body simplifies the process.
49 (Freeze_Subprogram_Body): Rename Enclosing_Body to
50 Enclosing_Package_Body, to prevent confusion with subprogram of
52 (Install_Body): Recognize enclosing subprogram bodies to determine
53 whether freeze_node belongs in current declarative list.
55 2011-12-20 Robert Dewar <dewar@adacore.com>
57 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Allow
58 attribute definition clause for renaming if generated internally
59 and generate duplicate clause to apply to renamed object.
60 (Rep_Item_Too_Late): Only diagnose source level entities
61 * prj-nmsc.adb: Minor reformatting.
62 * gcc-interface/Make-lang.in: Update dependencies.
64 2011-12-20 Bob Duff <duff@adacore.com>
66 * opt.ads (List_Inherited_Aspects): Default to False
67 (i.e. -gnatw.L is the default).
68 * usage.adb: Document new default for -gnatw.L.
69 * gnat_ugn.texi: Document -gnatw.l and -gnatw.L switches.
70 * warnsw.adb (Set_Warning_Switch): Do not include
71 List_Inherited_Aspects in -gnatwa.
73 2011-12-20 Ed Schonberg <schonberg@adacore.com>
75 * checks.adb (Apply_Type_Conversion_Checks): For a discrete type
76 with predicates, indicate unconditionally that a range check
78 * exp_ch4.adb (Expand_N_In): When the membership test is rewritten
79 to incorporate a call to a predicate function, analyze expression
80 with checks suppressed, to prevent infinite recursion.
82 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
84 * exp_ch11.adb (Find_Local_Handler): Guard the
85 search over individual exception choices in case the list of
86 handlers contains other (possibly illegal) constructs.
88 2011-12-20 Gary Dismukes <dismukes@adacore.com>
90 * sem_ch8.adb (Find_Type): Test taggedness
91 of the Available_Type when checking for an illegal use of an
92 incomplete type, when the incomplete view is a limited view of
93 a type. Remove redundant Is_Tagged test.
95 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
97 * exp_util.adb: Add with and use clause for Aspects.
98 (Is_Finalizable_Transient): Objects which denote Ada containers
99 in the context of iterators are not considered transients. Such
100 object must live for as long as the loop is around.
101 (Is_Iterated_Container): New routine.
103 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
105 * exp_imgv.adb (Expand_Width_Attribute): Add a
106 type conversion from the enumeration subtype to its base subtype.
108 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
110 * sem_ch4.adb (Operator_Check): Update the call to
112 * sem_dim.adb: Remove with and use clause for Namet.Sp. Reorganize
113 all type declarations and datastructures involved. Propagate
114 all changes involving data structures and types throughout
115 the pakage. Alphabetize all subprograms. Add ??? comments.
117 (Analyze_Aspect_Dimension): Rewritten. This
118 routine now does all its checks in one pass rather than
119 two. Refactor code. The error message are now in a more GNAT-ish style.
120 (Create_Rational_From_Expr): This is now a function.
121 (Get_Dimensions): Removed.
122 (Get_Dimensions_String_Id): Removed.
123 (Dimensions_Of): New rouitne.
124 (Exists): New routines.
125 (Is_Invalid): New routine.
126 (Permits_Dimensions): Removed.
128 (Set_Symbol): New routine.
129 (System_Of): New routine.
130 * sem_dim.ads: Rewrite the top level description of the
131 package. Alphabetize subprograms. Add various comments on
132 subprogram usage. Add ??? comments.
133 (Is_Dimensioned_Type):
134 Renamed to Has_Dimension_System.
135 * sem_res.adb (Resolve_Op_Expon): Update the call to Is_Dimensioned_Type
137 2011-12-20 Ed Schonberg <schonberg@adacore.com>
139 * sem_ch13.adb (Check_Indexing_Functions): The return type of an
140 indexing function can be the default element type, and does not
141 need to be a reference type.
142 * sem_ch4.adb (Try_Container_Indexing): Ditto.
144 2011-12-20 Robert Dewar <dewar@adacore.com>
146 * a-cdlili.ads, sem_cat.adb, sem_ch10.adb: Minor reformatting.
148 2011-12-20 Bob Duff <duff@adacore.com>
150 * s-taprop-mingw.adb (Yield): Do_Yield is no longer Unreferenced.
152 2011-12-20 Vincent Pucci <pucci@adacore.com>
154 * impunit.adb: s-dimkio, s-dimmks and s-dmotpr defined as GNAT
155 Defined Additions to System.
156 * Makefile.rtl: s-dimkio, s-dimmks and s-dmotpr added.
157 * s-dimkio.ads, s-dimmks.ads, s-dmotpr.ads: New files.
159 2011-12-20 Gary Dismukes <dismukes@adacore.com>
161 * sem_ch4.adb (Traverse_Homonyms): Allow a homonym to match when
162 within an instance, even if the homonym is marked Is_Hidden at
165 2011-12-20 Robert Dewar <dewar@adacore.com>
167 * sem_ch3.adb, sem_ch5.adb, s-diinio.adb, s-diinio.ads, sem_dim.adb,
168 sem_dim.ads, sem_res.adb, s-stposu.adb, s-stposu.ads, sem_ch4.adb,
169 s-diflio.adb, s-diflio.ads, exp_disp.adb, s-llflex.ads: Minor
171 * aspects.ads: Dimension[_Aspects] are GNAT defined.
173 2011-12-20 Robert Dewar <dewar@adacore.com>
175 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
178 2011-12-20 Thomas Quinot <quinot@adacore.com>
180 * sem_cat.adb, sem_ch10.adb (Analyze_With_Clause): For a WITH clause on
181 a child unit that is an illegal instantiation, mark the WITH clause in
183 (Install_Siblings, Validate_Categorization_Dependency): Guard
184 against WITH clause marked as in error.
186 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
188 * sem_res.adb (Resolve_Allocator): Warning on allocation
189 of tasks on a subpool and rewrite the allocator into a raise
190 Program_Error statement.
191 * s-stposu.ads, s-stposu.adb: Code reformatting.
192 (Create_Subpool): Remove formal parameter Storage_Size.
193 (Default_Subpool_For_Pool): Add the default implementation of this
195 (Set_Pool_Of_Subpool): Rename formal parameter Pool to To. Update
196 all the uses of the parameter.
198 2011-12-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
200 * gcc-interface/Makefile.in (%86 linux%):
201 (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS.
202 (LIBGNAT_TARGET_PAIRS_64): New.
203 (LIBGNAT_TARGET_PAIRS): Add either depending on multilib.
205 2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
207 * gcc-interface/decl.c (gnat_to_gnu_param): Add comment about double
208 reference and DECL_POINTS_TO_READONLY_P.
209 * gcc-interface/trans.c (Identifier_to_gnu) <by_ref>: Always set the
210 TREE_READONLY flag on the first dereference of a double dereference.
212 2011-12-15 Arnaud Charlet <charlet@adacore.com>
214 * a-numaux-vms.ads, s-asthan-vms-ia64.adb, s-auxdec-vms-ia64.adb,
215 s-memory-vms_64.adb, s-memory-vms_64.ads, s-osinte-vms-ia64.adb,
216 s-osinte-vms-ia64.ads, s-tasdeb-vms.adb: New files.
218 2011-12-15 Vincent Pucci <pucci@adacore.com>
220 * aspects.adb, aspects.ads Aspect_Dimension and
221 Aspect_Dimension_System added
222 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
224 * gcc-interface/Make-lang.in: s-llflex, sem_dim added.
225 * impunit.adb :s-diflio and s-diinio defined as GNAT Defined
227 * Makefile.rtl: s-diflio, s-diinio and s-llflex added
228 * par-prag.adb, sem_prag.adb: Pragma_Dimension removed
229 * rtsfind.ads: Expon_LLF added
230 * sem_aggr.adb (Resolve_Aggregate): handles aggregate for
231 Aspect_Dimension case
232 * sem_attr.adb (Resolve_Attribute): analyze dimension for
234 * sem_ch10.adb (Analyze_With_Clause): Avoid the warning messages
235 due to the use of a GNAT library for Dimension packages
236 * sem_ch13.adb (Analyze_Aspect_Specifications):
237 Aspect_Dimension and Aspect_Dimension_System cases added
238 (Check_Aspect_At_Freeze_Point): Aspect_Dimension and
239 Aspect_Dimension_System cases added
240 * sem_ch2.adb (Analyze_Identifier): analyze dimension for
242 * sem_ch3.adb (Analyze_Component_Declaration): analyze dimension
243 for component declaration (Analyze_Object_Declaration): analyze
244 dimension for object declaration (Analyze_Subtype_Declaration):
245 analyze dimension for subtype declaration
246 * sem_ch4.adb (Operator_Check): checks exponent is a rational
247 for dimensioned operand for a N_Op_Expon
248 * sem_ch5.adb (Analyze_Assignment): analyze dimension for
249 assignment (Analyze_Statements): removal of dimensions in all
251 * sem_ch6.adb (Analyze_Return_Statement): analyze dimension for
253 * sem_ch8.adb (Analyze_Object_Renaming): analyze dimension for
255 * sem_dim.adb, sem_dim.ads (Analyze_Aspect_Dimension):
256 analyze the expression for aspect dimension and store the
258 (Analyze_Aspect_Dimension_System): analyze
259 the expression for aspect dimension system and store the new
261 (Analyze_Dimension): propagates dimension
262 (Expand_Put_Call_With_Dimension_String): add the dimension
263 string as a suffix of the numeric value in the output
264 (Has_Dimension): return True if the node has a dimension
265 (Remove_Dimension_In_Declaration): removal of dimension in the
266 expression of the declaration.
267 (Remove_Dimension_In_Statement): removal of dimension in statement
268 * sem_res.adb (Resolve): analyze dimension if the node
269 has already been analyzed.
270 (Resolve_Arithmetic_Op): analyze
271 dimension for arithmetic op.
272 (Resolve_Call): analyze dimension for function call.
273 (Resolve_Comparison_Op): analyze dimension for comparison op.
274 (Resolve_Equality_Op): analyze dimension for equality op.
275 (Resolve_Indexed_Component): analyze dimension for indexed component.
276 (Resolve_Op_Expon): analyze dimension for op expon.
277 (Resolve_Selected_Component): analyze dimension
278 for selected component.
279 (Resolve_Slice): analyze dimension for slice.
280 (Resolve_Unary_Op): analyze dimension for unary op
281 (Resolve_Type_Conversion): analyze dimension for type conversion
282 (Resolve_Unchecked_Type_Conversion): analyze dimension for
283 unchecked type conversion
284 * snames.ads-tmpl Name_Dimension, Name_Dimension_System,
285 Name_Dim_Float_IO, Name_Dim_Integer_IO,
286 Name_Generic_Elementary_Functions, Name_Sqrt added.
287 Pragma_Dimension removed
288 * s-diflio.adb, s-diflio.ads New GNAT library generic package
289 for dimensioned float type IO
290 * s-diinio.adb, s-diinio.ads New GNAT library generic package
291 for dimensioned integer type IO
292 * s-llflex.ads (Expon_LLF): exponentiation routine for long long
293 floats operand and exponent
295 2011-12-15 Robert Dewar <dewar@adacore.com>
297 * sem_aggr.adb: Minor comment addition.
299 2011-12-15 Bob Duff <duff@adacore.com>
301 * s-tasren.adb (Task_Count): Do not call Yield; E'Count is not a
302 task dispatching point.
303 * s-taprop-mingw.adb (Yield): Do not yield if Do_Yield is False.
305 2011-12-15 Robert Dewar <dewar@adacore.com>
307 * sigtramp-ppcvxw.c, sigtramp.h: Fix header.
309 2011-12-15 Javier Miranda <miranda@adacore.com>
311 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
312 applied to a class-wide type under VM targets generate code which
313 invokes the function Get_Alignment to retrieve the value of the
314 alignment from the TSD.
315 * rtsfind.ads (RE_Get_Alignment): New entity.
317 2011-12-15 Robert Dewar <dewar@adacore.com>
319 * g-comlin.adb: Fix header.
321 2011-12-15 Tristan Gingold <gingold@adacore.com>
323 * gnatls.adb: Fix typo.
325 2011-12-15 Ed Falis <falis@adacore.com>
327 * s-tpopsp-vxworks.adb: Update comment.
329 2011-12-15 Ed Schonberg <schonberg@adacore.com>
331 * sem_aggr.adb (Resolve_Array_Aggregate, Resolve_Aggr_Expr); If
332 the component type has predicates, generate corresponding check.
333 (Resolve_Record_Aggregate, Resolve_Aggr_Expr): Ditto.
335 2011-12-13 Cesar Strauss <cestrauss@gmail.com>
336 Eric Botcazou <ebotcazou@adacore.com>
339 * types.h (Byte): Change typedef to 'unsigned char'.
340 * atree.h (struct Flag_Word): Use Byte for 'convention' field.
342 2011-12-12 Robert Dewar <dewar@adacore.com>
344 * s-taprop-mingw.adb: Minor reformatting.
346 2011-12-12 Nicolas Roche <roche@adacore.com>
348 * gcc-interface/Make-lang.in: Update dependencies.
349 Add gnattools4 target when building tools in canadian mode
351 2011-12-12 Javier Miranda <miranda@adacore.com>
353 * exp_disp.adb (Make_VM_TSD): Complete previous patch.
355 2011-12-12 Bob Duff <duff@adacore.com>
357 * s-tpobop.adb: Use named notation.
358 * g-bytswa.ads, s-taprop.ads: Minor comment fix.
360 2011-12-12 Arnaud Charlet <charlet@adacore.com>
362 * make.adb: Minor comment update.
364 2011-12-12 Robert Dewar <dewar@adacore.com>
366 * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor
369 2011-12-12 Robert Dewar <dewar@adacore.com>
371 * sem_ch6.adb, gnatls.adb: Minor reformatting.
373 2011-12-12 Ed Schonberg <schonberg@adacore.com>
375 * freeze.adb (Freeze_Entity): If a type declared in a generic
376 context has predicates, generate a freeze node for it.
377 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
378 has not been analyzed yet, entity has not been frozen, so analyze
381 2011-12-12 Javier Miranda <miranda@adacore.com>
383 * exp_disp.adb (Make_VM_TSD): Generate code to store the value of
384 'alignment in the TSD.
386 2011-12-12 Bob Duff <duff@adacore.com>
388 * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
391 2011-12-12 Hristian Kirtchev <kirtchev@adacore.com>
393 * exp_ch4.adb (Expand_N_Allocator): Update the master of an
394 anonymous access-to-controlled type to utilize the heterogeneous
395 master associated with the current unit.
397 2011-12-12 Ed Schonberg <schonberg@adacore.com>
399 * sem_ch6.adb (Analyze_Expression_Function): If the function
400 is not a completion, pre-analyze the expression now to prevent
401 spurious visibility on later entities. The body is inserted at
402 the end of the current declaration list or package to prevent
403 early freezing, but the visibility is established at the point
406 2011-12-12 Bob Duff <duff@adacore.com>
408 * sem.adb, sem.ads: Add debugging routines.
410 2011-12-12 Tristan Gingold <gingold@adacore.com>
412 * gnatls.adb: (gnatls): Also add the objects dir in search list.
414 2011-12-12 Robert Dewar <dewar@adacore.com>
416 * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
417 sem_ch13.adb: Minor reformatting.
419 2011-12-12 Gary Dismukes <dismukes@adacore.com>
421 * sem_ch7.adb (Uninstall_Declarations): Don't
422 apply check for incomplete types used as a result type for an
423 access-to-function type when compiling for Ada 2012 or later.
424 * sem_ch6.adb (Analyze_Subprogram_Declaration):
425 Specialize error message for interface subprograms that are
426 not declared abstract nor null (functions can't be declared as
427 null). Also, remove "(Ada 2005)" from message.
429 2011-12-12 Robert Dewar <dewar@adacore.com>
431 * sem_prag.adb (GNAT_Pragma): Check comes from source.
433 2011-12-12 Robert Dewar <dewar@adacore.com>
435 * gnatls.adb: Minor reformatting.
437 2011-12-12 Javier Miranda <miranda@adacore.com>
439 * a-tags.ads (Alignment): New TSD field.
440 (Max_Predef_Prims): Value lowered to 15 (or 9 in case of
441 configurable runtime) Update documentation of predefined
442 primitives since Alignment has been removed.
443 * exp_disp.ads Update documentation of slots of dispatching
445 * exp_disp.adb (Default_Prim_Op_Position): Update slot
446 values since alignment is no longer a predefined primitive.
447 (Is_Predefined_Dispatch_Operation): Remove _alignment.
448 (Is_Predefined_Internal_Operation): Remove _alignment.
449 (Make_DT): Update static test on the value stored in a-tags.ads
450 for Max_Predef_Prims; store the value of 'alignment in the TSD.
451 * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram
452 that retrieves the alignment from the TSD
453 * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation
454 of class-wide types obtain the value of alignment from the TSD.
455 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
456 applied to a class-wide type invoke Build_Get_Alignment to
457 generate code which retrieves the value of the alignment from
459 * rtsfind.ads (RE_Alignment): New Ada.Tags entity
460 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged
461 types if the value of the alignment is bigger than the Maximum
462 alignment then set the value of the alignment to the Maximum
463 alignment and report a warning.
464 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate
466 (Predefined_Primitive_Bodies): Do not generate body of _alignment.
468 2011-12-12 Gary Dismukes <dismukes@adacore.com>
470 * freeze.adb (Freeze_Expression): Allow freezing of static
471 scalar subtypes that are prefixes of an attribute, even if not
472 yet marked static. Such attributes will get marked as static
473 later in Eval_Attribute (as called from Resolve_Attribute).
474 * sem_attr.adb (Eval_Attribute): Remove wrong code that does an
475 early return for attribute prefixes that are unfrozen source-level
476 types. This code was incorrectly bypassing folding of unfrozen
477 static subtype attributes in default expressions (the executable
478 example in the now-deleted comment was in fact illegal).
480 2011-12-12 Robert Dewar <dewar@adacore.com>
482 * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
483 gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
485 2011-12-12 Tristan Gingold <gingold@adacore.com>
487 * gsocket.h: Adjust previous patch.
489 2011-12-12 Thomas Quinot <quinot@adacore.com>
491 * exp_disp.adb: Minor reformatting.
493 2011-12-12 Tristan Gingold <gingold@adacore.com>
495 * gnatls.adb (Search_RTS): New procedure.
496 (Scan_Ls_Arg): Move code that search the RTS.
497 (Gnatls): search the RTS later.
498 * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function.
500 2011-12-12 Ed Falis <falis@adacore.com>
502 * sysdep.c: Fix treatment of VxWorks task options so that run-times
503 built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK.
505 2011-12-12 Bob Duff <duff@adacore.com>
507 * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads:
508 Minor cleanup and fiddling with debug printouts.
510 2011-12-12 Vincent Celier <celier@adacore.com>
512 * prj-nmsc.adb (Get_Directories): For a non extending project,
513 always get a declared object and/or exec directory if it already
514 exists, even when there are no sources, but do not create them.
516 2011-12-12 Bob Duff <duff@adacore.com>
518 * sem_res.adb (Resolve): Deal with the case where an abstract
519 operator is called with operands of type universal_integer.
521 2011-12-12 Thomas Quinot <quinot@adacore.com>
523 * par_sco.adb: Minor fix to dominance marker referencing WHILE
526 2011-12-12 Tristan Gingold <gingold@adacore.com>
528 * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code.
530 2011-12-12 Thomas Quinot <quinot@adacore.com>
532 * par_sco.adb: Adjust dominant marker for branches of CASE
535 2011-12-12 Thomas Quinot <quinot@adacore.com>
537 * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system
538 header file prior to redefining FD_SETSIZE.
540 2011-12-12 Ed Schonberg <schonberg@adacore.com>
542 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In
543 a generic context the aspect expressions may not have been
544 preanalyzed if there was no previous freeze point, so the
545 expressions must be preanalyzed now, and there is no conformance
546 to check for visibility changes.
548 2011-12-12 Matthew Heaney <heaney@adacore.com>
550 * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use
551 subtype Index_Type'Base for Index component (Finalize): Remove
552 unnecessary access check (First, Last): Cursor return value
553 depends on iterator index value (Iterate): Use start position as
554 iterator index value (Next, Previous): Forward to corresponding
555 cursor-based operation.
556 * a-cborma.adb (Iterate): Properly initialize iterator object (with 0
559 2011-12-12 Robert Dewar <dewar@adacore.com>
561 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
563 2011-12-12 Steve Baird <baird@adacore.com>
565 * sem_ch3.adb (Check_Completion): Improve a comment.
567 2011-12-12 Tristan Gingold <gingold@adacore.com>
569 * cstand.adb: Minor comment fix.
571 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
573 * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
574 flag of elements to compute that of the constructor.
576 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
578 * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
579 on references built for parameters which aren't specifically by-ref.
581 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
583 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
584 alignment set on a renaming, assert that the renamed object is aligned
585 enough as to make it possible to honor it.
587 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
589 * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
591 2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
593 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
594 Correctly detect cygwin, which no longer has the '32' suffix, and use
595 appropriate implementations of the sockets and memory packages.
596 * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
597 setmode/_setmode for MinGW and Cygwin, respectively.
598 (__gnat_set_binary_mode [windows targets]): Use the above, and enable
599 the windows version for Cygwin as well as MinGW.
600 (__gnat_set_text_mode [windows targets]): Likewise.
601 (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
602 in addition to the MinGW version.
603 (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
604 (__gnat_get_stack_bounds): Likewise.
606 2011-12-05 Bob Duff <duff@adacore.com>
608 * sem_ch4.adb: Minor comment fix.
610 2011-12-05 Robert Dewar <dewar@adacore.com>
612 * gnat_ugn.texi: Add documentation for -gnatw.e.
614 2011-12-05 Bob Duff <duff@adacore.com>
616 * treepr.adb (pn): Print something useful for
617 Elmt_Ids. Add Write_Eol to 'when others' case, so the output
618 will be seen immediately in gdb.
620 2011-12-05 Ed Schonberg <schonberg@adacore.com>
622 * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
623 is never a main program.
625 2011-12-05 Thomas Quinot <quinot@adacore.com>
627 * par_sco.adb: Various minor adjustments to dominance markers
630 2011-12-05 Ed Schonberg <schonberg@adacore.com>
632 * sem_ch6.adb (Analyze_Expression_Function): If the function is
633 a completion, generate a body reference for its defining entity,
634 before rewriting the node as a body.
635 * sem_util.adb (Defining_Entity): Add entry for expression
638 2011-12-05 Bob Duff <duff@adacore.com>
640 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
641 to the Comes_From_Source check, to deal properly with the case
642 of indirect inheritance of "=".
644 2011-12-05 Thomas Quinot <quinot@adacore.com>
647 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
650 2011-12-05 Thomas Quinot <quinot@adacore.com>
652 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
655 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
656 Thomas Quinot <quinot@adacore.com>
658 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
659 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
660 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
661 which allows the file to be installed in adainclude.
662 * gcc-interface/Make-lang.in: Update dependencies.
664 2011-12-02 Javier Miranda <miranda@adacore.com>
666 * sem_ch3.adb (Constrain_Access): Undo previous
667 patch for this routine. Required since the RM rule 3.7.1(7/3)
668 applies to all access types.
670 2011-12-02 Bob Duff <duff@adacore.com>
672 * sem_ch6.adb: Minor comment fix.
674 2011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com>
676 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
677 for consistency with other ports.
678 * s-osinte-rtems.adb: Add body for dummy implementation of
679 pthread_rwlockattr_setkind_np().
680 * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
681 * terminals.c: Add __rtems__ conditionals to account for differences
682 in termios implementation.
684 2011-12-02 Robert Dewar <dewar@adacore.com>
686 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
687 a-cbmutr.ads: Minor reformatting.
689 2011-12-02 Hristian Kirtchev <kirtchev@adacore.com>
691 * exp_dbug.adb: Comment reformatting.
692 (Get_External_Name): Use Reset_Buffers to reset the contents of
693 Name_Buffer and Homonym_Numbers.
694 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
695 Homonym_Numbers before creating a new qualified name for a particular
697 (Reset_Buffers): New routine.
699 2011-12-02 Matthew Heaney <heaney@adacore.com>
701 * a-cbmutr.ads (No_Node): Moved declaration from body to spec
702 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
704 (Child_Iterator): Derives from Root_Iterator.
705 (Finalize): Implemented as an override operation for Root_Iterator.
706 (First): Return value depends on Subtree component.
707 (Last): Component was renamed from Parent to Subtree.
708 (Next): Checks parameter value, and uses simplified loop.
709 (Iterate): Forwards to Iterate_Subtree.
710 (Iterate_Children): Component was renamed from Parent to Subtree.
711 (Iterate_Subtree): Checks parameter value
713 2011-12-02 Robert Dewar <dewar@adacore.com>
715 * usage.adb: Add lines for -gnatw.n and -gnatw.N
716 (atomic sync info msgs).
718 2011-12-02 Steve Baird <baird@adacore.com>
720 * sem_ch3.adb (Check_Completion): An Ada 2012
721 generic formal type doesn't require a completion.
723 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
725 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
726 packed array type if it is to be set on the array type used to
729 2011-12-02 Robert Dewar <dewar@adacore.com>
731 * gnat_rm.texi: Eliminate confusing use of type name.
733 2011-12-02 Thomas Quinot <quinot@adacore.com>
735 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
736 body that acts as spec, do not create a shallow copy of the context
737 clause for the synthetized spec (instead, use the same list as
740 2011-12-02 Bob Duff <duff@adacore.com>
742 * gnat_ugn.texi: Clarify usage of -p binder switch.
744 2011-12-02 Javier Miranda <miranda@adacore.com>
746 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
747 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
748 (In_Generic_Body): Moved to sem_aux.
749 (Unit_Declaration_Node): Moved to sem_aux.
750 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
752 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
753 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
754 exp_ch13.adb: Add with-clause on Sem_Aux.
756 2011-12-02 Yannick Moy <moy@adacore.com>
758 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
759 get the name of the entity.
760 (Unique_Entity): Correct case for subprogram stubs.
762 2011-12-02 Yannick Moy <moy@adacore.com>
764 * sem_ch3.adb (Check_Initialization): Do not emit warning on
765 initialization of limited type object in Alfa mode.
767 2011-12-02 Robert Dewar <dewar@adacore.com>
769 * sinfo.ads: Minor reformatting.
770 * gnat_ugn.texi: Fix confusion in use of term "type name".
772 2011-12-02 Robert Dewar <dewar@adacore.com>
774 * sem_ch6.adb: Minor change in error message.
776 2011-12-02 Robert Dewar <dewar@adacore.com>
778 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
781 2011-12-02 Javier Miranda <miranda@adacore.com>
783 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
784 static check of the rule of general access types whose designated
785 type has discriminants.
786 * sem_util.ads, sem_util.adb
787 (Effectively_Has_Constrained_Partial_View): New subprogram.
788 (In_Generic_Body): New subprogram.
789 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
790 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
791 subprogram In_Generic_Body.
792 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
793 sem_ch4.adb: In addition, this patch replaces the occurrences of
794 Has_Constrained_Partial_View by
795 Effectively_Has_Constrained_Partial_View.
797 2011-12-02 Matthew Heaney <heaney@adacore.com>
799 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
801 (Finalize): Remove unnecessary access check.
802 (First): Forward to First_Child.
803 (Last): Forward to Last_Child.
804 (Iterate): Check preconditions for parent node parameter.
805 (Next): Forward to Next_Sibling.
806 (Previous): Forward to Previous_Sibling.
808 2011-12-02 Robert Dewar <dewar@adacore.com>
810 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
811 a-coormu.adb, a-convec.adb: Minor reformatting.
813 2011-12-02 Matthew Heaney <heaney@adacore.com>
815 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
816 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
818 (Finalize): Decrement busy counter.
819 (First, Last): Cursor return value depends on iterator node value.
820 (Iterate): Use start position as iterator node value.
821 (Next, Previous): Forward to corresponding cursor-based operation.
823 2011-12-02 Robert Dewar <dewar@adacore.com>
825 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
826 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
827 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
828 a-ciorma.adb, a-cobove.adb: Minor reformatting.
830 2011-12-01 Jakub Jelinek <jakub@redhat.com>
833 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
835 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
837 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
839 2011-11-23 Thomas Quinot <quinot@adacore.com>
841 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
842 only on platforms where this is required, as determined by
845 2011-11-23 Ed Schonberg <schonberg@adacore.com>
847 * sem_ch9.adb: No check on entry index if error on index.
849 2011-11-23 Gary Dismukes <dismukes@adacore.com>
851 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
852 return statements nested inside an extended_return_statement.
853 * gcc-interface/Make-lang.in: Update dependencies.
854 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
856 2011-11-23 Ed Schonberg <schonberg@adacore.com>
858 * freeze.adb (Freeze_All_Ent): An incomplete type is not
859 frozen by a subprogram body that does not come from source.
861 2011-11-23 Pascal Obry <obry@adacore.com>
863 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
864 the library for pseudo terminal support.
865 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
868 2011-11-23 Ed Schonberg <schonberg@adacore.com>
870 * sem_ch9.adb: No check on entry family index if generic.
872 2011-11-23 Thomas Quinot <quinot@adacore.com>
874 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
875 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
876 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
877 System.OS_Constants from shared spec of
878 System.Tasking.Primitive_Operations to the specific body variants
879 that really require this dependency.
881 2011-11-23 Ed Schonberg <schonberg@adacore.com>
883 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
884 If the declaration has aspects, analyze them so they can be
887 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
889 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
890 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
891 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
892 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
893 Add with and use clause for Ada.Finalization. Type
894 Iterator and Child_Iterator are now derived from Limited_Controlled.
895 (Finalize): New routine.
896 (Iterate): Add a renaming of counter Busy and
897 increment it. Update the return aggregate.
898 (Iterate_Children): Add a renaming of
899 counter Busy and increment it. Update the return aggregate.
900 (Iterate_Subtree): Add a renaming of counter Busy and increment
901 it. Update the return aggregate.
902 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
904 * a-cihama.ads: Type Map_Access is now a general access type.
905 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
906 associated with the tree.
907 * a-cohama.ads: Type Map_Access is now a general access type.
908 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
910 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
911 to wrap the loop as this is done at an earlier step, during
912 analysis. The declarations of the iterator and the cursor use
913 the usual Insert_Action mechanism when added into the tree.
914 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
915 Loop_Statement and replace all respective uses by N. Add local
916 constant Loc. Preanalyze the loop iterator to discover whether
917 it is a container iterator and if it is, wrap the loop in a
918 block. This ensures that any controlled temporaries produced
919 by the iteration scheme share the same lifetime of the loop.
920 (Is_Container_Iterator): New routine.
921 (Is_Wrapped_In_Block): New routine.
922 (Pre_Analyze_Range): Move spec and body to the library level.
924 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
926 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
927 that controls casing of type and subtype names.
929 2011-11-23 Yannick Moy <moy@adacore.com>
931 * sem_ch3.adb: Minor addition of comments.
933 2011-11-23 Thomas Quinot <quinot@adacore.com>
935 * prj-part.adb (Extension_Withs): New global variable,
936 contains the head of the list of WITH clauses from the EXTENDS
937 ALL projects for which virtual packages are being created.
938 (Look_For_Virtual_Projects_For): When recursing through
939 an EXTENDS ALL, add the WITH clauses of the extending
940 project to Extension_Withs. When adding a project to the
941 Virtual_Hash, record the associated Extension_Withs list.
942 (Create_Virtual_Extending_Project): Add a copy of the appropriate
943 Extension_Withs to the virtual project.
945 2011-11-23 Thomas Quinot <quinot@adacore.com>
947 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
949 2011-11-23 Thomas Quinot <quinot@adacore.com>
951 * Make-generated.in (Sdefault.Target_Name): Set to
952 $(target_noncanonical) instead of $(target) for consistency.
954 2011-11-23 Matthew Heaney <heaney@adacore.com>
956 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
957 Iterator type as limited (First, Last): Cursor return value
958 depends on iterator node value (Iterate): Use start position as
959 iterator node value (Next, Previous): Forward to corresponding
960 cursor-based operation.
962 2011-11-23 Matthew Heaney <heaney@adacore.com>
964 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
965 Renamed from Ordered_Set_Iterator_Interfaces.
966 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
967 Iterator type as limited (First, Last): Cursor return value
968 depends on iterator node value (Iterate): Use start position as
969 iterator node value (Next, Previous): Forward to corresponding
970 cursor-based operation.
971 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
972 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
973 node component (First, Next): Forward call to corresponding
974 cursor-based operation (Iterate): Representation of iterator no
975 longer has node component
977 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
979 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
980 dereference has a proper type before the side effect removal
982 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
983 where the base type of the subtype is a private itype created
984 to act as the partial view of a constrained record type. This
985 scenario manifests with equivalent class-wide types for records
986 with unknown discriminants.
988 2011-11-23 Jerome Guitton <guitton@adacore.com>
990 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
992 2011-11-23 Thomas Quinot <quinot@adacore.com>
994 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
995 reformatting/reorganization.
997 2011-11-23 Thomas Quinot <quinot@adacore.com>
999 * g-htable.ads: Remove old comments.
1001 2011-11-23 Thomas Quinot <quinot@adacore.com>
1003 * exp_imgv.adb: Minor reformatting.
1005 2011-11-23 Robert Dewar <dewar@adacore.com>
1007 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
1008 family bounds out of range.
1010 2011-11-23 Matthew Heaney <heaney@adacore.com>
1012 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
1013 type as limited, and remove node component.
1014 (First, Next): Forward call to corresponding cursor-based operation.
1015 (Iterate): Representation of iterator no longer has node component.
1017 2011-11-23 Yannick Moy <moy@adacore.com>
1019 * exp_util.adb: Revert previous change to remove side-effects in Alfa
1020 mode, which is not the correct thing to do for renamings.
1022 2011-11-23 Thomas Quinot <quinot@adacore.com>
1024 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
1025 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
1026 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
1027 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
1028 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
1029 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
1030 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
1031 s-taprop-posix.adb: Remove hard-coded clock ids;
1032 instead, generate them in System.OS_Constants.
1033 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
1034 id of the clock providing Ada.Real_Time.Monotonic_Clock.
1035 * thread.c: New file.
1036 (__gnat_pthread_condattr_setup): New function. For platforms where
1037 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
1040 2011-11-23 Yannick Moy <moy@adacore.com>
1042 * sem_ch3.adb: Restore the use of Expander_Active instead of
1043 Full_Expander_Active, so that the evaluation is forced in Alfa
1044 mode too. Otherwise, we end up with an unexpected insertion in a
1045 place where it is not supposed to happen, on default parameters
1048 2011-11-23 Thomas Quinot <quinot@adacore.com>
1050 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
1051 for Pretty_Print, for use from within gdb.
1053 2011-11-23 Ed Schonberg <schonberg@adacore.com>
1055 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
1056 and the cursor declarations in a block, so that the loop variable
1057 is local to the construct.
1059 2011-11-23 Matthew Heaney <heaney@adacore.com>
1061 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
1062 type Reversible_Iterator'Class.
1063 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
1064 Declare type as limited.
1065 (First, Last): Return value depends on iterator's start node value.
1066 (Next, Previous): Call corresponding Cursor-based operation.
1067 (Iterate): Indicate whether complete or partial iteration
1069 2011-11-23 Robert Dewar <dewar@adacore.com>
1071 * errout.adb: Minor reformattin (Finalize): Take templates into
1072 account for warning suppression.
1073 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
1074 * erroutc.adb: Minor reformatting (Finalize): Take generic
1075 templates into account for warning suppress.
1076 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
1077 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
1078 case Warnings): Provide Used parameter in call to
1079 Set_Specific_Warnings_Off (to deal with generic template case).
1081 2011-11-23 Pascal Obry <obry@adacore.com>
1083 * sem_prag.adb (Process_Convention): Better error message for
1084 stdcall convention on dispatching calls.
1086 2011-11-23 Gary Dismukes <dismukes@adacore.com>
1088 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
1090 2011-11-23 Javier Miranda <miranda@adacore.com>
1092 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
1093 implicit type conversion when the returned object is allocated
1094 in the secondary stack and the type of the returned object is
1095 an interface. Done to force generation of displacement of the
1098 2011-11-23 Pascal Obry <obry@adacore.com>
1100 * impunit.adb: Add g-exptty and g-tty units.
1102 2011-11-23 Robert Dewar <dewar@adacore.com>
1104 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
1106 2011-11-23 Robert Dewar <dewar@adacore.com>
1108 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
1111 2011-11-23 Yannick Moy <moy@adacore.com>
1113 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
1114 line of precondition/ postcondition/invariant.
1116 2011-11-23 Pascal Obry <obry@adacore.com>
1118 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
1119 terminals.c: New files.
1120 Makefile.rtl: Add these new files.
1121 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
1122 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
1123 * gcc-interface/Make-lang.in: Update dependencies.
1125 2011-11-21 Robert Dewar <dewar@adacore.com>
1127 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
1128 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
1130 2011-11-21 Thomas Quinot <quinot@adacore.com>
1132 * sinfo.ads: Minor reformatting.
1134 2011-11-21 Yannick Moy <moy@adacore.com>
1136 * exp_util.adb: Minor reformatting. Update comments.
1138 2011-11-21 Robert Dewar <dewar@adacore.com>
1140 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
1141 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
1142 sem_ch6.adb: Minor reformatting.
1144 2011-11-21 Arnaud Charlet <charlet@adacore.com>
1146 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
1147 Unrestricted_Access to deal with fact that we properly detect the
1148 error if Access is used.
1149 * gcc-interface/Make-lang.in: Update dependencies.
1151 2011-11-21 Yannick Moy <moy@adacore.com>
1153 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
1155 * sem_res.adb (Resolve_Short_Circuit): Place error on first
1156 character of expression.
1158 2011-11-21 Yannick Moy <moy@adacore.com>
1160 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
1162 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1164 * exp_attr.adb (Expand_N_Attribute_Reference, case
1165 Max_Size_In_Storage_Elements): Account for the size of the
1166 hidden list header which precedes controlled objects allocated
1168 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
1170 * sinfo.adb (Header_Size_Added): New routine.
1171 (Set_Header_Size_Added): New routine.
1172 * sinfo.ads: Add flag Controlled_Header_Added along with
1174 (Header_Size_Added): New inlined routine.
1175 (Set_Header_Size_Added): New inlined routine.
1176 * s-stposu.adb (Allocate_Any_Controlled): Use
1177 Header_Size_With_Padding to calculate the proper
1179 (Deallocate_Any_Controlled): Use
1180 Header_Size_With_Padding to calculate the proper size
1181 of the header. (Header_Size_With_Padding): New routine.
1182 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
1183 * s-stposu.ads (Header_Size_With_Padding): New routine.
1185 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1187 * aspects.adb: Aspect specifications are allowed on renaming
1189 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
1190 subprogram renaming declaration
1192 2011-11-21 Tristan Gingold <gingold@adacore.com>
1194 * env.c: Remove unused declaration.
1196 2011-11-21 Pascal Obry <obry@adacore.com>
1198 * s-os_lib.ads: Minor style fix.
1200 2011-11-21 Pascal Obry <obry@adacore.com>
1202 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
1203 identical, do nothing on Windows XP.
1205 2011-11-21 Yannick Moy <moy@adacore.com>
1207 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1208 Use Full_Expander_Active instead of Expander_Active to control
1209 the forced evaluation of expressions for the sake of generating
1212 2011-11-21 Thomas Quinot <quinot@adacore.com>
1214 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
1216 2011-11-21 Tristan Gingold <gingold@adacore.com>
1218 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
1219 mode_read_binary, mode_write_binary, mode_append_binary,
1220 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
1221 mode_read_binary_plus, mode_write_binary_plus,
1222 mode_append_binary_plus): Remove unused declarations.
1224 2011-11-21 Yannick Moy <moy@adacore.com>
1226 * gnat_rm.texi: Minor rewording.
1228 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1230 * exp_imgv.adb (Expand_Width_Attribute): Emit
1231 an error message rather than a warning when pragma Discard_Names
1232 prevents the computation of 'Width. Do not emit an error through
1235 2011-11-21 Javier Miranda <miranda@adacore.com>
1237 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
1238 implicit type conversion when the type of the allocator is an
1239 interface. Done to force generation of displacement of the "this"
1240 pointer when required.
1242 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1244 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
1245 functions, and is set when the expression is a completion of a
1246 previous declaration.
1247 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
1248 whether an expression function completes a previous declaration,
1249 use Find_Corresponding_Spec, as when analyzing a subprogram body.
1251 2011-11-21 Steve Baird <baird@adacore.com>
1253 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
1254 (Type_Access_Level): Improve comment.
1256 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
1258 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
1259 means of -iquote unconditionally.
1261 2011-11-21 Robert Dewar <dewar@adacore.com>
1263 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1266 2011-11-21 Arnaud Charlet <charlet@adacore.com>
1268 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
1269 to deal with fact that we properly detect the error if Access
1272 2011-11-21 Steve Baird <baird@adacore.com>
1274 * sem_util.ads: Update comment describing function
1275 Deepest_Access_Level.
1276 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
1277 generic formal type.
1278 (Type_Access_Level): Return library level
1279 for a generic formal type.
1280 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
1281 calls with calls to Deepest_Type_Access_Level.
1282 * sem_ch3.adb (Analyze_Component_Declaration): replace a
1283 Type_Access_Level call with a call to Deepest_Type_Access_Level.
1284 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
1285 Replace three Type_Access_Level calls with calls to
1286 Deepest_Type_Access_Level.
1287 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
1288 Deepest_Type_Access_Level.
1289 (Valid_Conversion.Valid_Array_Conversion): Replace a
1290 Type_Access_Level call with a call to Deepest_Type_Access_Level.
1292 2011-11-21 Robert Dewar <dewar@adacore.com>
1294 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
1296 2011-11-21 Robert Dewar <dewar@adacore.com>
1298 * sinput.ads: Minor comment fix.
1300 2011-11-21 Robert Dewar <dewar@adacore.com>
1302 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
1303 Last_Bit, Position): Handle 2005 case.
1305 2011-11-21 Robert Dewar <dewar@adacore.com>
1307 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
1308 to deal with fact that we properly detect the error if Access
1310 (Increment): Same fix.
1311 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
1312 to deal with fact that we properly detect the error if Access
1314 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
1315 volatile if the B component is volatile. This affects the check
1316 for passing such a by reference volatile actual to a non-volatile
1317 formal (which should be illegal)
1319 2011-11-21 Robert Dewar <dewar@adacore.com>
1321 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
1322 size and alignment for foreign convention enumeration types.
1323 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
1326 2011-11-21 Yannick Moy <moy@adacore.com>
1328 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
1329 Apply_Discriminant_Check, Apply_Divide_Check,
1330 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
1331 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
1332 Selected_Range_Checks): Replace reference to Expander_Active
1333 with reference to Full_Expander_Active, so that expansion of
1334 checks is not performed in Alfa mode
1336 2011-11-21 Tristan Gingold <gingold@adacore.com>
1338 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
1339 fact that we properly detect the error if Access is used.
1341 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1343 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
1345 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1347 * exp_imgv.adb: Add with and use clause for Errout.
1348 (Expand_Width_Attribute): Emit a warning when in
1349 configurable run-time mode to provide a better diagnostic message.
1351 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1353 * s-finmas.adb (Finalize): Add comment concerning double finalization.
1355 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1357 * sem_ch3.adb (Access_Definition): If the access definition
1358 is itself the return type of an access to function definition
1359 which is ultimately the return type of an access to subprogram
1360 declaration, its scope is the enclosing scope of the ultimate
1361 access to subprogram.
1363 2011-11-21 Steve Baird <baird@adacore.com>
1365 * sem_res.adb (Valid_Conversion): If a conversion was legal
1366 in the body of a generic, then the corresponding conversion is
1367 legal in the expanded body of an instance of the generic.
1369 2011-11-21 Robert Dewar <dewar@adacore.com>
1371 * sem_ch3.adb: Minor reformatting.
1373 2011-11-21 Robert Dewar <dewar@adacore.com>
1375 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
1377 * sinput.ads: Add section on Handling of Source Line Terminators.
1378 * types.ads (Line_Terminator): Adjust comments.
1380 2011-11-21 Robert Dewar <dewar@adacore.com>
1382 * frontend.adb (Frontend): Capture restrictions from config files
1383 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
1385 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
1386 references. This was noticed during debugging, but it is not
1387 known if it causes real bugs.
1388 * restrict.ads, restrict.adb: New routines to save/set/restore
1389 non-partition-wide restrictions.
1390 * s-rident.ads: Comment changes for new handling of
1392 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
1393 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
1394 attempt to save/restore non-partition-wide restrictions (now
1395 this work is all done in Sem).
1396 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1397 Special handling for restriction No_Elaboration_Code.
1399 2011-11-21 Robert Dewar <dewar@adacore.com>
1401 * gnat_ugn.texi: Document new handling of restrictions pragmas.
1403 2011-11-21 Pascal Obry <obry@adacore.com>
1405 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
1406 attribute as not needed.
1408 2011-11-21 Robert Dewar <dewar@adacore.com>
1410 * sem_prag.adb: Minor reformatting.
1412 2011-11-21 Pascal Obry <obry@adacore.com>
1414 * gnat_rm.texi: Document restriction for stdcall convention on
1417 2011-11-21 Pascal Obry <obry@adacore.com>
1419 * sem_prag.adb (Process_Convention): A dispatching call cannot
1420 have a stdcall calling convention.
1422 2011-11-21 Pascal Obry <obry@adacore.com>
1424 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
1425 mutex attribute as not needed.
1426 (Initialize_TCB): Likewise.
1427 (Initialize): Likewise.
1429 2011-11-21 Robert Dewar <dewar@adacore.com>
1431 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
1432 (Process_PPCs): Invariants only apply to public subprograms.
1434 2011-11-21 Robert Dewar <dewar@adacore.com>
1436 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
1437 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
1439 2011-11-21 Robert Dewar <dewar@adacore.com>
1441 * a-finali.ads: Use pragma Pure_12 for this unit
1442 * aspects.adb: Add aspect Pure_12
1443 * aspects.ads: Add aspect Pure_12
1444 * opt.ads: Add note on Pure_12
1445 * par-prag.adb: Add dummy entry for Pure_12
1446 * sem_prag.adb: Implement Pure_12 pragma
1447 * snames.ads-tmpl: Add Entry for Pure_12
1449 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
1451 * vms_data.ads: Add qualifiers for new gnatpp options
1452 '--call_threshold' and '--par_threshold".
1453 * gnat_ugn.texi: Add description for new gnatpp options
1454 '--call_threshold' and '--par_threshold".
1456 2011-11-21 Robert Dewar <dewar@adacore.com>
1458 * lib.ads: Minor reformatting.
1460 2011-11-21 Robert Dewar <dewar@adacore.com>
1462 * lib-load.ads: Add comment.
1464 2011-11-21 Gary Dismukes <dismukes@adacore.com>
1466 * sem_elab.adb: Minor reformatting
1468 2011-11-21 Robert Dewar <dewar@adacore.com>
1470 * exp_ch6.adb: Minor reformatting.
1472 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1474 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
1475 subprogram of the formal package is covered by an others
1476 association with a box initialization, no check is needed
1477 against the actual in the instantiation of the formal package.
1479 2011-11-21 Robert Dewar <dewar@adacore.com>
1481 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
1482 elab warning from within precondition/postcondition etc.
1484 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1486 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
1487 with out parameters may generate assignments to force constraint
1488 checks. These checks must be properly placed in the code after the
1489 declaration or statement that contains the call.
1491 2011-11-21 Fedor Rybin <frybin@adacore.com>
1493 * gnat_ugn.texi: Adding info on current gnattest limitations an
1494 support of -X option.
1496 2011-11-21 Robert Dewar <dewar@adacore.com>
1498 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
1500 2011-11-20 Robert Dewar <dewar@adacore.com>
1502 * exp_ch6.adb, exp_util.adb: Minor reformatting
1504 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1506 * sinfo.ads (Reference): Document that it is OK to set
1507 Is_Known_Non_Null on a temporary initialized to a N_Reference
1510 2011-11-20 Matthew Heaney <heaney@adacore.com>
1512 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
1515 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1517 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
1518 Declare NEW_EXPR local variable and attach the
1519 temporary to it. Set Is_Known_Non_Null on the temporary.
1520 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
1521 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
1522 the temporary created to hold the 'Reference of the expression,
1524 * checks.adb (Install_Null_Excluding_Check): Bail out for the
1525 Get_Current_Excep.all.all idiom generated by the expander.
1527 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1529 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
1530 (f_gnat_ret): New macro.
1531 (struct nrv_data): Add GNAT_RET.
1532 (finalize_nrv_unc_r): New helper function.
1533 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
1534 function returns unconstrained, use finalize_nrv_unc_r as callback.
1535 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
1536 RET_OBJ is non-null.
1537 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
1538 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
1539 if optimization is enabled, record candidates for the Named Return
1542 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1544 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
1545 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
1546 test. Tweak default case.
1547 <N_Goto_Statement>: Use better formatting.
1548 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
1549 MODIFY_EXPR to initialize the storage.
1550 (build_allocator): Likewise.
1552 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1554 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
1555 call to components_to_record.
1556 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
1557 part, reuse enclosing union even if there is a representation clause
1558 on the Unchecked_Union. If there is a variant part, compute the new
1559 first free position, if any. Adjust call to self. Use a single field
1560 directly only if it hasn't got a representation clause or is placed at
1561 offset zero. Create the variant part at offset 0 if all the fields
1562 down to this level have a rep clause. Do not chain the variant part
1563 immediately and adjust downstream.
1564 Do not test ALL_REP before moving the fields without rep clause to the
1565 previous level. Call create_rep_part to create the REP part and force
1566 a minimum size on it if necessary. Do not chain it immediately.
1567 Create a fake REP part if there are fields without rep clause that need
1568 to be laid out starting from FIRST_FREE_POS.
1569 At the end, chain the REP part and then the variant part.
1570 (create_rep_part): New function.
1571 (get_rep_part): Minor tweak.
1572 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1574 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
1577 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1578 bug filed as radar #10302855 from __gnat_error_handler to...
1579 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
1580 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1582 2011-11-18 Tristan Gingold <gingold@adacore.com>
1583 Iain Sandoe <iains@gcc.gnu.org>
1586 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1587 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1589 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
1591 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1593 (OSCONS_CPP, OSCONS_EXTRACT): New.
1594 (./bldtools/oscons/xoscons): New target.
1595 ($(RTSDIR)/s-oscons.ads): Likewise.
1596 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1597 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1598 * Make-generated.in: Remove machinery to generate xoscons and
1601 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
1603 * fe.h (Serious_Errors_Detected): New macro.
1604 * gcc-interface/gigi.h (build_atomic_load): Declare.
1605 (build_atomic_store): Likewise.
1606 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1607 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
1608 Build an atomic load for an In or In Out parameter if needed.
1609 Build an atomic store for the assignment of an Out parameter if needed.
1610 Build an atomic store to the target if ATOMIC_SYNC is true.
1611 (present_in_lhs_or_actual_p): New predicate.
1612 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1613 <N_Explicit_Dereference>: Likewise.
1614 <N_Indexed_Component>: Likewise.
1615 <N_Selected_Component>: Likewise.
1616 <N_Assignment_Statement>: Adjust call to call_to_gnu.
1617 Build an atomic store to the LHS if needed.
1618 <N_Function_Call>: Adjust call to call_to_gnu.
1619 * gcc-interface/utils2.c: Include toplev.h.
1620 (resolve_atomic_size): New static function.
1621 (build_atomic_load): New function.
1622 (build_atomic_store): Likewise.
1623 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1625 2011-11-07 Olivier Hainque <hainque@adacore.com>
1627 * sigtramp-ppcvxw.c: Add general comments.
1628 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1629 rules for r2 to r13, plus CTR and XER.
1630 (CFA_REG): New, register number used to hold the local CFA.
1631 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1632 Make that 15, not 14, with documentation.
1633 (TCR): Undef before definition, preventing conflict with reg number in
1636 2011-11-07 Robert Dewar <dewar@adacore.com>
1638 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1639 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1640 * gcc-interface/Make-lang.in: Update dependencies.
1642 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1644 * exp_ch6.adb: A tagged type is a legal actual for an aliased
1647 2011-11-07 Pascal Obry <obry@adacore.com>
1649 * g-socket.adb, g-socket.ads: Minor reformatting.
1651 2011-11-07 Robert Dewar <dewar@adacore.com>
1653 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1655 2011-11-07 Robert Dewar <dewar@adacore.com>
1657 * gnat_ugn.texi: Add discussion of default mode handling of
1658 source representation with no -gnatW option given, in particular
1659 noting that NEL (next line) is not recognized in this context.
1661 2011-11-07 Yannick Moy <moy@adacore.com>
1663 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1664 generate a reference for a modification even when the modification
1665 does not come from source.
1667 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1669 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1670 use the indexing attributes rather than the Element function,
1671 to obtain variable references.
1672 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1673 Find_Aspect rather than iterating over representation
1674 items. Improve error message.
1675 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1676 of Reference functions.
1678 2011-11-07 Yannick Moy <moy@adacore.com>
1680 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1681 body that has a corresponding parameter on the subprogram
1682 declaration, define the unique entity as being the declaration
1685 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1687 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1688 return type of a function is the class-wide type of an incomplete
1689 type T, T can be a Taft-amendment type and does not have to be
1690 completed in the current private part.
1692 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1694 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1695 that are inherited by default, and apply to the class-wide type
1697 * aspects.adb (Find_Aspect): If the entity is class-wide and the
1698 aspect is inherited, use the aspect of the specific type.
1700 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
1702 * exp_alfa.adb: Remove with and use clause for
1703 Exp_Ch8. Add with and use clause for Exp_Util.
1704 Remove local constant Disable_Processing_Of_Renamings.
1705 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1706 object renamings has been reenabled.
1707 (Expand_Possible_Renaming):
1708 The expansion of identifier and expanded names has been
1709 reenabled. Perform the substitutions only for entities that
1711 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1712 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1713 (Remove_Side_Effects): Alphabetize local variables. Add a guard
1714 to avoid the infinite expansion of an expression in Alfa mode. Add
1715 processing for function calls in Alfa mode.
1716 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1718 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1720 * freeze.adb (Freeze_Entity): If the entity is an access to
1721 subprogram whose designated type is itself a subprogram type,
1722 its own return type must be decorated with size information.
1724 2011-11-04 Arnaud Charlet <charlet@adacore.com>
1726 * gcc-interface/Make-lang.in: Update dependencies.
1728 2011-11-04 Robert Dewar <dewar@adacore.com>
1730 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1731 Avoid junk semicolon after argument of machine code Asm operand.
1733 2011-11-04 Robert Dewar <dewar@adacore.com>
1735 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1736 CodePeer mode or if restriction No_Exception_Handlers is present.
1737 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1738 nodes in CodePeer mode or if restriction No_Exception_Handlers
1741 2011-11-04 Robert Dewar <dewar@adacore.com>
1743 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1745 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1747 * sem_ch6.adb (Analyze_Subprogram_Specification): The
1748 specification is legal if it is a function that returns an
1749 abstract type, if it comes from an attribute renaming of a stream
1750 attribute of an abstract type.
1752 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1754 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1755 components, check whether recursively check whether the prefix
1756 denotes an unaligned object.
1758 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1760 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1761 the pragma is legal if it is an expanded name that denotes a
1762 procedure that be can called without parameters.
1764 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1766 * gnat_ugn.texi (Performance Considerations) <Vectorization
1767 of loops>: New sub-section. <Other Optimization Switches>:
1770 2011-11-04 Robert Dewar <dewar@adacore.com>
1772 * gnat_rm.texi: Minor reformatting.
1774 2011-11-04 Matthew Heaney <heaney@adacore.com>
1776 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1777 when Target and Source denote same non-empty object
1778 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1780 2011-11-04 Robert Dewar <dewar@adacore.com>
1782 * exp_attr.adb: Minor reformatting.
1784 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1786 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1787 discriminant assignment within an initialization proc if the
1788 record is an unchecked union, as it can only come from the
1789 initialization of an unchecked union component.
1791 2011-11-04 Robert Dewar <dewar@adacore.com>
1793 * gnat_ugn.texi: Minor reformatting.
1795 2011-11-04 Robert Dewar <dewar@adacore.com>
1797 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1800 2011-11-04 Robert Dewar <dewar@adacore.com>
1802 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1805 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1807 * exp_alfa.adb: Add local constant
1808 Disable_Processing_Of_Renamings;
1809 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1810 the name evaluation of object renamings for now.
1811 (Expand_Potential_Renaming): Do not perform the substitution
1813 * exp_util.adb (Remove_Side_Effects): Remove processing for
1814 functions with side effects in Alfa mode.
1816 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1818 * bindgen.adb (Gen_Elab_Calls): In the case
1819 of the AAMP target, set elaboration entities to 1 rather than
1822 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1824 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1825 proper entities on the ancestors of a child unit that appear
1826 in a limited_with clause, follow the unit links because the
1827 units are not analyzed and scope information is incomplete.
1829 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1831 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1832 setting the Atomic_Sync_Required flag to detect one more case.
1833 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1834 setting the Atomic_Sync_Required flag to exclude more cases,
1835 depending on the parent of the node to be examined.
1837 2011-11-04 Bob Duff <duff@adacore.com>
1839 * g-excact.adb: Minor: use named notation.
1841 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1843 * sem_ch5.adb: Improve error messages for illegal iterators.
1845 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1847 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1849 (Expand_Alfa): Alphabetize cases on first choice. Add
1850 processing for object renaming declarations, identifiers and
1852 (Expand_Alfa_N_In): Remove useless return.
1853 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1854 (Expand_Potential_Renaming): New routine.
1855 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1856 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1857 Evaluate_Name out to the top level.
1858 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1859 * exp_util.adb (Remove_Side_Effects): Add processing for
1860 functions with side effects in Alfa mode.
1862 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1864 * gnat_rm.texi: Add entries for
1865 restrictions No_Relative_Delay, No_Requeue_Statements and
1866 No_Stream_Optimizations.
1868 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1870 * sem_ch4.adb: Set type of entity in prefixed call, for
1871 completeness in a generic context.
1873 2011-11-04 Yannick Moy <moy@adacore.com>
1875 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1877 2011-11-04 Robert Dewar <dewar@adacore.com>
1879 * atree.ads: Minor reformatting.
1881 2011-11-04 Robert Dewar <dewar@adacore.com>
1883 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1885 * exp_ch2.adb (Expand_Entity_Reference): Use
1886 Activate_Atomic_Synchronization
1887 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1888 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1889 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1890 Use Activate_Atomic_Synchronization
1891 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1893 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1894 N_Selected_Component node
1896 2011-11-04 Robert Dewar <dewar@adacore.com>
1898 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1900 2011-11-04 Yannick Moy <moy@adacore.com>
1902 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1903 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1904 In ASIS mode, no splitting of aspects between conjuncts.
1905 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1906 expressions refer to the original aspect expressions through
1907 the Original_Node link. This is used in semantic analysis for
1908 ASIS mode, so that the original expression also gets analyzed.
1909 * sem_prag.adb (Preanalyze_TC_Args,
1910 Check_Precondition_Postcondition,
1911 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1912 generated from a source aspect, also analyze the original aspect
1914 (Check_Expr_Is_Static_Expression): New procedure
1915 similar to existing procedure Check_Arg_Is_Static_Expression,
1916 except called on expression inside pragma.
1918 2011-11-04 Tristan Gingold <gingold@adacore.com>
1920 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1921 Find_Project.Try_Path_Name.
1922 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1924 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1926 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1928 2011-11-04 Pascal Obry <obry@adacore.com>
1930 * projects.texi: Add short description for qualifiers aggregate
1931 and aggregate library.
1933 2011-11-04 Matthew Heaney <heaney@adacore.com>
1935 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1936 * a-cgaaso.adb: Replaced implementation with instantiation
1938 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1939 Ada.Containers.Generic_Sort
1941 2011-11-04 Robert Dewar <dewar@adacore.com>
1943 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1944 Atomic_Sync_Required for the case of a prefix of an attribute.
1945 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1946 atomic synchronization
1947 (Expand_N_Indexed_Component): Ditto.
1948 (Expand_B_Selected_Component): Ditto.
1949 * sem_prag.adb (Process_Suppress_Unsuppress):
1950 Disable/Enable_Atomic_Synchronization can now occur for array
1951 types with pragma Atomic_Components.
1952 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1953 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1955 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1957 * gnat_ugn.texi: Editorial corrections for gnattest section.
1959 2011-11-04 Robert Dewar <dewar@adacore.com>
1961 * sem_prag.adb: Minor reformatting.
1962 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1964 * exp_ch2.adb (Expand_Entity_Reference): Only set
1965 Atomic_Sync_Required on entities that are variables. Doesn't
1966 make any sense on anything else.
1968 2011-11-04 Robert Dewar <dewar@adacore.com>
1970 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1971 atomic sync to type case.
1972 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1975 2011-11-04 Robert Dewar <dewar@adacore.com>
1977 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1979 * gcc-interface/Make-lang.in: Update dependencies.
1981 2011-11-04 Robert Dewar <dewar@adacore.com>
1983 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1986 2011-11-04 Matthew Heaney <heaney@adacore.com>
1988 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1989 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1990 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1991 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1992 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1993 a-sulcin.ad[sb]: New files.
1995 2011-11-04 Geert Bosch <bosch@adacore.com>
1997 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1998 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1999 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
2000 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
2001 * gcc-interface/Makefile.in: Remove libgnala and related objects.
2003 2011-11-04 Matthew Heaney <heaney@adacore.com>
2005 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
2006 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
2007 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
2008 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
2011 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
2013 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
2014 that the type of the parameters isn't dummy in type_annotate_only mode.
2016 2011-11-04 Robert Dewar <dewar@adacore.com>
2018 * sem_ch12.adb: Minor reformatting
2020 2011-11-04 Gary Dismukes <dismukes@adacore.com>
2022 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
2023 initialize elaboration entities to zero when specs are processed.
2025 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
2026 Eric Botcazou <ebotcazou@adacore.com>
2029 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
2030 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
2032 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
2035 * gcc-interface/Makefile.in (SYMDEPS): Delete.
2036 (LIBICONV): New variable.
2037 (LIBICONV_DEP): Likewise.
2038 (LIBS): Add $(LIBICONV).
2039 (LIBDEPS): Add $(LIBICONV_DEP).
2040 (EXTRA_GNATTOOLS_OBJS): Merge into...
2041 (TOOLS_LIBS): ...this. Add $(LIBICONV).
2043 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
2045 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
2046 variable. Always create the elaboration variable, if any, as constant.
2048 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
2050 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
2051 make a packable type for fields of union types as well.
2052 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
2053 (gnat_to_gnu_component_type): Try to make a packable type for fields
2054 of union types as well.
2055 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
2056 (maybe_pad_type): Try to make a packable type for fields of union types
2058 (gnat_to_gnu_field): Likewise.
2059 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
2060 (set_rm_size): Likewise.
2061 (rm_size): Likewise.
2062 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
2063 * gcc-interface/trans.c (add_decl_expr): Likewise.
2064 * gcc-interface/utils.c (finish_record_type): Likewise.
2065 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
2067 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
2069 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
2070 declared as atomic. Move around conditionally executed code.
2072 2011-10-24 Robert Dewar <dewar@adacore.com>
2074 * sem.adb (Initialize): Fix bug that blew up if called a second time.
2076 2011-10-24 Robert Dewar <dewar@adacore.com>
2078 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
2079 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
2081 2011-10-24 Robert Dewar <dewar@adacore.com>
2083 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
2086 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2088 * gnat_rm.texi: Add an entry for restriction No_Finalization.
2090 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2092 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
2093 current instance is within the one that contains the generic,
2094 the freeze node for the current one must appear in the current
2095 declarative part. Ditto if the current instance is within another
2096 package instance. In both of these cases the freeze node of the
2097 previous instance is not relevant.
2099 2011-10-24 Gary Dismukes <dismukes@adacore.com>
2101 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
2102 of AAMP-specific switches -univ and -aamp_target.
2104 2011-10-24 Robert Dewar <dewar@adacore.com>
2106 * a-tienau.adb (Put): Deal properly with limited line length.
2108 2011-10-24 Robert Dewar <dewar@adacore.com>
2110 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
2112 2011-10-24 Tristan Gingold <gingold@adacore.com>
2114 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
2117 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2119 * sem_ch12.adb (Earlier): make available globally. If both
2120 nodes have the same sloc, the freeze node that does not come
2121 from source is the later one.
2122 (True_Parent): Make available globally.
2123 (Previous_Instance): Subsidiary of
2124 Insert_Freeze_Node_For_Instance, to check whether the generic
2125 parent of the current instance is declared within a previous
2126 instance in the same unit or declarative part, in which case the
2127 freeze nodes of both instances must appear in order to prevent
2128 elaboration problems in gigi.
2129 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
2130 freeze point, and the freeze node of a preceding instantiation
2131 must be inserted before it.
2133 2011-10-24 Robert Dewar <dewar@adacore.com>
2135 * checks.ads, checks.adb: Add handling of Synchronization_Check
2136 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
2138 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
2139 flag Minor code reorganization.
2140 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
2141 * par-prag.adb: Add dummy entries for pragma
2142 Disable/Enable_Atomic_Synchronization.
2143 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
2144 case of Atomic_Synchronization specially (not suppressed
2145 by All_Checks, cannot be set from Source).
2146 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
2147 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
2148 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
2149 entry for pragma Disable/Enable_Atomic_Synchronization
2150 * switch-c.adb: The -gnatp switch does not disable
2151 Atomic_Synchronization Add -gnatep switch to disable
2152 Atomic_Synchronization.
2153 * types.ads: Add entry for Synchronization_Check
2154 * usage.adb: Add line for -gnated switch
2155 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
2157 2011-10-24 Geert Bosch <bosch@adacore.com>
2159 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
2162 2011-10-24 Robert Dewar <dewar@adacore.com>
2164 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
2166 2011-10-24 Robert Dewar <dewar@adacore.com>
2168 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
2169 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
2171 2011-10-24 Emmanuel Briot <briot@adacore.com>
2173 * prj-proc.adb (Process_Expression_Variable_Decl): No special
2174 handling for Project_Path unless it is an attribute.
2176 2011-10-24 Javier Miranda <miranda@adacore.com>
2178 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
2179 (Install_Hidden_Primitives): New subprogram.
2180 (Restore_Hidden_Primitives): New subprogram.
2181 (Analyze_Formal_Package_Declaration,
2182 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
2183 Invoke Check_Hidden_Primitives after every call to
2184 Analyze_Associations, and invoke Restore_Hidden_Primitives to
2185 restore their visibility after processing the instantiation.
2186 (Instantiate_Package_Body): Install visible primitives before
2187 analyzing the instantiation and uninstall them to restore their
2188 visibility when the instantiation has been analyzed.
2189 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
2190 (Remove_Suffix): New subprogram
2191 * sem_ch3.adb (Derive_Subprogram): When handling
2192 a derived subprogram for the instantiation of a formal derived
2193 tagged type, inherit the dispatching attributes from the actual
2194 subprogram (not from the parent type).
2196 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
2198 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
2200 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2202 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
2204 (Build_Discriminant_Assignments): Add local variable D_Loc and update
2206 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
2207 Var_Loc and update their uses.
2208 (Build_Record_Init_Proc): Code reformatting.
2209 (Increment_Counter): Add formal parameter Loc.
2210 (Make_Counter): Add formal parameter Loc.
2212 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
2214 * sem_disp.adb (Covers_Some_Interface): Fix typo.
2216 2011-10-24 Matthew Heaney <heaney@adacore.com>
2218 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
2221 2011-10-24 Yannick Moy <moy@adacore.com>
2223 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
2224 Translate arguments in positional notation into pragma argument
2225 association arguments for the generated pragma.
2227 2011-10-24 Arnaud Charlet <charlet@adacore.com>
2229 * exp_ch5.adb: Fix minor typo.
2231 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2233 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
2234 the case of a component reference in an instance body, when the
2235 enclosing type is private.
2237 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
2239 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
2240 driver for getting the project support into gnatelim section.
2242 2011-10-24 Robert Dewar <dewar@adacore.com>
2244 * gnat_rm.texi: Minor correction to documentation on address clause.
2246 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2248 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
2249 (Attach_Unprotected): New routine.
2250 (Delete_Finalize_Address): Removed.
2251 (Delete_Finalize_Address_Unprotected): New routine.
2252 (Detach): Synchronize and call the unprotected version.
2253 (Detach_Unprotected): Remove locking.
2254 (Finalize): Add various comment on synchronization. Lock the critical
2255 region and call the unprotected versions of routines.
2256 (Finalize_Address): Removed.
2257 (Finalize_Address_Unprotected): New routine.
2258 (Set_Finalize_Address): Synchronize and call
2259 the unprotected version.
2260 (Set_Finalize_Address_Unprotected): New routine.
2261 (Set_Heterogeneous_Finalize_Address): Removed.
2262 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
2263 (Set_Is_Heterogeneous): Add comment on synchronization and
2265 * s-finmas.ads: Flag Finalization_Started is no longer atomic
2266 because synchronization uses task locking / unlocking.
2267 (Attach): Add comment on usage.
2268 (Attach_Unprotected): New routine.
2269 (Delete_Finalize_Address): Renamed to
2270 Delete_Finalize_Address_Unprotected.
2271 (Detach): Add comment on usage.
2272 (Detach_Unprotected): New routine.
2273 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
2274 (Set_Finalize_Address): Add comment on usage.
2275 (Set_Finalize_Address_Unprotected): New routine.
2276 (Set_Heterogeneous_Finalize_Address): Renamed to
2277 Set_Heterogeneous_Finalize_Address_Unprotected.
2278 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
2279 Allocation_Locked. Add various comments on synchronization. Lock
2280 the critical region and call the unprotected version of
2282 (Deallocate_Any_Controlled): Add various comments on
2283 synchronization. Lock the critical region and call the unprotected
2284 version of routines.
2286 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2288 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
2289 are universal and must carry the corresponding type.
2290 * sem_eval.adb (Check_Non_Static_Context): If the type of the
2291 expression is universal real, as may be the case for a fixed point
2292 expression with constant operands in the context of a conversion,
2293 there is nothing to check.
2294 * s-finmas.adb: Minor reformatting
2296 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
2298 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
2300 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2302 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
2303 TRACE): Reintroduce.
2304 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
2305 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
2307 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2309 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
2310 (unchecked_conversion_nop): Use it.
2311 (gnat_to_gnu): Likewise.
2313 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2315 * back_end.adb (Call_Back_End): Pass the maximum logical line number
2316 instead of the maximum physical line number to gigi.
2317 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
2319 2011-10-16 Tom Tromey <tromey@redhat.com>
2320 Dodji Seketeli <dodji@redhat.com>
2322 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
2323 public ordinary map interface.
2325 2011-10-16 Tristan Gingold <gingold@adacore.com>
2327 * link.c (_AIX): Add support for GNU ld.
2329 2011-10-16 Fedor Rybin <frybin@adacore.com>
2331 * gnat_ugn.texi: Fixing gnattest example names in the doc.
2332 Adding explanation to additional tests usage.
2334 2011-10-16 Robert Dewar <dewar@adacore.com>
2336 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
2338 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
2340 * a-convec.adb: Fix minor inconsistencies.
2342 2011-10-16 Matthew Heaney <heaney@adacore.com>
2344 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
2345 Implementation): Specify pragma Implementation_Defined.
2347 2011-10-15 Nicolas Roche <roche@adacore.com>
2349 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
2350 either rtp-smp or ravenscar-cert-rtp runtimes.
2352 2011-10-15 Bob Duff <duff@adacore.com>
2354 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2355 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
2357 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
2358 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
2360 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
2361 pool only if RE_Root_Storage_Pool_Ptr is available.
2362 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
2363 pool actual unless RE_Root_Storage_Pool_Ptr is available.
2364 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
2365 formal only if RE_Root_Storage_Pool_Ptr is available.
2367 2011-10-15 Matthew Heaney <heaney@adacore.com>
2369 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
2370 type): Specify Priority aspect for protected type.
2372 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2374 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
2375 is a generic actual, it is a subtype of a type that was frozen
2376 by the instantiation, and even if not marked frozen it does not
2377 affect the construction of the dispatch table.
2379 2011-10-14 Robert Dewar <dewar@adacore.com>
2381 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
2383 * s-rident.ads: Add missing Compiler_Unit pragma.
2385 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2387 * sem_res.adb: Minor reformatting.
2389 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2391 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2392 Code and comment reformatting. Use BIP_Task_Master
2393 when creating a _master.
2394 (BIP_Formal_Suffix): Code reformatting. Correct the case for
2396 (Make_Build_In_Place_Call_In_Object_Declaration): Use
2397 BIP_Task_Master when creating a reference to the enclosing
2398 function's _master formal.
2399 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
2401 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
2402 (Needs_BIP_Finalization_Master): Alphabetized.
2403 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
2406 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2408 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
2409 reject an aliased keyword on the object declaration of an extended
2410 return statement. In older versions of the language indicate
2411 that this is illegal in the standard.
2413 2011-10-14 Pascal Obry <obry@adacore.com>
2415 * sem_util.adb, sem_ch4.adb: Minor reformatting.
2417 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2419 * sem_ch13.adb: Recognize properly procedure calls that are
2420 transformed into code statements.
2422 2011-10-14 Vincent Celier <celier@adacore.com>
2424 * projects.texi: Minor fix in project example.
2426 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2428 * sem_util.adb: Return objects are aliased if their type is
2429 immutably limited as per AI05-0053.
2431 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2433 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
2434 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
2435 Short_Circuit_And_Or expansion code (moved to sem_res).
2436 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
2437 "and" and "or" operators as short-circuit "and then" and "or
2438 else", when pragma Short_Circuit_And_Or is active.
2440 2011-10-13 Robert Dewar <dewar@adacore.com>
2442 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
2443 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2445 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2447 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
2449 2011-10-13 Jerome Guitton <guitton@adacore.com>
2451 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
2453 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2455 * a-convec.ads (Cursor): Minor reformatting.
2456 * a-convec.adb (Next): Fix minor inconsistencies.
2457 (Previous): Likewise.
2459 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2461 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
2462 New predicate to determine whether some operations on an array
2463 type are available when the full view of its component may differ
2464 from the view of the point of the array declaration.
2465 * sem_ch4.adb (Find_Equality_Types): Use
2466 Available_Full_View_Of_Component.
2467 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2469 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2471 * sem_ch9.adb: Analyze aspects while discriminants of protected
2474 2011-10-13 Geert Bosch <bosch@adacore.com>
2476 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
2477 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
2478 longer depend on an external library.
2479 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
2480 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
2481 Update dependencies.
2482 * gcc-interface/Make-lang.in: Update dependencies.
2484 2011-10-13 Cyrille Comar <comar@adacore.com>
2486 * gnat_ugn.texi: Minor editing.
2488 2011-10-13 Vincent Celier <celier@adacore.com>
2490 * projects.texi: Add documentation on packages and attributes
2491 that are inherited from a project being extended into the
2494 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2496 * exp_ch3.adb (Build_Master): Rewritten.
2497 (Expand_N_Full_Type_Declaration): Reformat the declarative
2498 region. Update the call to Build_Master_Renaming.
2499 (Expand_Previous_Access_Type): Rewritten.
2500 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2501 Add local constant Result_Subt and update related usage.
2502 (Expand_N_Extended_Return_Statement): Add local constant
2503 Result_Subt and update related usage.
2504 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
2505 new context detection mechanism.
2506 (Build_Class_Wide_Master):
2507 Use Insert_Action to add the renaming into the tree.
2508 (Build_Master_Entity): Rewritten to use the new context detection
2510 (Build_Master_Renaming): Add formal parameter Ins_Nod
2511 and related usage. Use Insert_Action to add the renaming into the
2513 (Find_Enclosing_Context): New subsidiary routine. Rather
2514 than relying on enclosing scopes, this routine looks at the
2515 tree structure to figure out the proper context for a _master
2516 or a _chain. This approach eliminates the issues with transient
2517 scopes which have not been converted into blocks.
2518 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
2519 to better reflect the new usage. Update the related comment.
2520 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
2521 the comment on usage.
2522 * sem_ch3.adb (Access_Definition): Update the calls to
2523 Build_Master_Entity and Build_Master_Renaming.
2524 * sem_ch6.adb (Create_Extra_Formals): Add local variable
2525 Full_Subt. Code reformatting.
2526 * sem_util.adb (Is_Iterator): Alphabetized.
2527 (Is_LHS): Alphabetized.
2528 (Is_Limited_Class_Wide_Type): New routine.
2529 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
2531 2011-10-13 Geert Bosch <bosch@adacore.com>
2533 * a-ngrear.adb (Solve): Make generic and move to
2534 System.Generic_Array_Operations.
2535 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2536 New generic solvers to compute a vector resp. matrix Y such
2537 that A * Y = X, approximately.
2538 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2539 Implement using Forward_Eliminate and Back_Substitute
2540 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
2542 * a-ngcoar.ads ("abs"): Fix return type to be real.
2544 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2547 * s-linux-alpha.ads: Do not "with" Interfaces.C.
2548 * s-linux-sparc.ads: Likewise.
2550 2011-10-13 Geert Bosch <bosch@adacore.com>
2552 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
2554 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
2556 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2559 2011-10-13 Geert Bosch <bosch@adacore.com>
2561 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2562 move to System.Generic_Array_Operations.
2564 2011-10-13 Geert Bosch <bosch@adacore.com>
2566 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2567 * s-gearop.ads (L2_Norm): Change profile to be suitable for
2569 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2572 2011-10-13 Robert Dewar <dewar@adacore.com>
2574 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2575 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2576 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2577 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2578 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2579 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2581 2011-10-13 Geert Bosch <bosch@adacore.com>
2583 * s-gearop.adb: Minor comment additions.
2585 2011-10-13 Fedor Rybin <frybin@adacore.com>
2587 * gnat_ugn.texi: Add gnattest section.
2589 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2591 * freeze.adb: Do not create body of renaming if declaration has
2594 2011-10-13 Olivier Hainque <hainque@adacore.com>
2596 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2597 further, to the ppc+kernel case only.
2599 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2601 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2602 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2603 Do not create a pool formal on .NET/JVM.
2604 (Expand_N_Extended_Return_Statement): Alphabetize local
2605 variables. Do not create a renaming of the build-in-place pool
2606 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
2607 Add the user-defined pool only on non-VM targets.
2608 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2609 local variables. Do not add a pool actual on .NET/JVM.
2610 * sem_ch6.adb: Add with and use clause for Targparm.
2611 (Create_Extra_Formals): Add build-in-place pool formal only on
2613 * rtsfind.ads: Alphabetize entries.
2615 2011-10-13 Sergey Rybin <rybin@adacore.com>
2617 * gnat_ugn.texi: Minor correction.
2619 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2621 * sem_ch8.adb: Minor error message improvement.
2623 2011-10-13 Robert Dewar <dewar@adacore.com>
2625 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2627 2011-10-13 Gary Dismukes <dismukes@adacore.com>
2629 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2630 of a for loop for an enumeration type with an enumeration rep
2631 clause, which involves moving the original loop parameter into
2632 a nested block, the loop parameter's entity must be removed from
2633 the entity list of the loop scope.
2635 2011-10-13 Bob Duff <duff@adacore.com>
2637 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2638 that gets passed in the same cases where BIP_Alloc_Form is passed
2639 (caller-unknown-size results). BIP_Storage_Pool is used when
2640 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
2641 to the user-defined storage pool is passed at the call site,
2642 and this pool is used in callee to allocate the result.
2643 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2644 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2645 the additional BIP_Storage_Pool actual.
2646 (Expand_N_Extended_Return_Statement): Allocate the function
2647 result using the user-defined storage pool, if BIP_Alloc_Form =
2649 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2650 * exp_ch4.adb: Don't overwrite storage pool set by
2651 Expand_N_Extended_Return_Statement.
2652 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2653 for use in build-in-place function calls within allocators
2654 where the access type has a user-defined storage pool.
2656 2011-10-13 Sergey Rybin <rybin@adacore.com>
2658 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2661 2011-10-13 Nicolas Roche <roche@adacore.com>
2663 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2666 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2668 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2669 account that an unchecked union type can be limited.
2671 2011-10-13 Olivier Hainque <hainque@adacore.com>
2673 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2674 the use of the signal trampoline for PPC in the sjlj case as well.
2675 Add legitimate casts, preventing compile time warnings on the
2676 (sighandler *) profile.
2678 2011-10-13 Yannick Moy <moy@adacore.com>
2680 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2683 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2685 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2686 expressions are legal limited return values if each one of their
2687 dependent expressions are legal.
2689 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2691 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2692 if the prefix of the call is a qualified expression, rewrite as
2694 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2695 code statement is legal if it is a rewriting of a procedure call.
2697 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2699 * exp_aggr.adb (Flatten): If a component association has a box,
2700 assume that aggregate is not static.
2701 (Safe_Aggregate): If a component association in a non-limited
2702 aggregate has a box, assume that it cannot be expanded in place.
2704 2011-10-13 Vincent Celier <celier@adacore.com>
2706 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2707 Process_Project_Tree_Phase_1 with Packages_To_Check.
2708 (Process_Project_And_Apply_Config): Ditto
2709 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2710 Remove default for argument Packages_To_Check.
2711 * prj-proc.adb (Recursive_Process): New argument
2714 (Process_Project_Tree_Phase_1): Ditto.
2715 (Recursive_Project.Process_Aggregated_Projects): Call
2716 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2718 * prj-proc.ads (Process): New argument Packages_To_Check
2719 (Process_Project_Tree_Phase_1): Ditto
2721 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2723 * gcc-interface/Makefile.in: Fix typo.
2725 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2727 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2728 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
2729 Use sloc of defining identifier of farmal type declaration,
2730 as sloc of generated internal entity, to prevent misplaced
2733 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2735 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2736 is fully defined before checking that it is a numeric type.
2738 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2740 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2741 association for component X has a box, then X is covered in the
2742 aggregate even if there is not default value for X in the type
2743 declaration, and X has to be default-initialized.
2745 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2747 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2748 literals as referenced only if reference is in current source unit.
2750 2011-10-13 Matthew Heaney <heaney@adacore.com>
2752 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2754 2011-10-13 Olivier Hainque <hainque@adacore.com>
2756 * sigtramp.h: New file. Prototype and spec of the signal
2757 trampoline to be called by an established handler to provide
2758 dwarf call frame info before the real signal processing code.
2759 * sigtramp-ppcvxw.c: New file. Implementation of the signal
2760 trampoline for ppc-vxworks.
2761 * init.c (vxworks section): Use it for ppc.
2763 2011-10-13 Thomas Quinot <quinot@adacore.com>
2765 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2766 (Check_Future_Identifier): New subprogram,
2767 factors duplicated code from Par.Ch2.P_Identifier and
2768 Par.Ch3.P_Defining_Identifier.
2770 2011-10-13 Thomas Quinot <quinot@adacore.com>
2772 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2773 if we fail to initialize CV attributes or CV.
2775 2011-10-13 Thomas Quinot <quinot@adacore.com>
2777 * s-tasren.adb (Timed_Selective_Wait, case
2778 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2779 we know abortion is already deferred.
2781 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2783 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2784 (Build_Master_Renaming (function)): Removed.
2785 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2786 (Expand_Full_Type_Declaration): Alphabetize
2787 variables. Reformatting of code and comments. Rewrite the
2788 section on processing of anonymous access-to-task types in
2790 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2791 (Build_Master_Renaming): Moved to exp_ch9.
2792 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2793 (Build_Master_Entity): Add formal parameter
2794 Use_Current. Reformatting of code and comments.
2795 (Build_Master_Renaming): Moved from exp_ch3.
2796 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2797 exp_ch3. Update comment on usage.
2798 (Build_Master_Entity):
2799 Add formal parameter Use_Current. Update comment on usage.
2800 (Build_Master_Renaming): Moved from exp_ch3.
2801 * sem_ch3.adb (Access_Definition): Remove redundant code to
2802 create a _master and a renaming.
2804 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2806 * lib-xref.adb: Do no emit reference to overridden operation,
2807 if it is internally generated.
2809 2011-10-13 Vincent Celier <celier@adacore.com>
2811 * bindgen.adb: Remove any processing related to g-trasym
2812 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2813 * mlib-prj.adb: Remove any processing related to g-trasym.
2815 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2817 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2818 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2819 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2820 (ADA_FLAGS_TO_PASS): Likewise.
2821 (COMMON_FLAGS_TO_PASS): New.
2822 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
2823 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2824 (gnatlib): Use COMMON_FLAGS_TO_PASS.
2825 (ada.install-common): Likewise.
2826 (install-gnatlib): Likewise.
2827 (install-gnatlib-obj): Likewise.
2828 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2829 (gnat-cross): Delete.
2830 (gnatboot): Likewise.
2831 (gnatboot2): Likewise.
2832 (gnatboot3): Likewise.
2833 (gnatstage1): Likewise.
2834 (gnatstage2): Likewise.
2835 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2836 (MOST_ADAFLAGS): Likewise.
2837 (LOOSE_CFLAGS): Likewise.
2838 (gnat-cross): Likewise.
2839 (GNATLIBFLAGS): Add -W -Wall.
2840 (GNATLIBCFLAGS_FOR_C): Likewise.
2841 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2842 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2844 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2846 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2847 (push_range_check_info): Likewise.
2848 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2849 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2850 (gnat_invariant_expr): Likewise.
2851 * gcc-interface/utils.c (compute_related_constant): Likewise.
2852 (max_size): Fix handling of SAVE_EXPR.
2853 (remove_conversions): Fix formatting.
2855 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2857 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2858 (DECL_INDUCTION_VAR): New macro.
2859 (SET_DECL_INDUCTION_VAR): Likewise.
2860 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2861 (gnat_invariant_expr): Likewise.
2862 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2863 parameter, set DECL_LOOP_PARM_P on it.
2864 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2865 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2866 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2867 (struct range_check_info_d): New type.
2868 (struct loop_info_d): Likewise.
2869 (gnu_loop_stack): New stack.
2870 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2871 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2872 is set, do not test DECL_RENAMED_OBJECT.
2873 (push_range_check_info): New function.
2874 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2875 the label. Reference the label and the iteration variable from it.
2876 Build the special induction variable in the unsigned version of the
2877 size type, if it is larger than the base type. And attach it to the
2878 iteration variable if the latter isn't by-ref. In the iteration scheme
2879 case, initialize the invariant conditions in front of the loop if
2880 deemed profitable. Use gnu_loop_stack.
2881 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2882 <N_Raise_Constraint_Error>: Always process the reason. In the range
2883 check and related cases, and if loop unswitching is enabled, compute
2884 invariant conditions and push this information onto the stack.
2885 Do not translate again the condition if it has been already translated.
2886 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2887 DECL_LOOP_PARM_P isn't set.
2888 (convert_to_index_type): New function.
2889 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2890 to convert the index from the base index type to sizetype.
2891 (gnat_invariant_expr): New function.
2893 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2895 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2896 two parallel arrays to hold standard builtin declarations, and
2897 replace it with a function based interface that can support
2898 creating builtins on the fly in the future.
2899 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2900 (gnat_to_gnu): Ditto.
2902 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2905 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2906 * gcc-interface/utils.c (global_context): New variable.
2907 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2908 that are either public external or at top level. Use "No" macro.
2909 (end_subprog_body): Call decl_function_context.
2910 (rest_of_subprog_body_compilation): Likewise.
2912 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2914 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2915 (rest_of_subprog_body_compilation): Likewise.
2916 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2917 test for useless conversions by means of gnat_useless_type_conversion.
2918 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2919 (language_function): Add named_ret_val and other_ret_val.
2920 (f_named_ret_val): New macro.
2921 (f_other_ret_val): Likewise.
2922 (gigi): Call rest_of_subprog_body_compilation.
2923 (struct nrv_data): New structure.
2924 (is_nrv_p): New predicate.
2925 (prune_nrv_r): New helper function.
2926 (prune_nrv_in_block): New function.
2927 (finalize_nrv_r): New helper function.
2928 (finalize_nrv): New function.
2929 (return_value_ok_for_nrv_p): New predicate.
2930 (build_return_expr): If optimization is enabled, record candidates for
2931 the Named Return Value optimization.
2932 (build_function_stub): Call rest_of_subprog_body_compilation.
2933 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2934 candidates, finalize the Named Return Value optimization.
2935 Call rest_of_subprog_body_compilation.
2936 (call_to_gnu): At the end, if a return value is needed, simplify the
2937 result before wrapping it up in a COMPOUND_EXPR.
2938 * gcc-interface/utils.c (end_subprog_body): Split into...
2939 (rest_of_subprog_body_compilation): ...this. New function.
2940 (gnat_useless_type_conversion): Likewise.
2942 2011-10-06 Thomas Quinot <quinot@adacore.com>
2944 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2945 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2946 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2947 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2948 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2949 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2950 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2951 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2953 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2955 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2958 2011-10-06 Matthew Heaney <heaney@adacore.com>
2960 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2961 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2963 2011-10-06 Vincent Celier <celier@adacore.com>
2965 * g-trasym.adb: Replace old implementation with the default
2966 implementation that returns list of addresses as "0x...".
2967 * g-trasym.ads: Update the list of platforms with the full
2968 capability. Indicate that there is a default implementation
2969 for other platforms.
2970 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2971 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2972 is now a default implementation for all platforms without the full
2975 2011-10-06 Robert Dewar <dewar@adacore.com>
2977 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2978 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2979 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2980 reorganization (use conditional expressions).
2982 2011-10-06 Robert Dewar <dewar@adacore.com>
2984 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2985 floating divide by zero.
2987 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2989 * sem_ch6.adb: Limited interfaces that are not immutably limited
2990 are OK in return statements.
2992 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2994 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2995 change to powerpc section.
2997 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2999 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
3002 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3004 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
3005 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
3006 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
3008 * a-coorma.ads: Minor reformmating.
3009 * einfo.ads: Improve the comment describing the
3010 Directly_Designated_Type function.
3011 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
3013 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3016 2011-09-27 Robert Dewar <dewar@adacore.com>
3018 * a-comutr.ads: Minor reformatting.
3020 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3022 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
3023 iterators to multiway trees.
3025 2011-09-27 Yannick Moy <moy@adacore.com>
3027 * debug.adb (d.D): New option for strict Alfa mode.
3028 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
3029 permissions as strictly as possible.
3030 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
3031 Alfa mode, now, interpret ranges of base types like GNAT does; in
3032 strict mode, simply change the range of the implicit base Itype.
3033 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
3035 2011-09-27 Robert Dewar <dewar@adacore.com>
3037 * exp_ch9.adb: Minor comment fixes.
3039 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3041 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
3044 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
3046 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
3047 instead of Directly_Designated_Type in the indirect array case.
3049 2011-09-27 Robert Dewar <dewar@adacore.com>
3051 * exp_util.adb, exp_aggr.adb: Minor reformatting.
3053 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3055 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
3056 on subtype declarations.
3057 * exp_aggr.adb: Minor comment update.
3059 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
3061 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
3062 test in the N_Explicit_Dereference case. Fold double logical
3063 negation in the special loop case and conditionalize it on
3064 Variable_Ref being true.
3066 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3068 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
3069 single protected object and the selector is a discriminant or an
3070 entry family, this is a non-overloaded candidate interpretation,
3071 and possible primitive operations of the type must not be
3074 2011-09-27 Arnaud Charlet <charlet@adacore.com>
3076 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
3078 2011-09-27 Pascal Obry <obry@adacore.com>
3080 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
3081 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
3082 Add dummy definitions for pthread_rwlock_t
3083 and pthread_rwlockattr_t on all POSIX platforms.
3084 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
3086 (Finalize_Lock): Likewise.
3087 (Write_Lock): Likewise.
3090 2011-09-27 Tristan Gingold <gingold@adacore.com>
3092 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
3095 2011-09-27 Pascal Obry <obry@adacore.com>
3097 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
3098 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
3099 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
3100 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
3101 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
3102 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
3103 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
3104 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
3105 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
3106 s-taprop-posix.adb: Revert previous changes.
3107 (Lock): Now a record containing the two possible lock
3108 (mutex and read/write) defined in OS_Interface.
3109 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
3111 (Initialize_Protection): Likewise.
3113 (Lock_Read_Only): Likewise.
3116 2011-09-27 Pascal Obry <obry@adacore.com>
3118 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
3119 OS_Interface.pthread_rwlock_t.
3121 2011-09-27 Robert Dewar <dewar@adacore.com>
3123 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
3124 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
3125 sem_ch5.adb, sem_util.adb: Minor reformatting.
3127 2011-09-27 Pascal Obry <obry@adacore.com>
3129 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
3130 (Finalize_Lock)[RW_Lock]: Likewise.
3131 (Write_Lock)[RW_Lock]: Likewise.
3132 (Unlock)[RW_Lock]: Likewise.
3133 (Read_Lock): Define L as RW_Lock (instead of Lock).
3134 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
3135 routine for r/w lock.
3136 (Finalize_Lock)[RW_Lock]: Likewise.
3137 (Write_Lock)[RW_Lock]: Likewise.
3138 (Unlock)[RW_Lock]: Likewise.
3139 (Read_Lock): Define L as RW_Lock (instead of Lock).
3141 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3142 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
3143 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3144 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
3145 routine for standard lock.
3146 (Finalize_Lock)[RW_Lock]: Likewise.
3147 (Write_Lock)[RW_Lock]: Likewise.
3148 (Unlock)[RW_Lock]: Likewise.
3149 (Read_Lock): Define L as RW_Lock (instead of Lock).
3150 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
3151 in the record definition.
3152 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
3153 lock for 'R' locking policy.
3154 (Initialize_Protection): Likewise.
3156 (Lock_Read_Only): Likewise.
3158 * s-taspri-posix.ads (RW_Lock): New type defined as
3159 OS_Interface.pthread_rwlock_t.
3161 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
3162 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
3163 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
3164 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
3166 2011-09-27 Pascal Obry <obry@adacore.com>
3168 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
3170 2011-09-27 Pascal Obry <obry@adacore.com>
3172 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3173 s-osinte-hpux.ads, s-osinte-irix.ads,
3174 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
3176 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
3177 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
3178 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
3179 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
3180 pthread_rwlock_destroy, pthread_rwlock_rdlock,
3181 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
3183 2011-09-27 Pascal Obry <obry@adacore.com>
3185 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
3186 (RE_Id): Add RE_Lock_Read_Only.
3187 (RE_Unit_Table): Likewise.
3188 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
3189 to lift restriction on first character. Handle now the
3190 Name_Concurrent_Readers_Locking where policy character is set to
3192 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
3194 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
3195 read only lock for function in protected object.
3196 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
3197 this routine is now used.
3199 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3201 * s-atocou-x86.adb (Decrement): Use %;.
3202 (Increment): Likewise.
3204 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3206 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
3207 dereference of the pointer to the storage area. Remove useless type
3208 conversions and factor out common code.
3210 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3212 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
3213 variable and use it throughout.
3214 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
3215 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
3216 first step. Also convert to the unpadded type as a last step.
3218 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3220 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
3221 DECL_CHAIN in comment.
3222 * gcc-interface/trans.c (gigi): Likewise.
3223 (Attribute_to_gnu): Likewise.
3224 (build_function_stub): Likewise.
3225 (gnat_to_gnu): Likewise.
3226 * gcc-interface/utils.c (create_subprog_decl): Likewise.
3227 (convert_vms_descriptor64): Likewise.
3228 (convert_vms_descriptor32): Likewise.
3230 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3232 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
3233 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
3234 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
3235 the type of the record is TYPE_READONLY.
3237 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3238 Robert Dewar <dewar@adacore.com>
3240 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
3241 OUT formal parameter which is of an null-exclusion access subtype.
3243 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3245 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
3246 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
3247 (gnat_to_gnu_param): Likewise.
3248 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
3249 maybe_unconstrained_array instead of doing the work manually.
3250 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
3251 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
3252 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
3253 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
3254 (gnat_stabilize_reference): Likewise.
3256 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3258 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
3259 (SET_TYPE_NULL_BOUNDS): Likewise.
3260 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
3261 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
3262 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
3264 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
3265 check that the initializer is a valid constant expression for use in
3266 initializing a static variable. Add missing guard.
3267 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
3268 (convert_to_fat_pointer): In the null fat pointer case, build a valid
3269 pointer for the bounds.
3270 * gcc-interface/utils2.c (compare_fat_pointers): New function.
3271 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
3273 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3275 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
3276 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
3277 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
3278 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
3279 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
3280 to the indirect case.
3281 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
3282 the TREE_THIS_NOTRAP flag.
3284 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3286 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
3287 iteration scheme, always generate the do-while form if optimization
3288 is enabled. Use more straightforward test at the end.
3290 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3292 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
3293 XNEW instead of xmalloc. Do not build useless pointer type.
3294 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
3295 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
3296 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
3298 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3300 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3301 the alignment if this doesn't prevent BLKmode access to the object.
3303 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
3305 * gcc-interface/Makefile.in (darwin): Do not issue the
3306 '-flat_namespace' linker flag during Ada build.
3307 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
3308 default shared library options.
3310 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
3312 * gcc-interface/decl.c (annotate_value): Look up expression for
3313 insertion in the cache at the end.
3315 2011-09-19 Arnaud Charlet <charlet@adacore.com>
3317 * gcc-interface/Make-lang.in: Update dependencies.
3319 2011-09-19 Steve Baird <baird@adacore.com>
3321 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
3322 configuration pragma names so that Is_Configuration_Pragma_Name
3323 will return True for Name_Annotate. Make corresponding change in
3324 Pragma_Id enumeration type. This is needed to allow an Annotate
3325 pragma to occur in a configuration pragma file (typically,
3327 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
3328 * gnat_rm.texi: Note that pragma Annotate may be used as a
3329 configuration pragma.
3331 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3333 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
3334 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
3336 2011-09-19 Yannick Moy <moy@adacore.com>
3338 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
3339 for expansion of set membership.
3340 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
3341 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
3342 visible for use in Alfa expansion.
3343 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
3344 variable in Alfa mode.
3346 2011-09-19 Thomas Quinot <quinot@adacore.com>
3348 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
3350 2011-09-19 Thomas Quinot <quinot@adacore.com>
3352 * exp_ch9.adb: Minor reformatting.
3354 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
3356 * freeze.adb (Build_Renamed_Body): Generic subprograms
3357 instantiations cannot be poperly inlined by the compiler, do
3358 not set the Body_To_Inline attribute in such cases.
3359 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
3360 inlining-related flags from the generic subprogram declaration.
3362 2011-09-19 Thomas Quinot <quinot@adacore.com>
3364 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
3365 (Build_Stub_Type): Remove, instead copy components from
3366 System.Partition_Interface.RACW_Stub_Type.
3367 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
3368 (Copy_Component_List): New subprogram.
3370 2011-09-19 Yannick Moy <moy@adacore.com>
3372 * lib-xref.adb (Generate_Reference): Ignore references to
3373 constants in Standard.
3375 2011-09-19 Robert Dewar <dewar@adacore.com>
3377 * err_vars.ads, errout.ads: Minor reformatting.
3379 2011-09-19 Robert Dewar <dewar@adacore.com>
3381 * aspects.ads (Impl_Defined_Aspects): New array
3382 * lib-writ.adb (No_Dependences): New name for No_Dependence
3383 * restrict.adb (No_Dependences): New name for No_Dependence
3384 (Check_Restriction_No_Specification_Of_Aspect): New
3386 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3387 (Restricted_Profile_Result): New variable
3388 (No_Specification_Of_Aspects): New variable
3389 (No_Specification_Of_Aspect_Warning): New variable
3390 * restrict.ads (No_Dependences): New name for No_Dependence
3391 (Check_Restriction_No_Specification_Of_Aspect): New procedure
3392 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3393 * s-rident.ads: Add restriction
3394 No_Implementation_Aspect_Specifications, this is also added to
3395 the No_Implementation_Extensions profile.
3396 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
3397 No_Implementation_Defined_Aspects
3398 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3399 * sem_prag.adb (Analyze_Aspect_Specifications): Check
3400 No_Implementation_Aspects
3401 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3402 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
3404 2011-09-19 Yannick Moy <moy@adacore.com>
3406 * lib-xref.adb (Generate_Reference): Take into account multiple
3407 renamings for Alfa refs.
3409 2011-09-19 Thomas Quinot <quinot@adacore.com>
3411 * g-socthi-mingw.adb: Minor reformatting.
3413 2011-09-19 Yannick Moy <moy@adacore.com>
3415 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
3416 expansion to False in mode Alfa
3418 2011-09-19 Pascal Obry <obry@adacore.com>
3420 * mingw32.h: Remove obsolete code needed for old versions
3423 2011-09-19 Robert Dewar <dewar@adacore.com>
3425 * errout.ads: Minor reformatting.
3427 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3429 * sem_ch6.adb (Analyze_Expression_Function): When the expression
3430 function is transformed into a declaration and a body, insert
3431 body at the end of the declarative part, to prevent premature
3432 freeze actions, and preserve original specification in the
3433 subprogram declaration.
3435 2011-09-19 Vincent Celier <celier@adacore.com>
3437 * projects.texi: Minor editing.
3439 2011-09-19 Robert Dewar <dewar@adacore.com>
3441 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
3442 exp_aggr.adb: Minor reformatting.
3444 2011-09-19 Yannick Moy <moy@adacore.com>
3446 * lib-xref.adb (Generate_Reference): Change entity referenced
3447 to underlying object if any, or else reference to the HEAP.
3449 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3451 * gcc-interface/Make-lang.in: Update dependencies.
3453 2011-09-15 Robert Dewar <dewar@adacore.com>
3455 * tree_io.ads: Minor reformatting.
3456 * a-intnam.ads: Fix bad header.
3458 2011-09-15 Thomas Quinot <quinot@adacore.com>
3460 * a-exexpr-gcc.adb: Minor reformatting.
3462 2011-09-15 Yannick Moy <moy@adacore.com>
3464 * sem_ch6.adb: Propagate information that an expression function comes
3465 from source (otherwise references to this entity are not stored).
3467 2011-09-15 Robert Dewar <dewar@adacore.com>
3469 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
3470 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
3471 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
3473 2011-09-15 Ed Schonberg <schonberg@adacore.com>
3475 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
3476 if the expression function is not a completion, create a
3477 new specification for the generated declaration, and keep the
3478 original specification in the generated body. Shorter code also
3479 ensures that proper warnings are generated for unused formals
3482 2011-09-15 Sergey Rybin <rybin@adacore.com>
3484 * tree_io.ads: Update ASIS_Version_Number because of the changes
3485 in the tree structures for expression functions.
3487 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3489 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3490 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
3491 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
3492 (CLOCK_REALTIME): Fix wrong value on some OSes.
3493 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
3495 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3497 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
3498 to unconstrained array case, deal with each branch of a COND_EXPR.
3499 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
3500 a COND_EXPR in the initializer, if present.
3502 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3504 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
3505 of an addressable type.
3506 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
3507 Deal with those cases for which creating a temporary is mandatory.
3509 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3511 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
3512 this is a real formal parameter before testing whether it is by ref.
3514 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3516 * gcc-interface/gigi.h (build_call_0_expr): Delete.
3517 (build_call_1_expr): Likewise.
3518 (build_call_2_expr): Likewise.
3519 (build_call_n_expr): New prototype.
3520 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
3521 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
3522 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3523 (Exception_Handler_to_gnu_zcx): Likewise.
3524 (gnat_to_gnu): Likewise.
3525 (build_binary_op_trapv): Likewise.
3526 * gcc-interface/utils2.c (build_call_0_expr): Delete.
3527 (build_call_1_expr): Likewise.
3528 (build_call_2_expr): Likewise.
3529 (build_call_n_expr): New function.
3530 (build_call_raise): Use build_call_n_expr.
3531 (build_call_raise_range): Likewise.
3532 (build_call_raise_column): Likewise.
3533 (build_call_alloc_dealloc_proc): Likewise.
3534 (maybe_wrap_malloc): Likewise.
3535 (maybe_wrap_free): Likewise.
3537 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3539 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
3541 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
3542 the result type is null if ENABLE_CHECKING. Set operation_type at the
3543 end unconditionally if not set in the previous cases.
3544 Use build2 and void_type_node for MODIFY_EXPR.
3545 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
3547 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
3549 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
3550 precision when converting to or from an integral type whose precision
3551 is not equal to its size.
3553 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
3555 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
3557 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
3559 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3561 * system-darwin-ppc64.ads: New file.
3563 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3565 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3568 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3570 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3571 size switches to the link phase for shared libs.
3573 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3575 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3576 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3578 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3580 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3581 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3582 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3584 (TOOLS_FLAGS_TO_PASS): New.
3585 (../stamp-tools): Reintroduce, to avoid merge conflicts.
3587 2011-09-06 Robert Dewar <dewar@adacore.com>
3589 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3590 name for Is_RM_Defined_Unit. Also several fixes to this unit.
3592 2011-09-06 Robert Dewar <dewar@adacore.com>
3594 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3595 * s-rident.ads: New restriction No_Implementation_Units
3596 (this restriction is also part of the profile
3597 No_Implementation_Extensions)
3598 * sem_ch10.adb (Analyze_With_Clause): Add check for
3599 No_Implementation_Units restriction.
3601 2011-09-06 Jerome Guitton <guitton@adacore.com>
3603 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3606 2011-09-06 Thomas Quinot <quinot@adacore.com>
3608 * s-solita.adb: Minor reformatting.
3610 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3612 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3613 is a rewriting of an expression function does not freeze previous
3616 2011-09-06 Robert Dewar <dewar@adacore.com>
3618 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3620 2011-09-06 Tristan Gingold <gingold@adacore.com>
3622 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3623 powerpc-wrs-vxworksae.
3625 2011-09-06 Thomas Quinot <quinot@adacore.com>
3627 * s-os_lib.ads (Spawn): Minor documentation clarification,
3628 Success is True for a zero exit status.
3630 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3632 * sem_ch5.adb: Add message for common iterator error.
3634 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3636 * exp_ch3.adb (Build_Initialization_Call): If the target is a
3637 selected component discriminated by a current instance, replace
3638 the constraint with a reference to the target object, regardless
3639 of whether the context is an init_proc.
3641 2011-09-06 Robert Dewar <dewar@adacore.com>
3643 * exp_attr.adb: Descriptor_Size is never static.
3645 2011-09-06 Robert Dewar <dewar@adacore.com>
3647 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3649 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3651 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3654 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3656 * sem_res.adb (Resolve): An expression that is the body of an
3657 expression function does not freeze.
3659 2011-09-06 Matthew Heaney <heaney@adacore.com>
3661 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3662 a-cuprqu.adb: Changed copyright notice to indicate current
3665 2011-09-06 Vincent Celier <celier@adacore.com>
3667 * prj.adb: Minor spelling error fix in comment
3668 * sem_res.adb: Minor reformatting
3670 2011-09-06 Pascal Obry <obry@adacore.com>
3672 * sysdep.c (winflush_nt): Removed as not needed anymore.
3673 (winflush_95): Likewise.
3674 (winflush_init): Likewise.
3675 (winflush_function): Likewise.
3676 (getc_immediate_common): Remove call to winflush_function.
3678 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3680 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3681 processing for Descriptor_Size.
3682 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3683 to account for its broader usage.
3684 * sem_attr.adb (Analyze_Attribute): Change the error detection
3685 circuitry for Descriptor_Size as the attribute is now applicable
3688 2011-09-06 Robert Dewar <dewar@adacore.com>
3690 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3692 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3694 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3695 in a parameter association must not set the Referenced flag on
3697 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3699 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3701 * gnat_rm.texi: Add a section on attribute Descriptor_Size
3703 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3705 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3706 gnatlink-re): Speed up by using -j0.
3708 2011-09-06 Yannick Moy <moy@adacore.com>
3710 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3711 Set_Corresponding_Aspect when creating pragma from aspect.
3712 (Add_Predicates): Use new field Corresponding_Aspect.
3713 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3714 name when present, for the purpose of issuing error messages;
3715 remove local procedure Error_Pragma_Arg_Alternate_Name.
3716 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3718 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3721 2011-09-06 Robert Dewar <dewar@adacore.com>
3723 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3725 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3727 * exp_ch6.adb (Build_Heap_Allocator): Add new
3728 local variable Desig_Typ. Code and comment reformatting. Add
3729 machinery to ensure that the allocation uses a fat pointer when
3730 the type of the return object is a constrained array and the
3731 function return type is an unconstrained array.
3733 2011-09-06 Vincent Celier <celier@adacore.com>
3735 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3736 parameters in subprograms.
3738 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3740 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3742 2011-09-06 Thomas Quinot <quinot@adacore.com>
3744 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3745 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3747 (System.Tasking.Primitive_Operations.Specific.Set): If argument
3748 is null, destroy task specific data, to make API consistent with
3749 other platforms, and thus compatible with the shared version
3751 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3752 Document the above assumption.
3754 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3756 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3757 variable for type of return value when return type is
3758 unconstrained and context is an assignment.
3760 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3762 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3763 class-wide operation if expansion is not enabled.
3765 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
3767 * checks.adb (Apply_Scalar_Range_Check): Deal with access
3770 2011-09-06 Yannick Moy <moy@adacore.com>
3772 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3773 Aspect_Invariant): Do not issue error at this point on illegal
3774 pragma placement, as this is checked later on when analyzing
3775 the corresponding pragma.
3776 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3777 similar to Error_Pragma_Arg, except the source name of the
3778 aspect/pragma to use in warnings may be equal to parameter
3779 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3780 message to distinguish source name of pragma/aspect, and whether
3781 the illegality resides in the type being public, or being private
3782 without a public declaration
3784 2011-09-06 Thomas Quinot <quinot@adacore.com>
3786 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3787 size check (fd_set is implemented differently on that platform).
3789 2011-09-06 Thomas Quinot <quinot@adacore.com>
3791 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3792 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3793 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3794 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3795 (ATCB_Allocation): New subpackage of
3796 System.Tasking.Primitive_Operations, shared across all targets
3797 with full tasking runtime.
3798 (ATCB_Allocation.New_ATCB): Moved there (from target specific
3800 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3801 taking care of establishing a local temporary ATCB if the one
3802 being deallocated is Self, to avoid a reference to the freed
3803 ATCB in Abort_Undefer.
3805 2011-09-06 Thomas Quinot <quinot@adacore.com>
3807 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3808 terminated, mark it for deallocation upon termination.
3809 (Terminate_Task): Call Free_Task again if the task is marked
3810 for automatic deallocation upon termination.
3812 2011-09-06 Robert Dewar <dewar@adacore.com>
3814 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3815 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3816 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3817 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3818 a-intnam-solaris.ads, a-intnam-tru64.ads,
3819 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3820 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3821 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3822 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3823 * s-rident.ads: Add new restriction No_Implementation_Identifiers
3824 Add new profile No_Implementation_Extensions
3825 * sem_prag.adb: Implement pragma Implementation_Defined Implement
3826 profile No_Implementation_Extensions
3827 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3828 Check violation of restriction No_Implementation_Identifiers
3829 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3830 Add entry for Name_No_Implementation_Extensions
3832 2011-09-06 Robert Dewar <dewar@adacore.com>
3834 * impunit.ads: Minor reformatting.
3836 2011-09-06 Robert Dewar <dewar@adacore.com>
3838 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3840 2011-09-06 Pascal Obry <obry@adacore.com>
3842 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3845 2011-09-06 Robert Dewar <dewar@adacore.com>
3847 * g-socket.adb: Minor reformatting
3849 2011-09-06 Javier Miranda <miranda@adacore.com>
3851 * ali.adb (Scan_ALI): Add missing support to load references of
3852 entities imported from other languages.
3853 * ali.ads (Xref_Record): Adding new fields to store the language and
3854 name of an imported entity.
3855 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3858 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3860 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3861 is allowed on a full type declaration if it is the completion of
3862 a private declarations.
3863 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3864 aspect is allowed on a full type declaration in the private part
3867 2011-09-06 Robert Dewar <dewar@adacore.com>
3869 * sem_ch8.ads: Minor reformatting
3871 2011-09-06 Thomas Quinot <quinot@adacore.com>
3873 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3874 Guard against socket values that are not in [0;FD_SETSIZE[
3876 2011-09-06 Robert Dewar <dewar@adacore.com>
3878 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3881 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3883 * s-linux-alpha.ads: Minor reformatting
3884 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3885 Use sizeof instead of corresponding C defines in s-oscons template.
3887 2011-09-06 Vadim Godunko <godunko@adacore.com>
3889 * a-convec.ads, a-iteint.ads: Minor reformatting.
3891 2011-09-06 Vincent Celier <celier@adacore.com>
3893 * projects.texi: Add menus and @node lines.
3895 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3897 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3898 where the return type is an unconstrained array and the context
3899 is an assignment. Optimize the case when the target of the
3900 assignment is a selected component.
3902 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3904 * s-solita.adb: Update comments.
3906 2011-09-06 Pascal Obry <obry@adacore.com>
3908 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3909 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3910 * s-oscons-tmplt.c: Add support for generating pthread related
3911 types size on GNU/Linux as done for Darwin.
3912 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3914 2011-09-06 Robert Dewar <dewar@adacore.com>
3916 * exp_ch6.adb: Fix minor typo.
3918 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3920 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3921 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3922 (Double_Size_Of): Alphabetized. Update the comment on usage.
3923 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3924 (Nearest_Multiple_Rounded_Up): New routine.
3925 (Size_Of): Update comment on usage. The generated expression now
3926 accounts for alignment gaps by rounding the size of the type to the
3927 nearest multiple rounded up of the type's alignment.
3929 2011-09-06 Robert Dewar <dewar@adacore.com>
3931 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3933 2011-09-06 Steve Baird <baird@adacore.com>
3935 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3936 derived subprograms in checking for presence of an
3937 Extra_Accessibility_Of_Result formal parameter.
3938 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3939 checking for presence of an Extra_Accessibility_Of_Result formal
3941 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3942 case where the Parameter_Associatiations attribute is already set,
3943 but set to an empty list.
3944 (Needs_Result_Accessibility_Level):
3945 Unconditionally return False. This is a temporary
3946 change, disabling the Extra_Accessibility_Of_Result
3948 (Expand_Simple_Function_Return): Check for
3949 Extra_Accessibility_Of_Result parameter's presence instead of
3950 testing Ada_Version when generating a runtime accessibility
3951 check which makes use of the parameter.
3953 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3955 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3956 expression in a given case alternative must be attached to the
3957 statement list of the ccrresponding case statement alternative
3958 They cannot be propagated ahead of the case statement, because
3959 the validity of the expression that generated the action may
3960 hold only for that alternative.
3962 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3964 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3965 (Alignment_Of): Remove the code for strict alignment targets.
3966 (Double_Alignment_Of): Removed.
3967 (Double_Size_Of): New routine.
3968 (Make_Finalize_Address_Stmts): Change the
3969 calculation of the dope's size. Update relevant comments.
3970 (Size_Of): New routine.
3972 2011-09-06 Steve Baird <baird@adacore.com>
3974 * einfo.ads (Extra_Accessibility): Update associated comment to use
3975 the term "present" correctly ("present" just means that it is not
3976 an error to query the value of the attribute - it does not imply
3977 that the value must be non-null).
3978 (Extra_Constrained): Ditto.
3979 (Is_Visible_Formal): Ditto.
3980 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3981 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3982 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3983 * exp_ch6.adb (Expand_Call): The callee may require an
3984 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3985 < Ada_2012. This can occur if the callee is exported from a Gnat
3986 runtimes unit. Also improve a comment.
3988 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3990 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3991 (Alignment_Of): Rename formal parameter Some_Typ
3992 to Typ, update related comment. Use the allocator alignment on
3993 strict alignment targets such as SPARC.
3994 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3997 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3999 * sem_ch9.adb (Check_Interfaces): Test
4000 Is_Limited_Type rather than Is_Limited_Record when checking that
4001 the partial view of a synchronized full view must be limited.
4003 2011-09-06 Emmanuel Briot <briot@adacore.com>
4005 * g-comlin.adb (Free): Fix memory leak.
4007 2011-09-06 Robert Dewar <dewar@adacore.com>
4009 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
4011 2011-09-06 Steve Baird <baird@adacore.com>
4013 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
4014 (Ada2012) cases described in AI05-0234 where the accessibility
4015 level of a function result is "determined by the point of
4016 call", an implicit parameter representing that accessibility
4017 level is passed in. Extra_Accessibilty_Of_Result yields this
4018 additional formal parameter. Extra_Accessibility_Of_Result
4019 is analogous to the existing Extra_Accessibility
4020 function used in the implementation of access parameters.
4021 (Set_Extra_Accessibility_Of_Result): New procedure; sets
4022 Extra_Accessibility_Of_Result attribute.
4023 * einfo.adb (Extra_Accessibility_Of_Result): New function.
4024 (Set_Extra_Accessibility_Of_Result): New procedure.
4025 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
4026 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
4027 an accessibility level literal to Natural; introduce a nested
4028 function, Make_Level_Literal, to do this.
4029 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
4030 determines whether a given function (or access-to-function
4031 type) needs to have an implicitly-declared accessibility-level
4032 parameter added to its profile.
4033 (Add_Extra_Actual_To_Call): Export an existing procedure which was
4034 previously declared in the body of Exp_Ch6.
4035 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
4037 (Has_Unconstrained_Access_Discriminants): New Function; a
4038 predicate on subtype entities which returns True if the given
4039 subtype is unconstrained and has one or more access discriminants.
4040 (Expand_Call): When expanding a call to a function which takes an
4041 Extra_Accessibility_Of_Result parameter, pass in the appropriate
4042 actual parameter value. In the case of a function call which is
4043 used to initialize an allocator, this may not be possible because
4044 the Etype of the allocator may not have been set yet. In this
4045 case, we defer passing in the parameter and handle it later in
4046 Expand_Allocator_Expression.
4047 (Expand_Simple_Function_Return): When returning from a function which
4048 returns an unconstrained subtype having at least one access
4049 discriminant, generate the accessibility check needed to ensure that
4050 the function result will not outlive any objects designated by its
4052 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
4054 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
4055 is used to initialize an allocator, we may need to pass in "the
4056 accessibility level determined by the point of call" (AI05-0234)
4057 to the function. Expand_Call, where such actual parameters are
4058 usually generated, is too early in this case because the Etype of
4059 the allocator (which is used in determining the level to be passed
4060 in) may not have been set yet when Expand_Call executes. Instead,
4061 we generate code to pass in the appropriate actual parameter
4062 in Expand_Allocator_Expression.
4063 * sem_ch6.adb (Create_Extra_Formals): Create
4064 the new Extra_Accessibility_Of_Result formal if
4065 Needs_Result_Accessibility_Level returns True. This includes the
4066 introduction of a nested procedure, Check_Against_Result_Level.
4068 2011-09-06 Arnaud Charlet <charlet@adacore.com>
4070 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
4073 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4075 * s-finmas.adb (Set_Finalize_Address): Explain the reason
4076 for the synchronization. Move the test for null from
4077 s-stposu.Allocate_Any_Controlled to this routine since the check
4078 needs to be protected too.
4079 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
4080 synchronization code.
4081 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
4082 explaining the context in which this routine is used.
4083 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
4084 to s-finmas.Set_Finalize_Address.
4086 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4088 * einfo.ads: Document that itypes have no parent field.
4090 2011-09-05 Robert Dewar <dewar@adacore.com>
4092 * rtsfind.adb (Check_CRT): Check for overloaded entity
4093 * rtsfind.ads: Document that entities to be found by rtsfind
4094 cannot be overloaded
4095 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
4096 (Lock_Entries_With_Status): New name for Lock_Entries with two
4097 arguments (changed to meet rtsfind no overloading rule).
4099 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4101 * s-finmas.adb (Set_Finalize_Address (Address,
4102 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4103 (Set_Finalize_Address (in out Finalization_Master,
4104 Finalize_Address_Ptr): Add synchronization code.
4105 * s-finmas.ads (Set_Finalize_Address (Address,
4106 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4107 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
4108 Set_Finalize_Address for the heterogeneous case.
4110 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4112 * sem_ch3.adb: Undo previous change, not suitable after all.
4114 2011-09-05 Robert Dewar <dewar@adacore.com>
4116 * einfo.ads: Minor comment clarification.
4118 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4120 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
4121 no longer needs to search through the entities of the return
4122 statement scope to find the _chain.
4123 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
4124 (Analyze_Block_Statement): Add local variable
4125 Is_BIP_Return_Statement. Add machinery to install all entities
4126 produced by the expansion of the return object declaration.
4127 (Install_Return_Entities): New routine.
4128 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
4130 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4132 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
4133 of subunit is incomplete.
4134 (Analyze_Proper_Body): If parent spec is not available, do not
4137 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4139 * sem_disp.adb (Find_Controlling_Arg): Add checks for
4140 interface type conversions, that are expanded into dereferences.
4142 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4144 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4145 Examine the parameter and return profile of a subprogram and swap
4146 any incomplete types coming from a limited context with their
4147 corresponding non-limited views.
4148 (Exchange_Limited_Views): New routine.
4150 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4152 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
4153 of internal entity to the subtype declaration, so that when
4154 entities are subsequently exchanged in a package body, the tree
4155 remains properly formatted for ASIS.
4157 2011-09-05 Johannes Kanig <kanig@adacore.com>
4159 * g-comlin.adb (Set_Usage): Additional optional argument to set help
4161 (Display_Help): display the user given help message, if available.
4163 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4165 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
4166 is legal if the original node is an identifier that is a
4167 parameterless function call.
4169 2011-09-05 Pascal Obry <obry@adacore.com>
4171 * prj-nmsc.adb: Minor reformatting.
4172 Add support for standalone aggregate library.
4173 (Check_Stand_Alone_Library): Handle standalone aggregate library.
4174 * projects.texi: Fix documentation for aggregate library projects.
4176 2011-09-05 Robert Dewar <dewar@adacore.com>
4178 * sem_ch6.adb: Minor reformatting.
4180 2011-09-05 Matthew Gingell <gingell@adacore.com>
4182 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
4183 stack guard page on PPC Linux. This patch ensures the 64K guard page at
4184 the bottom of the stack is not overwritten.
4186 2011-09-05 Thomas Quinot <quinot@adacore.com>
4188 * exp_intr.adb, s-tasini.adb: Minor reformatting.
4190 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4192 * sem_ch3.adb (Access_Definition): If an access type declaration
4193 appears in a child unit, the scope of whatever anonymous type
4194 may be generated is the child unit itself.
4196 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4198 * sem_ch6.adb (Analyze_Expression_Function): Do not set
4199 Comes_From_Source on rewritten body.
4200 (Analyze_Subprogram_Body_Helper): Check that the original node for
4201 the body comes from source, when determining whether expansion
4202 of a protected operation is needed.
4204 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4206 * exp_aggr.adb (Replace_Type): If the target of the assignment is
4207 a selected component and the right-hand side is a self-referential
4208 access, the proper prefix of the rewritten attribute is a copy
4209 of the left-hand side, not of its prefix.
4211 2011-09-05 Robert Dewar <dewar@adacore.com>
4213 * sem_ch5.adb: Minor reformatting.
4214 * sem_ch3.adb: Minor code clean up.
4216 2011-09-05 Jose Ruiz <ruiz@adacore.com>
4218 * exp_ch9.adb (Make_Initialize_Protection): The fact that
4219 restriction No_Dynamic_Attachment is in effect or not should
4220 not influence the default priority associated to a protected
4221 object. With this change, when the restriction is in effect (as
4222 is the case for the Ravenscar profile) the default priority of
4223 a protected object with an interrupt handler is in the range of
4224 interrupt priorities (Default_Interrupt_Priority) as required
4227 2011-09-05 Arnaud Charlet <charlet@adacore.com>
4229 * a-iteint.ads: Fix header.
4231 2011-09-05 Vincent Celier <celier@adacore.com>
4233 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
4234 with a directory separator to avoid output such as:
4235 "/path/to/objauto.cgpr" has been deleted.
4237 2011-09-05 Robert Dewar <dewar@adacore.com>
4239 * sem_ch3.adb: Minor reformatting.
4241 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4243 * sem_ch5.adb: Better error message.
4245 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4247 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
4248 (Expand_Array_Aggregate): Detect a special case of an aggregate
4249 which contains tasks in the context of an unexpanded return
4250 statement of a build-in-place function.
4251 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
4252 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
4253 which contains tasks and expand it now that the original simple
4254 return statement has been rewritten.
4255 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
4256 reformatting. Do not create a chain for an extended return
4257 statement if one is already available.
4258 (Has_Activation_Chain): New routine.
4260 2011-09-05 Marc Sango <sango@adacore.com>
4262 * sem_ch3.adb (Analyze_Object_Declaration): Remove
4263 the wrong test and add the correct test to detect the violation
4264 of illegal use of unconstrained string type in SPARK mode.
4266 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4268 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
4269 message on an iterator over an array.
4271 2011-09-05 Robert Dewar <dewar@adacore.com>
4273 * lib-xref-alfa.adb: Minor reformatting.
4275 2011-09-05 Robert Dewar <dewar@adacore.com>
4277 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
4278 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
4280 2011-09-05 Gary Dismukes <dismukes@adacore.com>
4282 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
4284 2011-09-05 Johannes Kanig <kanig@adacore.com>
4286 * lib-xref-alfa.adb: Update comments.
4288 2011-09-05 Thomas Quinot <quinot@adacore.com>
4290 * sem_res.adb: Minor reformatting
4292 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4294 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
4295 present, create them now. Needed in case the return type was
4296 a limited view in the function declaration.
4297 (Make_Build_In_Place_Call_In_Allocator): If return type contains
4298 tasks, build the activation chain for it. Pass a reference to
4299 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
4300 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
4301 with build_in_place calls.
4302 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
4303 incomplete, inatialize its Corresponding_Record_Type component.
4304 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
4307 2011-09-05 Johannes Kanig <kanig@adacore.com>
4309 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
4312 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4314 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
4315 appears within a package specification and the token after "IS"
4316 is not a parenthesis, assume that this is an unparenthesized
4317 expression function, even if the token appears in a line by
4319 * par.adb: Clarify use of Labl field of scope stack in error
4322 2011-09-05 Bob Duff <duff@adacore.com>
4324 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
4325 conversions instead of normal type conversions in all cases where a
4326 type conversion would be illegal. In particular, use unchecked
4327 conversions when the operand types are private.
4329 2011-09-05 Johannes Kanig <kanig@adacore.com>
4331 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
4332 objects of task type or protected type.
4334 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4336 * sem_ch6.adb (Analyze_Expression_Function): If the expression
4337 function comes from source, indicate that so does its rewriting,
4338 so it is compatible with any subsequent expansion of the
4339 subprogram body (e.g. when it is a protected operation).
4340 * sem_ch4.adb: minor reformatting
4342 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4344 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
4345 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
4346 may lead to wrong ancestor package in the case of instantiated subunit
4347 bodies. If a subunit is instantiated, follow the chain of instantiations
4348 rather than the stub structure.
4350 2011-09-02 Robert Dewar <dewar@adacore.com>
4352 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
4353 * gcc-interface/Make-lang.in: Update dependencies.
4355 2011-09-02 Marc Sango <sango@adacore.com>
4357 * sem_ch3.adb (Analyze_Object_Declaration): Change
4358 comment and add additional check to differentiate constant of
4359 type string from others unconstrained type.
4361 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4363 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
4364 present in incomplete type declarations to refine the error
4365 message the full declaration is in the same unit.
4366 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
4367 an incomplete type, set the Premature_Use for additional message.
4368 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
4369 and Premature_Use is set, place additional information at the
4370 point of premature use.
4372 2011-09-02 Bob Duff <duff@adacore.com>
4374 * sem_ch6.adb: (Check_Post_State): Suppress warning
4375 "postcondition refers only to pre-state" when the expression has not
4376 yet been analyzed, because it causes false alarms. This can happen when
4377 the postcondition contains a quantified expression, because those are
4378 analyzed later. This is a temporary/partial fix.
4379 (Process_Post_Conditions): Minor: change wording of warning.
4381 2011-09-02 Marc Sango <sango@adacore.com>
4383 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
4384 illegal use of unconstrained string type in SPARK mode.
4385 * sem_res.adb (Analyze_Operator_Symbol): Set the
4386 right place where the string operand of concatenation should be
4387 violate in SPARK mode.
4389 2011-09-02 Robert Dewar <dewar@adacore.com>
4391 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
4392 exp_ch3.adb: Minor reformatting.
4394 2011-09-02 Vincent Celier <celier@adacore.com>
4396 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
4397 as the compiler driver so Is_Compilable returns True for sources.
4398 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
4401 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4403 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
4404 condition, a reference to a controlling formal must be interpreted
4405 as having the class-wide type (or an access to such) so that the
4406 inherited condition can be properly applied to any overriding
4407 operation (see ARM12 6.6.1 (7)).
4409 2011-09-02 Tristan Gingold <gingold@adacore.com>
4411 * init.c (__gnat_is_vms_v7): Fix case and add prototype
4414 2011-09-02 Javier Miranda <miranda@adacore.com>
4416 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
4417 initializing expression of a class-wide interface object declaration
4418 if its type is limited.
4420 2011-09-02 Johannes Kanig <kanig@adacore.com>
4422 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
4423 literals, take into account the type name; the type is *not*
4424 the scope for an enumeration literal.
4426 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4428 * sem_ch6.adb (Check_Overriding_Indicator): add special check
4429 to reject an overriding indicator on a user-defined Adjust
4430 subprogram for a limited controlled type.
4432 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4434 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
4435 for an actual that is a function call returning an unconstrained
4436 limited controlled type.
4438 2011-09-02 Tristan Gingold <gingold@adacore.com>
4440 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
4442 2011-09-02 Johannes Kanig <kanig@adacore.com>
4444 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
4445 from "HEAP" to __HEAP Change comment that refers to that variable
4446 * put_alfa.adb: Change comment that refers to that variable
4448 2011-09-02 Robert Dewar <dewar@adacore.com>
4450 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
4452 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4454 * exp_util.adb (Extract_Renamed_Object): Renamed to
4455 Find_Renamed_Object. This routine has been reimplemented and now uses
4456 tree traversal to locate a renamed object.
4457 (Is_Aliased): Replace call to Extract_Renamed_Object with
4458 Find_Renamed_Object.
4460 2011-09-02 Tristan Gingold <gingold@adacore.com>
4462 * init.c: (__gnat_is_vms_v7): New function.
4464 2011-09-02 Olivier Hainque <hainque@adacore.com>
4466 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
4467 that have a misaligned backchain, necessarily bogus.
4469 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4471 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
4472 TSS routine Finalize_Address when compiling in Alfa mode.
4473 (Expand_Freeze_Record_Type): Do not create TSS routine
4474 Finalize_Address when compiling in Alfa mode.
4475 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
4476 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
4478 (Expand_N_Allocator): Do not produce a call to
4479 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
4480 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
4481 produce a call to primitive Set_Finalize_Address in Alfa mode because
4482 Finalize_Address is not built.
4483 * exp_ch7.adb (Build_Finalization_Master): Do not create
4484 finalization masters in Afa mode since they are not needed.
4485 (Build_Finalizer): Do not create scope and library-level
4486 finalizers in Alfa mode since they are not needed.
4487 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
4488 "new" and "free" when applied to controlled objects in Alfa mode since
4491 2011-09-02 Vincent Celier <celier@adacore.com>
4493 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
4494 only library names with the syntax of Ada identifiers, to avoid errors
4495 when compiling the binder generated files.
4496 * projects.texi: Document restriction on SAL library names
4498 2011-09-02 Thomas Quinot <quinot@adacore.com>
4500 * a-chtgbo.adb: Minor comment fix.
4502 2011-09-02 Robert Dewar <dewar@adacore.com>
4504 * lib-xref.adb: Minor reformatting
4506 2011-09-02 Vincent Celier <celier@adacore.com>
4508 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
4509 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
4510 --version and --help in usage.
4511 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
4513 2011-09-02 Bob Duff <duff@adacore.com>
4515 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
4516 compilers don't understand it.
4518 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4520 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
4521 underlying subtype rather than its base type on the call to
4522 Build_Record_Or_Elementary_Input_Function, so that any
4523 constraints on a discriminated subtype will be available for
4524 doing the check required by AI05-0192.
4525 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4526 If the prefix subtype of the 'Input attribute is a constrained
4527 discriminated subtype, then check each constrained discriminant value
4528 against the corresponding value read from the stream.
4530 2011-09-02 Yannick Moy <moy@adacore.com>
4532 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
4533 warnings on suspicious contracts, and enable them with -gnatwa.
4535 2011-09-02 Robert Dewar <dewar@adacore.com>
4537 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
4540 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4542 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
4543 which ensure that restriction No_Dynamic_Attachment has not been
4545 (Make_Initialize_Protection): Protected types with attach or
4546 interrupt handlers must not violate restriction No_Dynamic_Attachment.
4547 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
4548 which ensures that restriction No_Dynamic_Attachment has not been
4550 * sem_attr.adb: (Eval_Attribute): Transform
4551 VAX_Float_Type'First and 'Last into references to
4552 the temporaries which store the corresponding bounds. The
4553 transformation is needed since the back end cannot evaluate
4554 'First and 'Last on VAX.
4555 (Is_VAX_Float): New routine.
4557 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4559 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4560 generic unit is not intrinsic and has an explicit convention,
4561 the instance inherits it.
4563 2011-09-02 Robert Dewar <dewar@adacore.com>
4565 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4566 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4568 2011-09-02 Thomas Quinot <quinot@adacore.com>
4570 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4571 Guard against a prefix that is an N_Has_Entity but has no
4574 2011-09-02 Yannick Moy <moy@adacore.com>
4576 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4579 2011-09-02 Yannick Moy <moy@adacore.com>
4581 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4582 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4584 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4585 procedure looking for suspicious postconditions.
4586 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4587 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4588 options -gnatw.t and -gnatw.T.
4590 2011-09-02 Pascal Obry <obry@adacore.com>
4592 * prj.adb: Minor code refactoring. Move check for null project in
4594 * projects.texi: Fix minor typos.
4596 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4598 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4599 of iteration is an expression, its value must be captured in a
4600 renaming declaration, so that modification of the elements is
4601 propagated to the original container.
4603 2011-09-02 Pascal Obry <obry@adacore.com>
4605 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4606 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4607 prj-tree.adb: Minor reformatting and style fixes.
4609 2011-09-02 Robert Dewar <dewar@adacore.com>
4611 * s-rident.ads: Add new restriction No_Implicit_Aliasing
4612 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4613 No_Implicit_Aliasing
4614 (Analyze_Attribute, case Address): ditto
4615 (Analyze_Attribute, case Unrestricted_Access): ditto
4616 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4617 No_Implicit_Aliasing restriction.
4618 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4620 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4622 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4623 is an unchecked conversion, apply test to its expression.
4625 2011-09-02 Javier Miranda <miranda@adacore.com>
4627 * sem_ch3.adb (Check_Abstract_Overriding): When
4628 traversing the chain of aliased subprograms avoid reporting a
4629 redundant error on the current entity.
4631 2011-09-02 Sergey Rybin <rybin@adacore.com>
4633 * gnat_ugn.texi: Minor clean up.
4635 2011-09-02 Bob Duff <duff@adacore.com>
4637 * s-htable.adb (Set_If_Not_Present): Use renaming
4638 instead of ":=", because the type Key is limited in the generic (even
4639 if not in the instances).
4641 2011-09-02 Robert Dewar <dewar@adacore.com>
4643 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4644 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4647 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4649 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4650 inherited component with the enclosing derived type. Code reformatting.
4652 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4654 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4655 return done when overflow checks are enabled, since comparisons against
4656 Lor and Hir should not be done when OK1 is False.
4658 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4660 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4661 Add new formal Master_Exp. When present, add that expression to the
4662 call as an extra actual.
4663 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4664 Fmaster_Actual and in the case of a BIP call initializing a return
4665 object of an enclosing BIP function set it to a
4666 new reference to the implicit finalization master
4667 formal of the enclosing function. Fmaster_Actual is
4668 then passed to the new formal Master_Exp on the call to
4669 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4670 initializations of Enclosing_Func to its declaration.
4672 2011-09-02 Thomas Quinot <quinot@adacore.com>
4674 * csets.ads: Minor reformatting
4676 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4678 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4679 the full view of a private type coming from an instantiation.
4680 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4681 loop to iterate over the declarations rather than use the
4682 First_Entity / Next_Entity scheme.
4684 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4686 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4687 X'range (N) into X'First (N) .. X'Last (N), do not share the
4688 dimension indicator N, if present. Even though it is a static
4689 constant, its source location may be modified when printing
4690 expanded code under -gnatDL, and node sharing will lead to chaos
4691 in Sprint on large files, by generating a sloc value that does
4692 not correspond to any source file.
4694 2011-09-02 Bob Duff <duff@adacore.com>
4696 * einfo.adb: (Has_Xref_Entry): Do not call
4697 Implementation_Base_Type. Lib.Xref has been
4698 rewritten to avoid the need for it, and it was costly.
4699 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4700 functions in support of efficient xref.
4701 * lib-xref-alfa.adb: Misc changes related to Key component of
4703 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4704 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4705 no longer does. This is the one place where it is needed.
4707 2011-09-02 Johannes Kanig <kanig@adacore.com>
4709 * g-comlin.adb (Getopt): New optional argument Concatenate to have
4710 similar interface as the other Getopt function.
4712 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4714 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4715 a call to Set_Finalize_Address if there is no allocator available.
4716 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4717 a case of allocator expansion where the allocator is not expanded but
4718 needs a custom allocate routine. Code reformatting.
4719 (Is_Finalizable_Transient): Remove local variables Has_Rens and
4720 Ren_Obj. Code reformatting.
4721 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4722 through the use of 'reference.
4723 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4724 as part of build-in-place expansion. They are intentionally marked as
4725 coming from source, but their parents are not.
4727 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4729 * sem_ch10.adb (Analyze_With_Clause): If the library unit
4730 is the generated subprogram declaration for a child unit body
4731 that acts as spec, use the original body in the with_clause,
4732 to prevent binding errors.
4734 2011-09-02 Vincent Celier <celier@adacore.com>
4736 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4737 qualifier /MULTI_UNIT_INDEX=
4739 2011-09-02 Johannes Kanig <kanig@adacore.com>
4741 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4742 instead of calling the callback function
4744 2011-09-02 Robert Dewar <dewar@adacore.com>
4746 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4747 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4749 2011-09-02 Vincent Celier <celier@adacore.com>
4751 * prj-nmsc.adb: (Find_Sources): When the list of sources is
4752 explicitly declared in an extending project, do not warn if a source
4753 for an inherited naming exception is not found.
4755 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4757 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4758 expansion is inactive.
4760 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4762 * sem_util.adb (Note_Possible_Modification): If the entity
4763 being modified is the renaming generated for an Ada2012 iterator
4764 element, the enclosing container or array is modified as well.
4766 2011-09-02 Jose Ruiz <ruiz@adacore.com>
4768 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4769 Initialize): Define and initialize the
4770 mutex attributes and condition variable attributes locally.
4772 2011-09-02 Vincent Celier <celier@adacore.com>
4774 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4775 exception replaced in an extending project.
4776 (Check_Object): No error when the other source is locally removed.
4778 2011-09-02 Yannick Moy <moy@adacore.com>
4780 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4783 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4785 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4787 * gcc-interface/Make-lang.in: Update dependencies.
4789 2011-09-01 Robert Dewar <dewar@adacore.com>
4791 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4793 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4795 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4796 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4797 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4798 specific for systems where their glibc version does not define the
4799 routines to handle dynamically allocated CPU sets.
4801 2011-09-01 Vincent Celier <celier@adacore.com>
4803 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4804 prj-env.adb: Implement inheritance of naming exceptions in extending
4807 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
4809 * gnatls.adb: Display simple message instead of content of
4812 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4814 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4815 access discriminant and anonymous access component scopes.
4816 (Inherit_Component): Reuse the itype of an access discriminant
4817 or anonymous access component by copying it in order to set the proper
4818 scope. This is done only when the parent and the derived type
4819 are in different scopes.
4820 (Set_Anonymous_Etype): New routine.
4822 2011-09-01 Robert Dewar <dewar@adacore.com>
4824 * a-convec.adb: Minor reformatting throughout.
4826 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4828 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4829 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4830 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4831 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4832 CPU_SET_S respectively because we are now using dynamically allocated
4833 CPU sets which are more portable across different glibc versions.
4834 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4835 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4836 masks dynamically according to the number of processors in the target
4838 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4839 respectively, so we need to pass the size of the masks as
4841 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4842 created cpu_set_t masks
4843 with the number of processors available in the target platform,
4844 instead of static bit arrays. It enhances portability because
4845 it uses the information from the target platform.
4846 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4847 are using a restricted run-time library, use the flag
4848 Configurable_Run_Time_Mode instead of Restricted_Profile.
4850 2011-09-01 Vincent Celier <celier@adacore.com>
4852 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4853 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4855 2011-09-01 Nicolas Roche <roche@adacore.com>
4857 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4858 on VxWorks in kernel mode.
4860 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4862 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4863 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4864 directly the bit array.
4865 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4866 the linux macros with the same name.
4867 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4868 wrappers around the CPU_ZERO and CPU_SET linux macros.
4870 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4872 * exp_ch7.adb (Find_Insertion_List): Removed.
4873 (Process_Transient_Objects): Insert the declarations of the hook
4874 access type and the hook object before the associated transient object.
4876 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4878 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4879 package System.Aux_Dec when using restricted run-time libraries which
4880 do not have this package.
4882 2011-09-01 Tristan Gingold <gingold@adacore.com>
4884 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4886 2011-09-01 Bob Duff <duff@adacore.com>
4888 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4889 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4891 2011-09-01 Thomas Quinot <quinot@adacore.com>
4893 * exp_ch5.adb: Minor reformatting
4894 * gnat_ugn.texi: Fix minor typos.
4895 * gcc-interface/Make-lang.in: Update dependencies.
4897 2011-09-01 Robert Dewar <dewar@adacore.com>
4899 * inline.adb, sem_aggr.adb: Minor reformatting.
4901 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4903 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4905 2011-09-01 Robert Dewar <dewar@adacore.com>
4907 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4909 2011-09-01 Bob Duff <duff@adacore.com>
4911 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4912 body" the same as "in inlined body", because visibility shouldn't
4915 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4917 * inline.adb (Add_Inlined_Body): Refine previous change.
4919 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4921 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4922 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4923 Test for case where call
4924 initializes an object of a return statement before testing for
4925 a constrained call, to ensure that all such cases get handled
4926 by simply passing on the caller's parameters. Also, in that
4927 case call Needs_BIP_Alloc_Form to determine whether to pass on
4928 the BIP_Alloc_Form parameter of the enclosing function rather
4929 than testing Is_Constrained. Add similar tests for the return
4930 of a BIP call to later processing to ensure consistent handling.
4931 (Needs_BIP_Alloc_Form): New utility function.
4932 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4933 a BIP_Alloc_Form formal with call to new utility function
4934 Needs_BIP_Alloc_Form.
4936 2011-09-01 Pascal Obry <obry@adacore.com>
4938 * prj-part.adb: Minor reformatting.
4940 2011-09-01 Vincent Celier <celier@adacore.com>
4942 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4943 half character in the unit name.
4945 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4947 * exp_ch4.adb: Minor code and comment reformatting.
4949 2011-09-01 Thomas Quinot <quinot@adacore.com>
4951 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4952 for Is_Limited_Type and Is_Tagged_Type in condition checking
4953 for by-reference type.
4954 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4955 subprograms may have a completion because of a previous
4956 Inline_Always clause, but the enclosing package must be marked
4957 inlined for the subprogram body to become visible to the backend.
4959 2011-09-01 Thomas Quinot <quinot@adacore.com>
4961 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4963 2011-09-01 Pascal Obry <obry@adacore.com>
4965 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4967 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4969 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4970 the formals of a subprogram stub that acts as a spec.
4972 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4974 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4975 type, declare a renaming for it, not an object declaration.
4977 2011-09-01 Yannick Moy <moy@adacore.com>
4979 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4980 Ignore_Errors to ignore failures to read ALI files when True.
4982 2011-09-01 Javier Miranda <miranda@adacore.com>
4984 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4985 constructor calls associated with non-tagged record types.
4987 2011-09-01 Robert Dewar <dewar@adacore.com>
4989 * g-socthi-vms.adb: Minor reformatting.
4991 2011-09-01 Nicolas Roche <roche@adacore.com>
4993 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4994 in order to avoid impact of imcompatible changes.
4995 * cstreams.c: Likewise
4997 * aux-io.c: Likewise
4999 2011-09-01 Yannick Moy <moy@adacore.com>
5001 * lib-writ.adb (Write_With_Lines): Always output complete information
5002 on "with" line in Alfa mode, as this is required by formal verification
5005 2011-09-01 Tristan Gingold <gingold@adacore.com>
5007 * g-socthi-vms.adb: Add comments.
5009 2011-09-01 Pascal Obry <obry@adacore.com>
5011 * prj.ads: Minor reformatting.
5013 2011-09-01 Vincent Celier <celier@adacore.com>
5015 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
5016 exceptions in the config pragmas file.
5018 2011-09-01 Tristan Gingold <gingold@adacore.com>
5020 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
5022 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5024 * exp_ch7.adb (Find_Insertion_List): New routine.
5025 (Process_Transient_Objects): Add code to handle the abnormal
5026 finalization of a controlled transient associated with a subprogram
5027 call. Since transients are cleaned up right after the associated
5028 context, an exception raised during a subprogram call may bypass the
5031 2011-09-01 Robert Dewar <dewar@adacore.com>
5033 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
5036 2011-09-01 Robert Dewar <dewar@adacore.com>
5038 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
5040 2011-09-01 Robert Dewar <dewar@adacore.com>
5042 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
5044 2011-09-01 Thomas Quinot <quinot@adacore.com>
5046 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
5047 GNATRTL_NONTASKING_OBJS.
5049 2011-09-01 Robert Dewar <dewar@adacore.com>
5051 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
5052 possibility of this flag being set for formals in Ada 2012 mode.
5053 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
5055 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
5057 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
5059 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
5062 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5064 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
5065 insertion node in a tree of nested Expression_With_Actions nodes.
5066 (Process_Transient_Object): In the case where a complex if statement
5067 has been converted into nested Expression_With_Actions nodes, the
5068 "hook" object and the associated access type must be inserted before
5069 the top most Expression_With_Actions.
5071 2011-09-01 Robert Dewar <dewar@adacore.com>
5073 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
5074 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
5076 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5078 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
5080 2011-09-01 Jose Ruiz <ruiz@adacore.com>
5082 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
5084 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
5085 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
5086 in a similar way as we do for the Priority or Dispatching_Domain aspect.
5087 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
5088 Dispatching_Domains_Frozen): Move this local data to package
5089 System.Tasking because with the CPU aspect we need to have access
5090 to this data when creating the task in System.Tasking.Stages.Create_Task
5091 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
5092 Move these variables from the body of
5093 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
5094 we need to have access to this data when creating the task in
5095 System.Tasking.Stages.Create_Task.
5096 * s-taskin.adb (Initialize): Signal the allocation of the environment
5097 task to a CPU, if any, so that we know whether the CPU can be
5098 transferred to a different dispatching domain.
5099 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
5100 is being allocated belongs to the dispatching domain where the task
5101 lives. Signal the allocation of the task to a CPU, if any, so that we
5102 know whether the CPU can be transferred to a different dispatching
5105 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5107 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
5108 attributes Same_Storage and Overlaps_Storage.
5110 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5112 * exp_strm.adb: Remove with and use clause for Opt.
5113 (Build_Array_Input_Function): Remove the version-dependent generation
5114 of the return statement. The Ada 2005 tree is now the default.
5116 2011-09-01 Yannick Moy <moy@adacore.com>
5118 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
5119 it is never empty when compiling in Alfa mode.
5121 2011-09-01 Robert Dewar <dewar@adacore.com>
5123 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
5124 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
5125 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
5126 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
5128 2011-09-01 Matthew Heaney <heaney@adacore.com>
5130 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
5131 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
5132 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
5133 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
5134 unbounded queue container.
5135 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
5136 bounded queue container.
5137 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
5138 unbounded priority queue container.
5139 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
5140 bounded priority queue container.
5142 2011-08-31 Pascal Obry <obry@adacore.com>
5144 * a-direct.adb: Do not try to create an UNC path on Windows.
5145 (Create_Path): Skip leading computer name in UNC path if any.
5147 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5149 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
5150 version-dependent generation of the return statement. The Ada 2005 tree
5153 2011-08-31 Thomas Quinot <quinot@adacore.com>
5155 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
5156 types Stream_Element_Offset and Storage_Offset have a different native
5157 type depending on whether the platform is 32 or 64 bits. When
5158 exchanging them, always convert to 64 bits.
5160 2011-08-31 Yannick Moy <moy@adacore.com>
5162 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
5163 --force-alfa to gnat2why.
5165 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5167 * sem_ch12.adb (Save_References): If the node has aspects, save
5168 references within the corresponding expressions in a separate step,
5169 because the aspects are not directly in the tree for the declaration
5170 to which they belong.
5172 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5174 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
5175 in CodePeer mode, since representation clauses are partially ignored.
5176 * gcc-interface/Make-lang.in: Update dependencies.
5178 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5180 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5181 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
5182 to any dispatching domain.
5184 2011-08-31 Thomas Quinot <quinot@adacore.com>
5186 * exp_ch4.adb: Minor reformatting.
5188 2011-08-31 Bob Duff <duff@adacore.com>
5190 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
5191 on nodes for which it is not defined.
5192 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
5195 2011-08-31 Bob Duff <duff@adacore.com>
5197 * sem_ch3.adb (Process_Full_View): Disable legality check if
5198 In_Instance, to avoid spurious errors.
5199 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
5200 if In_Instance, to avoid spurious errors.
5202 2011-08-31 Pascal Obry <obry@adacore.com>
5204 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
5205 directory speparators.
5206 (Compose): Use Dir_Seps to handle both forms.
5207 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
5209 (Extension): Use Dir_Seps to handle both forms.
5211 2011-08-31 Pascal Obry <obry@adacore.com>
5213 * prj-conf.adb: Minor reformatting.
5215 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5217 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
5218 dispatching domain aspect.
5219 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
5221 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
5222 Dispatching_Domain aspect in a similar way as we do for the Priority
5224 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
5225 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
5227 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
5228 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
5229 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
5230 Dispatching_Domain and add it to the task definition.
5231 (Sig_Flags): Add Pragma_Dispatching_Domain.
5232 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
5233 support to find the types Dispatching_Domain and
5234 Dispatching_Domain_Access.
5235 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
5236 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
5237 query the availability of a pragma Dispatching_Domain.
5238 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
5239 the expander to pass the Dispatching_Domain when creating a task.
5240 (Name_Dispatching_Domain): Add this new name for a pragma.
5241 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
5242 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
5243 task has been allocated at creation time.
5244 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
5245 Ravenscar is always null.
5246 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
5247 the task has been allocated at creation time.
5248 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
5249 a specific dispatching domain.
5250 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
5251 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
5252 and CPU are specified for the task, and the CPU value is not contained
5253 within the range of processors for the domain.
5255 2011-08-31 Vincent Celier <celier@adacore.com>
5257 * make.adb (Original_Gcc) : New constant String_Access.
5258 (Gnatmake): For VM targets, do not use VM version of the compiler if
5259 --GCC= has been specified.
5261 2011-08-31 Thomas Quinot <quinot@adacore.com>
5263 * sem_ch5.adb: Minor reformatting.
5265 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5267 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
5270 2011-08-31 Bob Duff <duff@adacore.com>
5272 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
5273 the access type is private; we don't care about privacy in expansion.
5275 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5277 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
5278 subcomponents tnat may be limited, because they originate in view
5279 conflicts. If the original aggregate is legal and the actuals are
5280 legal, the aggregate itself is legal.
5282 2011-08-31 Matthew Heaney <heaney@adacore.com>
5284 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
5287 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5289 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
5292 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5294 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
5295 Interrupt_Priority aspects, force the analysis of the aspect expression
5296 (when building the equivalent pragma). Otherwise, its analysis is done
5297 too late, after the task or protected object has been created.
5298 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
5299 Analyze_Single_Task_Declaration): Remove the code to move the aspects
5300 to the object declaration because they are needed in the type
5303 2011-08-31 Robert Dewar <dewar@adacore.com>
5305 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
5306 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
5309 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5311 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
5312 if the corresponding type is malformed due to restriction violations.
5314 2011-08-31 Robert Dewar <dewar@adacore.com>
5316 * s-ransee.ads, s-ransee.adb: Minor reformatting.
5318 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5320 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
5321 would cause the generation of Set_Finalize_Address if the target is a
5322 VM and the designated type is not derived from [Limited_]Controlled.
5324 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5326 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
5328 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
5329 case of a compilation error.
5331 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5333 * init.c (__gnat_error_handler): Standardize the stack overflow or
5334 erroneous memory access message.
5335 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
5336 or erroneous memory access message.
5338 2011-08-31 Robert Dewar <dewar@adacore.com>
5340 * sem_ch4.adb: Minor reformatting.
5341 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5343 2011-08-31 Thomas Quinot <quinot@adacore.com>
5345 * scos.ads: Minor documentation clarification.
5346 * put_scos.adb: Do not generate SCO unit header line for a unit that
5349 2011-08-31 Robert Dewar <dewar@adacore.com>
5351 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
5353 2011-08-31 Tristan Gingold <gingold@adacore.com>
5355 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
5356 hold variables between these following subprograms.
5357 (Build_Exception_Handler, Build_Object_Declarations,
5358 Build_Raise_Statement): Use the above type as parameter.
5359 Make the above adjustments.
5360 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
5362 2011-08-31 Pascal Obry <obry@adacore.com>
5364 * projects.texi: Minor reformatting.
5366 2011-08-31 Tristan Gingold <gingold@adacore.com>
5368 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
5369 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
5371 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5373 * exp_ch5.adb: Minor code cleanup.
5374 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
5375 prevent cascaded errors.
5376 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
5377 variable of an iterator specification in current scope.
5378 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
5379 postconditions on the stack, as they contain no return statements.
5381 2011-08-31 Yannick Moy <moy@adacore.com>
5383 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
5384 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
5385 call Qualify_Entity_Names.
5386 (Expand_Alfa): call Qualify_Entity_Names in more cases
5387 * lib-xref-alfa.adb: Take into account system package.
5388 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
5389 CodePeer mode in which we are interested in finding bugs even if
5390 compiler cannot compile source.
5391 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
5394 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5396 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
5397 denoted by the subtype mark to ensure getting the concurrent type in
5398 the case where the subtype mark denotes a private subtype of a
5399 concurrent type (needed when using -gnatc).
5400 (Process_Subtype): For the processing specific to type kinds, case on
5401 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
5402 subtype denotes a private subtype whose base type is nonprivate (needed
5403 for subtypes of private fulfilled by task types when compiling with
5406 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5408 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
5409 late primitives that override interface operations when the full
5410 expander is not active, to avoid blowups in Register_Primitive when
5411 types don't have associated secondary dispatch tables.
5413 2011-08-31 Yannick Moy <moy@adacore.com>
5415 * alfa_test.adb: Code clean up.
5417 2011-08-31 Marc Sango <sango@adacore.com>
5419 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
5420 by Comes_From_Source (Original_Node (N)) in order to treat also the
5421 nodes which have been rewritten.
5422 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
5423 explicit dereference and slice violation in spark mode on the nodes
5424 coming only from the source code.
5426 2011-08-31 Robert Dewar <dewar@adacore.com>
5428 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
5429 lib-xref-alfa.adb: Minor reformatting.
5431 2011-08-31 Matthew Heaney <heaney@adacore.com>
5433 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
5435 2011-08-31 Javier Miranda <miranda@adacore.com>
5437 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
5438 only for class-wide subprograms conflicting with entities of concurrent
5441 2011-08-31 Matthew Heaney <heaney@adacore.com>
5443 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
5446 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5448 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
5449 general description of the routine.
5451 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5453 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
5454 doubly-linked lists.
5456 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5458 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
5459 check is needed for a left-hand side that is a dereference, and the
5460 base type is private without discriminants (whereas the full type does
5461 have discriminants), an extra retrieval of the underlying type may be
5462 needed in the case where the subtype is a record subtype whose base
5463 type is private. Update comments.
5465 2011-08-31 Javier Miranda <miranda@adacore.com>
5467 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
5468 found check if there is a class-wide subprogram covering the primitive.
5470 2011-08-31 Yannick Moy <moy@adacore.com>
5472 * sem_res.adb: Further cases where full expansion test is needed,
5473 rather than expansion test.
5475 2011-08-31 Pascal Obry <obry@adacore.com>
5477 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
5479 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5481 * exp_ch5.adb: Handle iterators over derived container types.
5483 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5485 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
5486 (Has_Anonymous_Master): New routine.
5487 (Set_Has_Anonymous_Master): New routine.
5488 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
5489 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
5490 (Current_Anonymous_Master): New routine.
5491 (Current_Unit_First_Declaration): Removed.
5492 (Current_Unit_Scope): Removed.
5493 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
5494 their objects on a per-unit heterogeneous finalization master.
5496 2011-08-31 Matthew Heaney <heaney@adacore.com>
5498 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
5501 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5503 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
5506 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5508 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
5509 where the actual is an unexpanded call to 'Input.
5511 2011-08-31 Yannick Moy <moy@adacore.com>
5513 * sem_ch4.adb: Code clean up.
5515 2011-08-31 Yannick Moy <moy@adacore.com>
5517 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
5519 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5521 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
5522 and TSS primitive Finalize_Address if finalization is suppressed.
5523 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
5524 primitive Finalize_Address if finalization is suppressed.
5526 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5528 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
5529 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
5530 sure that the underlying task has already been created before trying
5531 to change its affinity.
5532 (Set_CPU): Use the term processor instead of CPU, as we do in
5535 2011-08-31 Vincent Celier <celier@adacore.com>
5537 * prj-attr.adb: New Compiler attribute Source_File_Switches.
5538 * prj-nmsc.adb (Process_Compiler): Process attribute
5539 Source_File_Switches.
5540 * prj.ads (Language_Config): New name list component
5541 Name_Source_File_Switches.
5542 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
5544 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5546 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
5547 discriminated component of an actual, expand at once to prevent
5548 ouf-of-order references with generated subtypes.
5550 2011-08-31 Yannick Moy <moy@adacore.com>
5552 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
5553 reference to operator in Alfa xrefs.
5555 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5557 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5558 where the parent instance was frozen before the current instance due to
5559 the presence of a source body. Update calls to Insert_After_Last_Decl.
5560 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5561 Update the comment which illustrates the purpose of the routine.
5562 Package instances are now frozen by source bodies which appear after
5563 the instance. This ensures that entities coming from within the
5564 instance are available for use in the said bodies.
5565 (Install_Body): Add code to handle the case where the parent instance
5566 was frozen before the current instance due to the presence of a source
5567 body. Update calls to Insert_After_Last_Decl.
5569 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5571 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5573 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5575 2011-08-31 Yannick Moy <moy@adacore.com>
5577 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5579 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5580 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5581 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5582 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5583 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5584 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5585 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5586 ALFA in Alfa (we dropped acronym).
5587 * einfo.adb (Primitive_Operations): Correctly return list of primitive
5588 operations in a case where it returned previously No_Elist.
5590 2011-08-31 Robert Dewar <dewar@adacore.com>
5592 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5593 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5594 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5595 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5596 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5597 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5600 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5602 * sem_ch12 (Check_Private_View): Revert previous change.
5603 * sem_res.adb (Conversion_Check): Do not emit the error message if the
5604 conversion is in a generic instance.
5606 2011-08-31 Matthew Heaney <heaney@adacore.com>
5608 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5609 * a-chtgbo.adb (Free): Allow 0 as index value.
5611 2011-08-31 Matthew Heaney <heaney@adacore.com>
5613 * a-cborma.adb (Insert): Add comment to explain why no element
5616 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5618 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5619 spec discriminant is already a concurrent type, in which case just use
5620 it, otherwise fetch the Corresponding_Concurrent_Type as before.
5622 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5624 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5625 system-linux-mips.ads, system-linux-mipsel.ads,
5626 system-linux-mips64el.ads, system-linux-ppc64.ads,
5627 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5629 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5631 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5632 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5633 (build_unary_op): Likewise.
5635 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5637 * raise-gcc.c: Do not include coretypes.h and tm.h.
5638 (setup_to_install): Remove test for compiler macro.
5639 * targext.c: Document use for the library.
5640 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5642 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5644 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5645 the expression to the nominal type if the latter is a record type with
5646 a variant part and the type of the former is a record type without one.
5648 2011-08-30 Yannick Moy <moy@adacore.com>
5650 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5651 expansion in Alfa mode.
5652 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5653 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5655 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5656 * sem_res.adb: Ditto.
5657 * gcc-interface/Make-lang.in: Update dependencies.
5659 2011-08-30 Thomas Quinot <quinot@adacore.com>
5661 * g-socket.ads: Minor documentation adjustment.
5663 2011-08-30 Robert Dewar <dewar@adacore.com>
5665 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5667 2011-08-30 Yannick Moy <moy@adacore.com>
5669 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5670 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5671 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5672 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5673 Revert change which introduced files for "light"
5674 expansion, to be replaced by a single file for Alfa expansion.
5676 2011-08-30 Robert Dewar <dewar@adacore.com>
5678 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5679 Minor code reorg/reformatting.
5681 2011-08-30 Yannick Moy <moy@adacore.com>
5683 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5684 common shorthand for (Expander_Active and not ALFA_Mode) that can be
5685 used for testing full expansion, that is active expansion not in the
5686 reduced mode for Alfa
5687 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5688 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5689 of the verbose (Expander_Active and not ALFA_Mode)
5691 2011-08-30 Tristan Gingold <gingold@adacore.com>
5693 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5694 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5695 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5696 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5698 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5700 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5701 access conversions to check that the conversion is a rewritten node,
5702 rather than just having Comes_From_Source set to False, which wasn't
5705 2011-08-30 Robert Dewar <dewar@adacore.com>
5707 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5708 g-socket.ads: Minor reformatting.
5710 2011-08-30 Thomas Quinot <quinot@adacore.com>
5712 * sem_util.adb: Minor reformatting.
5714 2011-08-30 Tristan Gingold <gingold@adacore.com>
5716 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5717 to be compliant with the ABI.
5719 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5721 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5722 of a designated type when the related access type is an actual in an
5723 instance. This ensures that the full view of designated type is
5724 available when inside the body of the instance.
5726 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5728 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5729 in a position to be modified, a slice is treated like an indexed
5732 2011-08-30 Thomas Quinot <quinot@adacore.com>
5734 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5735 field tv_sec in struct timeval.
5737 2011-08-30 Yannick Moy <moy@adacore.com>
5739 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5740 blocks of code doing full expansion, previously only guarded by
5741 Expander_Active, by anding the test that ALFA_Mode is not set
5743 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5745 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5746 add the function to the list of private dependents, for subsequent
5747 legality check on Taft amendment types.
5748 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5749 Private_Dependents, as for other incomplete types.
5750 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5751 Taft-amendment type is used as the return type of a function.
5753 2011-08-30 Javier Miranda <miranda@adacore.com>
5755 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5756 which emits an error by a call to a new routine which report the error.
5757 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5758 entity does not cover an existing interface.
5759 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5761 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5762 protected procedures or entries whose mode is not conformant.
5763 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5764 an error by a call to a new routine which report the error.
5766 2011-08-30 Robert Dewar <dewar@adacore.com>
5768 * gnat_rm.texi: Minor change.
5769 * exp_attr_light.adb: Minor reformatting.
5771 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5773 * sem_ch3.adb: Patch inheritance of aspects in
5774 Complete_Private_Subtype, to avoid infinite loop.
5776 2011-08-30 Javier Miranda <miranda@adacore.com>
5778 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5779 been reported and a subprogram covering an interface primitive is not
5780 found then skip generating the internal entity. Done to avoid crashing
5782 (Check_Abstract_Overriding): Change text of error of wrong formal of
5783 protected subprogram or entry. Done for consistency to emit exactly the
5784 same error reported by Check_Synchronized_Overriding. In addition, the
5785 error is restricted to protected types (bug found working on AI05-0090)
5787 2011-08-30 Yannick Moy <moy@adacore.com>
5789 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5790 expansion in Alfa mode.
5791 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5792 * exp_light.adb, exp_light.ads: New package defining light expansion.
5793 * expander.adb (Expand): Call light expansion in Alfa mode
5794 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5796 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5798 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5799 * gnat1drv.adb (Adjust_Global_Switches): Comment
5801 2011-08-30 Yannick Moy <moy@adacore.com>
5803 * lib-xref-alfa.adb: Minor refactoring.
5805 2011-08-30 Yannick Moy <moy@adacore.com>
5807 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5809 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5810 expansion in Alfa mode.
5811 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5814 2011-08-30 Robert Dewar <dewar@adacore.com>
5816 * debug_a.adb: Update comment.
5818 2011-08-30 Robert Dewar <dewar@adacore.com>
5820 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5821 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5822 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5823 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5825 2011-08-30 Robert Dewar <dewar@adacore.com>
5827 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5830 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5832 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5833 Build_Finalization_Master by supplying an insertion node and enclosing
5834 scope. In its old version, the call did not generate a finalization
5836 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5837 recognize anonymous access-to-controlled components. Rewrite the
5838 machinery which creates finalization masters to service anonymous
5839 access-to-controlled components of a record type. In its current state,
5840 only one heterogeneous master is necessary to handle multiple anonymous
5842 (Freeze_Type): Comment reformatting.
5843 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5845 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5846 associates TSS primitive Finalize_Address with either the master itself
5847 or with the internal hash table depending on the mode of operation of
5850 2011-08-30 Javier Miranda <miranda@adacore.com>
5852 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5853 interface type then do not generate code to compare this component.
5854 Required since they have no components and their equality operator is
5857 2011-08-30 Steve Baird <baird@adacore.com>
5859 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5860 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5861 returns the (static) accessibility level of the object. Otherwise, the
5862 same as Type_Access_Level.
5863 (Dynamic_Accessibility_Level): New function; given an expression which
5864 could occur as the rhs of an assignment to a saooaaat (i.e., an
5865 expression of an access-to-object type), return the new value for the
5866 saooaaat's associated Extra_Accessibility object.
5867 (Effective_Extra_Accessibility): New function; same as
5868 Einfo.Extra_Accessibility except that object renames are looked through.
5870 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5871 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5873 (Effective_Extra_Accessibility): New function; see sem_util.ads
5875 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5876 (Extra_Accessibility): Update comments.
5877 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5878 except RM_Size field (which is only for types) is unaffected.
5880 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5881 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5883 (Init_Size): Add assertion that we are not trashing the
5884 Extra_Accessibility attribute of an object.
5885 (Init_Size_Align): Add assertion that we are not trashing the
5886 Extra_Accessibility attribute of an object.
5887 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5888 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5889 differently for the type of a (non-library-level) saooaaat depending
5890 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5891 is queried in this set of changes - everything else (in particular,
5892 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5893 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5894 The special treatment of library-level saooaaats is an optimization,
5895 not required for correctnesss. This is based on the observation that the
5896 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5897 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5899 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5900 false for the type of a saooaaat, declare and initialize its
5901 accessibility level object and set the Extra_Accessibility attribute
5902 of the saooaaat to refer to this object.
5903 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5904 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5905 calls to Effective_Extra_Accessibility in order to support
5906 renames of saooaaats.
5907 (Expand_N_Type_Conversion): Add new local function,
5908 Has_Extra_Accessibility, and call it when determining whether an
5909 accessibility check is needed.
5910 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5911 evaluate to True (without raising an exception).
5913 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5914 saooaaat, update its associated Extra_Accessibility object (if
5915 it has one). This includes an accessibility check.
5916 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5917 a saooaaat, update its Extra_Accessibility object too (if it
5919 (Expand_Call): Replace a couple of calls to Type_Access_Level
5920 with calls to Dynamic_Access_Level to handle cases where
5921 passing a literal (any literal) is incorrect.
5922 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5923 checks associated with "Saooaat := Some_Object'Access;"; this must
5924 be rejected if Some_Object is declared in a more nested scope
5926 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5927 assignment to a saooaaat even if Is_Local_Anonymous_Access
5928 returns False for its type (indicating a 2012-style saooaaat).
5930 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5931 (which is only appropriate for objects, not types) with a call
5932 of Init_Object_Size_Align in order to avoid trashing the
5933 Extra_Accessibility attribute of a rename (the two attributes
5936 (Valid_Conversion) Replace six calls to Type_Access_Level with
5937 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5938 Ada2012 non-library-level saooaaat, the former returns library level
5939 while the latter returns the (static) accessibility level of the
5940 saooaaat. A type conversion to the anonymous type of a saooaaat
5941 can only occur as part of an assignment to the saooaaat, so we
5942 know that such a conversion must be in a lhs context, so Deepest
5943 yields the result that we need. If such a conversion could occur,
5944 say, as the operand of an equality operator, then this might not
5945 be right. Also add a test so that static accessibilty checks are
5946 performed for converting to a saooaaat's type even if
5947 Is_Local_Anonymous_Access yields False for the type.
5949 2011-08-30 Javier Miranda <miranda@adacore.com>
5951 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5952 controls generation of a warning associated with late declaration of
5953 dispatching functions. Required to avoid generating spurious
5956 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5958 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5959 return object has an anonymous access type and the function's type is
5960 a named access type.
5961 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5962 conversions on implicit conversions, since such conversions can occur
5963 for anonymous access cases due to expansion. Issue error for attempt
5964 to rename an anonymous expression as an object of a named access type.
5965 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5966 to indicate whether this function should report errors on invalid
5968 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5969 the expression is of an anonymous access type and the expected type is
5970 a named general access type, rewrite the expression as a type
5971 conversion, unless this is an expression of a membership test.
5972 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5973 calling of Error_Msg_N on new formal Report_Errs.
5974 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5975 calling of Error_Msg_NE on new formal Report_Errs.
5976 (Valid_Conversion): Move declaration of this function to the package
5977 spec, to allow calls from membership test processing. For Ada 2012,
5978 enforce legality restrictions on implicit conversions of anonymous
5979 access values to general access types, disallowing such conversions in
5980 cases where the expression has a dynamic accessibility level (access
5981 parameters, stand-alone anonymous access objects, or a component of a
5982 dereference of one of the first two cases).
5983 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5984 in the context of a named general access expected type.
5985 * exp_ch4.adb Add with and use of Exp_Ch2.
5986 (Expand_N_In): Add processing for membership tests applied to
5987 expressions of an anonymous access type. First, Valid_Conversion is
5988 called to check whether the test is statically False, and then the
5989 conversion is expanded to test that the expression's accessibility
5990 level is no deeper than that of the tested type. In the case of
5991 anonymous access-to-tagged types, a tagged membership test is applied
5993 (Tagged_Membership): Extend to handle access type cases, applying the
5994 test to the designated types.
5995 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5996 accessibility level, and the actual is a 'Access applied to a current
5997 instance, pass the accessibility level of the type of the current
5998 instance rather than applying Object_Access_Level to the prefix. Add a
5999 ??? comment, since this level isn't quite right either (will eventually
6000 need to pass an implicit level parameter to init procs).
6002 2011-08-30 Bob Duff <duff@adacore.com>
6004 * s-taskin.ads: Minor comment fix.
6006 2011-08-30 Ed Schonberg <schonberg@adacore.com>
6008 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
6009 component and the selector is a dispatching operation, check if it is
6010 a prefixed call before rewriting as a parameterless function call.
6012 2011-08-29 Jakub Jelinek <jakub@redhat.com>
6014 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
6015 tsystem.h into $(RTSDIR) instead of rts.
6017 2011-08-29 Robert Dewar <dewar@adacore.com>
6019 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
6021 * gcc-interface/Make-lang.in: Update dependencies.
6023 2011-08-29 Yannick Moy <moy@adacore.com>
6025 * alfa.ads (Name_Of_Heap_Variable): New constant name.
6026 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
6027 table to hold dereferences.
6028 (Add_ALFA_Xrefs): Take into account dereferences as special
6029 reads/writes to the variable "HEAP".
6030 (Enclosing_Subprogram_Or_Package): Move subprogram here.
6031 (Generate_Dereference): New procedure to store a read/write dereferencew
6033 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
6034 the special "HEAP" var.
6035 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
6037 * sem_util.adb (Note_Possible_Modification): Store write dereference
6040 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6042 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
6043 ensures that the level of the subpool access type is not deeper than
6044 that of the pool object.
6045 * sem_util.adb (Object_Access_Level): Expand to handle defining
6047 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
6048 subpool handle name of a rewritten allocator.
6050 2011-08-29 Robert Dewar <dewar@adacore.com>
6052 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
6054 2011-08-29 Thomas Quinot <quinot@adacore.com>
6056 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
6057 values, we generate multiple triples of parameters in the TypeCode.
6058 Bump Choice_Index for each such triple so that a subsequent default
6059 choice is associated with the correct index in the typecode.
6061 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6063 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
6065 (First, Last): Handle properly an iterator over a null container.
6067 2011-08-29 Bob Duff <duff@adacore.com>
6069 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
6070 processing if we run across a node with no Scope. This can happen if
6071 we're with-ing an library-level instance, and that instance got errors
6072 that caused "instantiation abandoned".
6073 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
6074 an exception instead of using Assert, so it won't go into an infinite
6075 loop, even when assertions are turned off.
6077 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6079 * a-coorse.adb: Proper handling of empty ordered sets.
6081 2011-08-29 Johannes Kanig <kanig@adacore.com>
6083 * debug.adb: Add comments.
6085 2011-08-29 Thomas Quinot <quinot@adacore.com>
6087 * a-except.adb, a-except-2005.adb: Minor comment rewording and
6090 2011-08-29 Yannick Moy <moy@adacore.com>
6092 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
6093 declaration for Itypes in Alfa mode.
6095 2011-08-29 Robert Dewar <dewar@adacore.com>
6097 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
6098 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6099 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
6102 2011-08-29 Tristan Gingold <gingold@adacore.com>
6104 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
6106 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
6107 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
6110 2011-08-29 Robert Dewar <dewar@adacore.com>
6112 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
6114 2011-08-29 Javier Miranda <miranda@adacore.com>
6116 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
6117 renamings of formal subprograms when the actual for a formal type is
6120 2011-08-29 Matthew Heaney <heaney@adacore.com>
6122 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
6125 2011-08-29 Matthew Heaney <heaney@adacore.com>
6127 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
6128 components of record type.
6129 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
6132 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6134 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
6135 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
6138 2011-08-29 Robert Dewar <dewar@adacore.com>
6140 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
6143 2011-08-29 Matthew Heaney <heaney@adacore.com>
6145 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
6146 components of record type.
6148 2011-08-29 Bob Duff <duff@adacore.com>
6150 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
6151 by the termination handler.
6153 2011-08-29 Yannick Moy <moy@adacore.com>
6155 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
6156 created in Alfa mode, instead of inserting artificial declarations of
6157 non-Itypes in the tree.
6158 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
6159 know if an Itype has a corresponding declaration, as defined in
6162 2011-08-29 Yannick Moy <moy@adacore.com>
6164 * gnat1drv.adb: Minor rewrite.
6166 2011-08-29 Bob Duff <duff@adacore.com>
6168 * s-tasuti.adb (Make_Passive): Work around race condition in
6169 Make_Independent, which can cause Wait_Count to be zero. So instead of
6170 asserting that Wait_Count > 0, and then decrementing it, decrement it
6171 only if Wait_Count > 0.
6172 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
6173 should be nonnegative, so declare them Natural instead of Integer.
6175 2011-08-29 Robert Dewar <dewar@adacore.com>
6177 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
6178 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
6179 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
6180 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
6181 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
6183 2011-08-29 Tristan Gingold <gingold@adacore.com>
6185 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
6187 2011-08-29 Vadim Godunko <godunko@adacore.com>
6189 * s-parint.ads: Minor comment clarification.
6191 2011-08-29 Vincent Celier <celier@adacore.com>
6193 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
6194 may be used as identifiers.
6196 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6198 * a-coinho.ads: Minor reformating.
6200 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6202 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
6203 container of a derived type.
6205 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6207 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
6208 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
6210 2011-08-29 Pascal Obry <obry@adacore.com>
6212 * exp_disp.adb: Minor comment fix.
6213 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
6214 to avoid warnings when compiling with -Wall.
6215 (Make_Disp_Conditional_Select_Body): Likewise.
6216 (Make_Disp_Timed_Select_Body): Likewise.
6218 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6220 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
6221 an entity name, generate reference for it.
6223 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6225 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
6227 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
6228 the class-wide type.
6229 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
6231 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6233 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
6234 subtype for an object whose type is an unconstrained union.
6236 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6238 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
6239 is allowed in a component definition, by AI95-406.
6241 2011-08-29 Matthew Heaney <heaney@adacore.com>
6243 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
6245 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6247 * a-except-2005.adb: Alphabetize all routines.
6248 (Triggered_By_Abort): New routine.
6249 * a-except-2005.ads (Triggered_By_Abort): New routine.
6250 * a-except.adb Alphabetize all routines.
6251 (Triggered_By_Abort): New routine.
6252 * a-except.ads (Triggered_By_Abort): New routine.
6253 * exp_ch7.adb: Update all comments involving the detection of aborts in
6255 (Build_Object_Declarations): Do not generate code to detect the
6256 presence of an abort at the start of finalization code, use a runtime
6258 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
6260 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
6261 allocate a task on a subpool.
6262 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
6263 The flag disables all actions related to the maintenance of
6264 Finalize_Address_Table when subpools are not in use.
6265 (Allocate_Any_Controlled): Signal the machinery that subpools are in
6267 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
6268 performs costly task locking when subpools are not in use.
6270 2011-08-29 Yannick Moy <moy@adacore.com>
6272 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
6273 types and dispatching calls in Alfa mode.
6274 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6275 correspondance between body and spec scopes, to reuse utility functions
6276 (Traverse_Declarations_Or_Statements): Protect access to body for stub
6277 by testing the presence of the library unit for the body
6278 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
6279 mode the expansion of accept statements is skipped
6280 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
6281 the unique entity corresponding to the one returned by
6282 Unique_Defining_Entity applied to the enclosing declaration of the
6285 2011-08-29 Bob Duff <duff@adacore.com>
6287 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
6288 gdb when x is not a node (it can be a node list, name_id, etc). pp is
6289 an alias for pn. ppp is an alias for pt.
6291 2011-08-29 Javier Miranda <miranda@adacore.com>
6293 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
6294 aggregate to take a consistent decision on the need to convert into
6295 assignments aggregates that initialize constant objects.
6297 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6299 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
6300 Build_Allocate_Deallocate_Proc in order to handle allocation of
6301 non-controlled objects on subpools.
6302 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
6303 to be end-user visible.
6304 * s-finmas.adb: Add with and use clause for System.HTable.
6305 Add an instantiation of Simple_HTable which provides a mapping between
6306 the address of a controlled object and the corresponding
6307 Finalize_Address used to clean up the object. The table is used when a
6308 master is operating in heterogeneous mode.
6309 (Attach): Explain why the input node is not verified on being already
6311 (Delete_Finalize_Address): New routine.
6312 (Detach): Add pragma Assert which ensures that a node is already
6314 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
6315 since nodes are no longer removed on traversal. Explain why node
6316 detachment is undesirable in this case.
6317 (Get_Finalize_Address): New routine.
6318 (Hash): New routine.
6319 (Is_Empty_List): Removed.
6320 (pm): Renamed to Print_Master. Add output for discriminant
6322 Comment reformatting.
6323 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6324 * s-finmas.ads: Various comments additions / improvements.
6325 Type Finalization_Master has a discriminant which determines the mode of
6327 (Delete_Finalize_Address): New routine.
6328 (Get_Finalize_Address): New routine.
6329 (pm): Renamed to Print_Master.
6330 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6331 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
6332 use clause for System.IO.
6333 (Allocate_Any_Controlled): Add machinery to set TSS primitive
6334 Finalize_Address depending on the mode of allocation and the mode of
6336 (Deallocate_Any_Controlled): Remove the relation pair object -
6337 Finalize_Address regardless of the master mode. Add comment explaining
6339 (Detach): Ensure that fields Prev and Next are null after detachment.
6340 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
6341 scheme to check whether the list of subpools is empty. There is no
6342 longer need to store the next subpool or advance the current pointer.
6343 (Is_Empty_List): New routine.
6344 (Print_Pool): New routine.
6345 (Print_Subpool): New routine.
6346 * s-stposu.ads: Various comments additions / improvements.
6347 Field Master of type Root_Subpool is now a heterogeneous collection.
6348 (Print_Pool): New routine.
6349 (Print_Subpool): New routine.
6351 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6353 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
6354 forms, using aspects of container types.
6355 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
6356 Has_Implicit_Dereference flags, that may be set on the partial view.
6357 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
6358 container type with an indexing aspect.
6359 (Analyze_Quantified_Expression): Analyze construct with expansion
6360 disabled, because it will be rewritten as a loop during expansion.
6361 (Try_Container_Indexing): The prefix itself may be a container type
6362 with an indexing aspect, as with a vector of vectors.
6363 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
6364 the original doamin of iteration, for name capture.
6365 (Analyze_Iterator_Specification): If the domain is an expression that
6366 needs finalization, create a separate declaration for it.
6367 For an iterator with "of" retrieve default iterator info from aspect of
6368 container type. For "in" iterator, retrieve type of Iterate function.
6369 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
6370 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
6371 analysis, to prevent spurious errors about late attributes.
6372 * sprint.adb: Handle quantified expression with either loop or iterator
6374 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
6377 2011-08-29 Vincent Celier <celier@adacore.com>
6379 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
6380 Binder or Linker of the main project file.
6382 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6384 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
6387 2011-08-29 Yannick Moy <moy@adacore.com>
6389 * exp_ch9.adb: Partial revert of previous change for Alfa mode
6391 2011-08-29 Yannick Moy <moy@adacore.com>
6393 * exp_ch11.adb: Minor expansion of comment.
6395 2011-08-29 Yannick Moy <moy@adacore.com>
6397 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
6399 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6401 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
6402 interpretation, set the type before resolving the operands, because
6403 legality checks on an exponention operand need to know the type of the
6406 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6408 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
6409 cleanups on a master if the instance is within a generic unit.
6410 Complement to the corresponding fix to inline.adb for K520-030.
6412 2011-08-29 Tristan Gingold <gingold@adacore.com>
6414 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
6416 * exp_intr.adb: Minor comment fix.
6418 2011-08-29 Bob Duff <duff@adacore.com>
6420 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
6421 Delay_Required was used as an uninitialized variable.
6423 2011-08-29 Robert Dewar <dewar@adacore.com>
6425 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
6426 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
6427 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
6429 2011-08-29 Thomas Quinot <quinot@adacore.com>
6431 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
6432 Remove unused variables.
6434 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6436 * sem_res.adb: Remove Build_Explicit_Dereference.
6437 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
6438 from sem_res.adb, used in analysis of additional constructs.
6439 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
6440 expansion of iterators.
6441 (Is_Object_Reference): Recognize variables rewritten as explicit
6442 dereferences in Ada2012.
6443 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
6444 Reversible_Iterator names, for expansion of Ada2012 iterators.
6445 * aspects.ads, aspects.adb (Find_Aspect): Utility.
6446 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
6447 linked list container.
6448 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
6449 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
6451 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6453 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
6456 2011-08-29 Vincent Celier <celier@adacore.com>
6458 * make.adb (Gnatmake): Get the maximum number of simultaneous
6459 compilation processes after the Builder switches has been scanned, as
6460 there may include -jnn.
6462 2011-08-29 Matthew Heaney <heaney@adacore.com>
6464 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
6466 2011-08-29 Tristan Gingold <gingold@adacore.com>
6468 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
6469 GNAT_DRIVER_COMMAND_LINE to 255.
6471 2011-08-29 Pascal Obry <obry@adacore.com>
6473 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
6474 reformatting and style fix (class attribute casing).
6476 2011-08-29 Yannick Moy <moy@adacore.com>
6478 * exp_ch11.adb: Yet another case where expansion should be common
6479 between CodePeer and Alfa.
6481 2011-08-29 Yannick Moy <moy@adacore.com>
6483 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
6485 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6487 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
6488 incomplete type and its completion match.
6490 2011-08-29 Yannick Moy <moy@adacore.com>
6492 * exp_ch13.adb: Adjust previous change.
6494 2011-08-29 Robert Dewar <dewar@adacore.com>
6496 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
6497 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
6500 2011-08-29 Emmanuel Briot <briot@adacore.com>
6502 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
6503 initialize aggregated projects.
6505 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6507 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
6508 depth of candidates to resolve a potentially spurious ambiguity between
6509 two visible subprograms.
6511 2011-08-29 Yannick Moy <moy@adacore.com>
6513 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
6515 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6516 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
6519 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6521 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
6524 2011-08-29 Thomas Quinot <quinot@adacore.com>
6526 * sem_res.adb: Minor reformatting.
6528 2011-08-29 Johannes Kanig <kanig@adacore.com>
6530 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
6532 * gnat1drv.adb (Adjust_Global_Switches): Set
6533 Use_Expressions_With_Actions to False in ALFA mode.
6534 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
6537 2011-08-29 Yannick Moy <moy@adacore.com>
6539 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
6540 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
6541 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
6542 tagged types and dispatching calls in Alfa mode.
6544 2011-08-29 Javier Miranda <miranda@adacore.com>
6546 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
6547 we do not report an error on an Empty node.
6549 2011-08-29 Geert Bosch <bosch@adacore.com>
6551 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
6552 a-nlrear.o and a-nurear.o.
6554 2011-08-29 Robert Dewar <dewar@adacore.com>
6556 * freeze.adb: Minor code reorganization.
6558 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6559 sem_ch6.adb: Minor reformatting
6561 2011-08-29 Tristan Gingold <gingold@adacore.com>
6563 * s-except.ads, s-except.adb: Provide dummy body.
6565 2011-08-29 Yannick Moy <moy@adacore.com>
6567 * sem_warn.adb (Within_Postcondition): Take into account the case of
6568 an Ensures component in a Test_Case.
6570 2011-08-29 Tristan Gingold <gingold@adacore.com>
6572 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6573 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6574 System_Exceptions_Debug
6575 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6576 * a-except.adb: With and use System.Exceptions_Debug instead of
6578 * a-except-2005.adb: Likewise.
6579 * s-assert.adb: Likewise.
6580 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6581 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
6582 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6583 s-excdeb. Update dependencies.
6584 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6585 as these no longer need external libraries.
6587 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6589 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6590 exponentiation operator on universal values in a context that requires
6593 2011-08-29 Tristan Gingold <gingold@adacore.com>
6595 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
6596 before calling notify_handled_exception.
6597 * a-exextr.adb: Fix comment.
6599 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6601 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6602 Finalize_Address of the access type's finalization master.
6603 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6604 access type's finalization master. Add a guard to prevent
6605 Associated_Storage_Pool from being set on .NET/JVM.
6606 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6607 attribute Finalize_Address of the access type's finalization master.
6608 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6609 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6610 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6612 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6613 use clause for System.IO
6614 (Detach): Relax the assertion, to be reinstated later.
6615 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6616 Relax the assertion on Finalize_Address, to be reinstated later.
6617 (Is_Empty_List): New routine.
6618 (pm): New debug routine.
6619 (Set_Finalize_Address): New routine.
6620 * s-finmas.ads (pm): New debug routine.
6621 (Set_Finalize_Address): New routine.
6622 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6624 2011-08-29 Tristan Gingold <gingold@adacore.com>
6626 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6627 Remove convention C.
6629 2011-08-29 Tristan Gingold <gingold@adacore.com>
6631 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6632 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6633 (Finalize_TCB): Remove its finalization.
6634 (Initialize): Remove assignment of GET_Exc_Stack_Addr
6635 * s-soflin.adb (NT_Exc_Stack): Remove
6636 (Get_Exc_Stack_Addr_NT): Likewise.
6637 (Get_Exc_Stack_Addr_Soft): Likewise.
6638 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6639 (Get_Exc_Stack_Addr): Likewise.
6640 (Get_Exc_Stack_Addr_Soft): Likewise
6641 * s-taspri-vms.ads (Exc_Stack_T): Remove.
6642 (Exc_Stack_Ptr_T): Likewise.
6643 (Private_Data): Remove Exc_Stack_Ptr component.
6645 2011-08-29 Tristan Gingold <gingold@adacore.com>
6647 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6649 2011-08-29 Tristan Gingold <gingold@adacore.com>
6651 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6653 2011-08-29 Geert Bosch <bosch@adacore.com>
6655 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6656 L2_Norm, Swap_Column): New generic subprograms
6657 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6658 L2_Norm, Swap_Column): Implement new subprograms in order to
6659 eliminate dependency on BLAS and LAPACK libraries in
6660 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6661 version. Forward_Eliminate/Back_Substitute can be used to put a
6662 matrix in row echelon or reduced row echelon form using partial
6664 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6665 Swap_Column): Instantiate from System.Generic_Array_Operations.
6666 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6667 (Sqrt): Local function for simple computation of square root without
6668 adding dependencies on Generic_Elementary_Functions.
6669 (Swap): New subprogram to exchange floating point numbers.
6670 (Inverse): Reimplement using Jordan-Gauss elimination.
6671 (Jacobi): New procedure implementing Jacobi's method for computation
6672 of eigensystems, based on Rutishauser's implementation.
6673 (L2_Norm): Implement directly using the inner product.
6674 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6675 decreasing eigenvalue as required by the Ada RM.
6676 (Swap_Column): New helper procedure for Sort_Eigensystem.
6677 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6678 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6681 2011-08-29 Thomas Quinot <quinot@adacore.com>
6683 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6686 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6688 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6689 than the current node.
6690 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6691 Finalization_Master. The list headers have two fields instead of three.
6692 This should fix alignment issue but subpool allocations are now
6693 unusable. Alphabetize subprograms.
6694 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6695 the size of the header when converting the beginning of the object to
6696 a FM_Node. Set the master's Finalize_Address attribute if not already
6698 (Deallocate_Any_Controlled): Use the offset rather than the size of the
6699 header when converting the beginning of the object to a FM_Node.
6701 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6703 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6704 reraise when compiling for CodePeer.
6706 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6708 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6709 now needed by a-convec.adb. Fix warning.
6711 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6713 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6714 processing of TSS routine Finalize_Address when compiling in
6717 2011-08-29 Thomas Quinot <quinot@adacore.com>
6719 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6720 sem_warn.adb: Minor reformatting.
6722 2011-08-29 Emmanuel Briot <briot@adacore.com>
6724 * prj-conf.adb (Get_Config_Switches): Also collect the list of
6725 languages from aggregated projects.
6727 2011-08-29 Yannick Moy <moy@adacore.com>
6729 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6730 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6731 Traverse_Package_Declaration, Traverse_Subprogram_Body,
6732 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6733 for stubs are traversed too when parameter is set
6734 (Traverse_All_Compilation_Units): Traverse without going inside stubs
6735 (Traverse_Declarations_Or_Statements): Do the special traversing for
6736 stubs when required.
6737 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6738 return subprogram or package body from stub.
6739 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6740 stubs without prior subprogram decl.
6742 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6744 * gnat_ugn.texi: Fix typo.
6746 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6748 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6749 which accounts for size vs alignment issues and calculates the size of
6751 (Deallocate_Any_Controlled): Ditto.
6752 (Nearest_Multiple_Rounded_Up): New routine.
6754 2011-08-29 Tristan Gingold <gingold@adacore.com>
6756 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6757 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6758 (Set_Exception_Msg): Ditto.
6759 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
6761 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6762 Use Save_Occurrence instead of Save_Occurrence_No_Private.
6763 (Raise_With_Msg): Remove Cleanup_Flag.
6764 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6765 Clean_Flag and Private_Data components.
6767 2011-08-29 Yannick Moy <moy@adacore.com>
6769 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6771 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6772 of an explicitly declared type, so that the base types of the original
6773 type and this generated type are the same, and a "type" (not a subtype
6775 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6776 small" in Alfa mode, like in CodePeer mode.
6777 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6778 clauses in Alfa mode.
6780 2011-08-29 Javier Miranda <miranda@adacore.com>
6782 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6783 function to the package spec.
6784 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6785 internally generated bodies of null procedures locate the internally
6786 generated spec enforcing mode conformance.
6787 (Is_Interface_Conformant): Ensure that the controlling formal of the
6790 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6792 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6793 reject the pragma if it appears to apply to a formal subprogram.
6795 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6797 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6798 inner expression, to prevent double evaluation.
6800 2011-08-29 Tristan Gingold <gingold@adacore.com>
6802 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6804 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6805 * a-except-2005.adb (Propagate_Exception): Adjust spec.
6806 (Raise_Current_Excep): Adjust call.
6807 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6809 2011-08-29 Thomas Quinot <quinot@adacore.com>
6811 * exp_disp.adb: Minor reformatting.
6813 2011-08-29 Tristan Gingold <gingold@adacore.com>
6815 * a-exexpr.adb (Setup_Exception): Removed.
6816 * a-exexpr-gcc.adb (Setup_Exception): Removed.
6817 * a-except.adb (Exception_Propagation): Removed.
6818 * a-except-2005.adb (Setup_Exception): Removed.
6819 (Reraise): Remove call to Setup_Exception.
6820 (Reraise_Occurrence): Ditto.
6821 (Reraise_Occurrence_Always): Ditto.
6822 (Reraise_Occurrence_No_Defer): Ditto.
6823 (Transfer_Occurrence): Ditto.
6824 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6825 (Set_Exception_Msg): Ditto.
6827 2011-08-29 Robert Dewar <dewar@adacore.com>
6829 * a-convec.adb, exp_disp.adb: Minor reformatting.
6831 2011-08-29 Tristan Gingold <gingold@adacore.com>
6833 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6835 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6837 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6838 Exception_Handlers to No_List instead of Empty_List in the case where
6839 there are no handlers.
6841 2011-08-29 Tristan Gingold <gingold@adacore.com>
6843 * gcc-interface/gigi.h (enum standard_datatypes): Add
6844 ADT_reraise_zcx_decl
6845 (reraise_zcx_decl): New macro.
6846 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6847 (gigi): Set reraise_zcx_decl.
6848 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6849 (gnat_to_gnu): Handle N_Raise_Statement.
6851 2011-08-29 Robert Dewar <dewar@adacore.com>
6853 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6854 a-undesu.adb: Minor reformatting.
6856 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6858 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6859 table, accept an unfrozen untagged component if it is an actual for a
6860 formal incomplete type.
6861 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6862 provide new iterator forms over vectors.
6863 Introduce type Iterator in package body to implement operations of
6864 Reversible_Iterator interface.
6865 * a-iteint.ads: Make package pure so it is usable with new container
6866 packages, that are categorized Remote_Types.
6868 2011-08-29 Robert Dewar <dewar@adacore.com>
6870 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6872 2011-08-29 Bob Duff <duff@adacore.com>
6874 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6875 of <>, because this is the routine that checks for dimensionality
6876 errors (for example, for a two-dimensional array, (others => <>) should
6877 be (others => (others => <>)).
6879 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6881 * impunit.adb: Add new run-time units.
6882 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6883 s-stposu.ads, s-stposu.adb: Code clean up.
6884 Handle protected class-wide or task class-wide types
6885 Handle C/C++/CIL/Java types.
6886 * s-spsufi.adb, s-spsufi.ads: New files.
6888 2011-08-29 Yannick Moy <moy@adacore.com>
6890 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6891 library-level subprogram.
6892 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6894 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6896 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6898 * gnat_rm.texi: Update doc for Test_Case pragma.
6900 2011-08-29 Tristan Gingold <gingold@adacore.com>
6902 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6904 (GCC_Exception_Access): New type.
6905 (Unwind_DeleteException): New imported procedure
6906 (Foreign_Exception): Import it.
6907 (GNAT_GCC_Exception): Simply have the occurrence inside.
6908 (To_GCC_Exception): New function.
6909 (To_GNAT_GCC_Exception): New function.
6910 (GNAT_GCC_Exception_Cleanup): New procedure..
6911 (Propagate_GCC_Exception): New procedure.
6912 (Reraise_GCC_Exception): New procedure.
6913 (Setup_Current_Excep): New procedure.
6914 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6915 (Unwind_RaiseException): Ditto.
6916 (Unwind_ForcedUnwind): Ditto.
6918 (Begin_Handler): Change type of parameter.
6919 (End_Handler): Ditto. Now delete the exception if still present.
6920 (Setup_Key): Removed.
6921 (Is_Setup_And_Not_Propagated): Removed.
6922 (Set_Setup_And_Not_Propagated): Ditto.
6923 (Clear_Setup_And_Not_Propagated): Ditto.
6924 (Save_Occurrence_And_Private): Ditto.
6925 (EID_For): Add 'not null' constraint on parameter.
6926 (Setup_Exception): Does nothing.
6927 (Propagate_Exception): Simplified.
6928 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6929 re-raise is not expanded anymore.
6930 * s-except.ads (Foreign_Exception): New exception - placeholder for
6932 * raise-gcc.c (__gnat_setup_current_excep): Declare
6933 (CXX_EXCEPTION_CLASS): Define (not yet used)
6934 (GNAT_EXCEPTION_CLASS): Define.
6935 (is_handled_by): Handle foreign exceptions.
6936 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6938 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6940 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6942 2011-08-29 Thomas Quinot <quinot@adacore.com>
6944 * a-synbar-posix.adb: Minor reformatting.
6946 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6948 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6949 a-exetim-default.ads (Interrupt_Clocks_Supported,
6950 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6951 definitions to be compliant with AI-0171. The target systems do not
6952 support separate account for the execution time of interrupt handlers.
6954 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6956 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6957 in the barrier to put first the easiest to evaluate (and the one which
6958 will be True more often). More efficient.
6960 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6962 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6964 2011-08-29 Bob Duff <duff@adacore.com>
6966 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6967 attributes that are now aspects, as specified by AI05-0229-1.
6968 * sem_ch13.adb (Analyze_Aspect_Specifications,
6969 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6970 pragmas or attribute references, as appropriate.
6972 2011-08-29 Robert Dewar <dewar@adacore.com>
6974 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6975 a-synbar-posix.ads: Minor reformatting.
6977 2011-08-29 Yannick Moy <moy@adacore.com>
6979 * snames.ads-tmpl: Add name Force.
6981 2011-08-29 Pascal Obry <obry@adacore.com>
6983 * prj-nmsc.adb: Minor reformatting.
6985 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6987 * a-exetim.ads (Interrupt_Clocks_Supported,
6988 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6989 definitions to be compliant with AI-0171.
6991 2011-08-29 Robert Dewar <dewar@adacore.com>
6993 * a-ngelfu.adb: Add comments.
6995 2011-08-29 Geert Bosch <bosch@adacore.com>
6997 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6998 the closest machine number to Pi / 2.0.
7000 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7002 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
7003 package Ada.Synchronous_Barriers.
7004 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
7005 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
7006 default implementation using protected objects and another one
7007 a-synbar-posix using POSIX barriers as the underlying support.
7008 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
7009 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
7010 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
7011 Clean up dependencies.
7012 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
7014 2011-08-29 Robert Dewar <dewar@adacore.com>
7016 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
7017 exp_dist.adb: Minor code reorganization.
7020 2011-08-29 Thomas Quinot <quinot@adacore.com>
7022 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
7023 primitive operation must support external streaming if it is not a
7024 controlling access result.
7026 2011-08-29 Thomas Quinot <quinot@adacore.com>
7028 * sinfo.ads, sem_ch7.adb: Minor reformatting.
7030 2011-08-29 Bob Duff <duff@adacore.com>
7032 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
7033 restriction on allocators, as required by AI05-0013-1.
7034 * restrict.ads: Minor comment fix.
7036 2011-08-29 Tristan Gingold <gingold@adacore.com>
7038 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
7039 (To_Jmpbuf_Address): Ditto
7040 (builtin_longjmp): Ditto
7042 2011-08-29 Thomas Quinot <quinot@adacore.com>
7044 * sem_res.adb: Minor reformatting.
7046 2011-08-29 Vincent Celier <celier@adacore.com>
7048 * make.adb (Gnatmake): Move special processing for VM targets after the
7049 call to Get_Target_Parameters.
7051 2011-08-29 Thomas Quinot <quinot@adacore.com>
7053 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
7055 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7057 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
7058 where an anonymous access discriminant of a limited designated type
7059 appears in a non-immutably limited discriminated type and issue an
7060 error message. Add local variable Desig_T and replace all occurrences
7063 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7065 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
7066 implementation is compliant to RM D.15(15/2) after the modification
7067 imposed by AI05-0094-1 (binding interpretation).
7069 2011-08-29 Robert Dewar <dewar@adacore.com>
7071 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
7072 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
7074 2011-08-29 Thomas Quinot <quinot@adacore.com>
7076 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
7077 the scope name, do not report a missing label as a style violation (it
7078 will be diagnosed as an illegality).
7079 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
7080 variant records: Get_Enum_Lit_From_Pos already returns a usage
7081 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
7082 on Expr in Integer_Literal case so that it can be used by
7085 2011-08-29 Tristan Gingold <gingold@adacore.com>
7087 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
7089 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
7090 (Build_Abort_Block_Handler): New function to build an Abort_Signal
7092 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
7093 Build_Abort_Block_Handler to build the exception handler. Do not
7094 undefer aborts for the Abort_Signal exception handler if back-end
7095 exception mechanism.
7096 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
7097 back_end exceptions for all others and abort_signal.
7098 * s-except.ads (ZCX_By_Default): New constant.
7099 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
7100 (Raise_Exception_Always): Ditto.
7101 (Raise_From_Signal_Handler): Ditto.
7102 (Raise_With_Location_And_Msg): Ditto.
7103 (Raise_With_Msg): Ditto.
7105 (Reraise_Occurence): Ditto.
7106 (Reraise_Occurrence_Always): Ditto.
7107 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
7108 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
7110 2011-08-29 Thomas Quinot <quinot@adacore.com>
7112 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
7114 2011-08-29 Robert Dewar <dewar@adacore.com>
7116 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
7117 Minor code reorganization.
7119 2011-08-29 Bob Duff <duff@adacore.com>
7121 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
7122 2012, not just Ada 2005.
7124 2011-08-29 Vincent Celier <celier@adacore.com>
7126 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
7127 with a project file or with gprbuid, if -gnatep= is specified, the
7128 builder may need to be invoked with -x.
7130 2011-08-29 Tristan Gingold <gingold@adacore.com>
7132 * a-exexpr-gcc.adb: Minor comment fix.
7134 2011-08-29 Robert Dewar <dewar@adacore.com>
7136 * sem_ch8.adb: Minor reformatting.
7138 2011-08-29 Bob Duff <duff@adacore.com>
7140 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
7141 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
7142 treating "some" as unreserved in earlier Ada versions. This is now
7143 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
7144 rather than Name_Some, since Tok_Some is now recognized as reserved.
7145 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
7147 * scans.ads: Minor comment fixes.
7148 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
7149 for other language versions.
7150 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
7151 treating "some" as unreserved in earlier Ada versions. This is now
7152 handled in Snames.Is_Keyword_Name.
7153 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
7155 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
7156 unreserved in earlier Ada versions. This is now handled in
7157 Snames.Is_Keyword_Name.
7158 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
7159 words as for other language versions.
7160 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
7161 Ada 2012, not just Ada 2005.
7163 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7165 * sem_ch13.adb: Additional semantic checks for aspects involved in
7168 2011-08-29 Matthew Heaney <heaney@adacore.com>
7170 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
7171 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
7172 Container parameter.
7173 (Ancestor_Find): ditto.
7175 2011-08-29 Thomas Quinot <quinot@adacore.com>
7177 * par-endh.adb: Minor reformatting.
7179 2011-08-29 Tristan Gingold <gingold@adacore.com>
7181 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
7182 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
7183 (Adjust_N_CLeanups_For): Remove.
7184 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
7186 (Propgate_Exception): Adjust.
7187 * raise-gcc.c: Add a few static/const.
7188 (Adjust_N_Cleanups_For): Remove declaration.
7189 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
7191 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7193 * sem_ch8.adb: Use type of function return when rewriting as object
7196 2011-08-29 Gary Dismukes <dismukes@adacore.com>
7198 * sem_type.adb: Minor reformatting.
7200 2011-08-29 Robert Dewar <dewar@adacore.com>
7202 * makeutl.adb: Minor reformatting.
7204 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7206 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
7207 function call of a limited type, the expansion of the renaming is
7208 complicated by the presence of various temporaries and subtypes that
7209 capture constraints of the renamed object.
7210 Rewrite node as an object declaration, whose expansion is simpler.
7211 Given that the object is limited there is no copy involved and no
7214 2011-08-29 Robert Dewar <dewar@adacore.com>
7216 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
7217 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
7219 2011-08-29 Tristan Gingold <gingold@adacore.com>
7221 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
7222 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
7223 system-linux-hppa.ads, system-linux-s390.ads,
7224 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
7225 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
7226 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
7227 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
7228 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
7229 system-solaris-sparc.ads, system-lynxos-x86.ads,
7230 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
7231 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
7232 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
7233 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7234 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
7235 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
7236 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
7237 * opt.ads: Adjust comment.
7238 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
7239 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
7240 * system.ads: Move GCC_ZCX_Support to obsolete entries.
7242 2011-08-29 Emmanuel Briot <briot@adacore.com>
7244 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
7245 file name is specified on the gnatmake or gprbuild command line, and
7246 before we search for that file in the project.
7248 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7250 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
7251 used to determine whether a possible interpretation for an overloadable
7252 entity is declared within the current instantiation and should be
7253 included in the candidate set.
7255 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
7257 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
7259 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7261 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
7262 access subtype is access_to_subprogram, when applying checks for
7265 2011-08-29 Matthew Heaney <heaney@adacore.com>
7267 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
7268 for sibling when common parent.
7270 2011-08-29 Thomas Quinot <quinot@adacore.com>
7272 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
7275 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7277 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
7278 for the return type when in ASIS mode.
7280 2011-08-29 Vincent Celier <celier@adacore.com>
7282 * make.adb (Gnatmake): Get the default search dirs, then the target
7283 parameters after getting the Builder switches, as the Builder switches
7284 may include --RTS= and that could change the default search dirs.
7286 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7288 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
7289 Make_Final_Call. Move the processing for class-wide types before the
7290 processing for derivations from [Limited_]Controlled.
7291 (Make_Final_Call): Move the processing for class-wide types before the
7292 processing for derivations from [Limited_]Controlled.
7293 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
7294 Add code to account for alignments larger than the list header. Add a
7295 comment illustrating the structure of the allocated object + padding +
7297 (Deallocate_Any_Controlled): Add code to account for alignments larger
7298 than the list header.
7300 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7302 * sinfo.ads, sinfo.adb: New node kind
7303 N_Formal_Incomplete_Type_Definition, related flags.
7304 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
7305 Parse formal incomplete types.
7306 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
7308 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
7309 Formal incomplete types do not need completion.
7310 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
7311 Validate_Incomplete_Type_Instance): New procedures to handle formal
7313 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
7314 that corresponds to a formal incomplete type.
7315 * sprint.adb: Handle formal incomplete type declarations.
7316 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
7319 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7321 * a-fihema.ads, a-fihema.adb: Unit removed.
7322 * a-undesu.ads, a-undesu.adb: New unit implementing
7323 Ada.Unchecked_Deallocate_Subpool.
7324 * einfo.adb: Remove Associated_Collection from the node usage.
7325 Add Finalization_Master to the node usage.
7326 (Associated_Collection): Removed.
7327 (Finalization_Master): New routine.
7328 (Set_Associated_Collection): Removed.
7329 (Set_Finalization_Master): New routine.
7330 (Write_Field23_Name): Remove Associated_Collection from the output. Add
7331 Finalization_Master to the output.
7332 * einfo.ads: Remove attribute Associated_Collection and its uses in
7334 Add new attribute Finalization_Master along with its uses in entitites.
7335 (Associated_Collection): Removed along with its pragma import.
7336 (Finalization_Master): New routine along with a pragma import.
7337 (Set_Associated_Collection): Removed along with its pragma import.
7338 (Set_Finalization_Master): New routine along with a pragma import.
7339 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
7340 Build_Finalization_Collection with Build_Finalization_Master.
7341 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
7342 before the bodies of the predefined routines. Add comment explaining
7343 this. Replace call to Build_Finalization_Collection with
7344 Build_Finalization_Master.
7345 (Freeze_Type): Replace call to Build_Finalization_Collection with
7346 Build_Finalization_Master.
7347 (Make_Finalize_Address_Body): Comment reformatting.
7348 (Make_Predefined_Primitive_Specs): Code reformatting.
7349 (Stream_Operation_OK): Update comment mentioning finalization
7350 collections. Replace RE_Finalization_Collection with
7351 RE_Finalization_Master.
7352 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
7353 Associated_Collection with Finalization_Master. Replace call to
7354 Build_Finalization_Collection with Build_Finalization_Master.
7355 (Expand_Allocator_Expression): Replace call to Associated_Collection
7356 with Finalization_Master. Replace call to Set_Associated_Collection with
7357 Set_Finalization_Master. Remove the generation of
7358 Set_Finalize_Address_Ptr.
7359 (Expand_N_Allocator): Replace call to Associated_Collection with
7360 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
7361 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
7362 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
7363 comment on usage. Replace call to Needs_BIP_Collection with
7364 Needs_BIP_Finalization_Master Remplace BIP_Collection with
7365 BIP_Finalization_Master. Update all comments which mention finalization
7366 collections. Replace Associated_Collection with
7367 Finalization_Master. Replace Build_Finalization_Collection with
7368 Build_Finalization_Master.
7369 (BIP_Formal_Suffix): Update BIP_Collection's case.
7370 (Build_Heap_Allocator): Update the related comment. Rename local
7371 variable Collect to Fin_Mas_Id and update its occurrences. Update
7372 comments which mention finalization collections. Replace
7373 Set_Associated_Collection with Set_Finalization_Master.
7374 (Expand_Call): Update the code which detects a special piece of library
7376 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
7377 Add_Collection_Actual_To_Build_In_Place_Call with
7378 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
7379 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
7380 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
7381 Add_Collection_Actual_To_Build_In_Place_Call with
7382 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7383 (Make_Build_In_Place_Call_In_Assignment): Replace call to
7384 Add_Collection_Actual_To_Build_In_Place_Call with
7385 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7386 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7387 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
7388 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7389 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
7390 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
7391 Replace call to Set_Associated_Collection with Set_Finalization_Master.
7392 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
7393 Replace the call to Associated_Collection with Finalization_Master.
7394 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
7395 Update the way finalization master names are generated. Update the
7396 retrieval of the correct access type which will carry the pool and
7398 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
7399 (Make_Finalize_Address_Body): Abstract types do not need
7400 Finalize_Address. Code reformatting.
7401 (Make_Finalize_Address_Stmts): Update comment on usage.
7402 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7403 (Process_Declarations): Update comments.
7404 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
7405 Build_Finalization_Master. Update associated comment.
7406 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7407 * exp_ch13.adb: Update comments which mention finalization collections.
7408 (Expand_N_Free_Statement): Replace the call to Associated_Collection
7409 with Finalization_Master.
7410 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
7411 create calls to routines Allocate_Any_Controlled and
7412 Deallocate_Any_Controlled.
7413 (Find_Finalize_Address): New routine.
7414 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
7416 (Requires_Cleanup_Actions): Update the comment on freeze node
7418 * exp_util.ads: Remove comment on generated code for
7419 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
7420 is better to simply look in the body.
7421 * freeze.adb (Freeze_All): Update the comment of finalization
7422 collections. Replace the call to Associated_Collection with
7423 Finalization_Master. Replace the call to Build_Finalization_Collection
7424 with Build_Finalization_Master.
7425 * impunit.adb: Add a-undesu and s-stposu to the list of units.
7426 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
7428 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
7429 Ada.Finalization. Add processing for children of System.Storage_Pools.
7430 * rtsfind.ads: Remove the naming of second level children of
7432 Remove Ada_Finalization_Heap_Management from the list of units.
7433 Remove subtype Ada_Finalization_Child.
7434 Remove the following subprogram entities:
7438 RE_Finalization_Collection
7439 RE_Finalization_Collection_Ptr
7440 RE_Set_Finalize_Address_Ptr
7442 Add the naming of second level children of System.Storage_Pools.
7443 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
7445 Add subtype System_Storage_Pools_Child.
7446 Add the following subprogram entities to System.Finalization_Masters:
7448 RE_Finalization_Master
7449 RE_Finalization_Master_Ptr
7451 Add the following subprogram entities to System.Storage_Pools.Subpools:
7453 RE_Allocate_Any_Controlled
7454 RE_Deallocate_Any_Controlled
7455 RE_Root_Storage_Pool_With_Subpools
7459 Move the following subprogram entities from
7460 Ada.Finalization.Heap_Management to System.Finalization_Masters:
7462 RE_Add_Offset_To_Address
7467 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
7468 Set_Associated_Collection with Set_Finalization_Master.
7469 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
7470 BIP_Finalization_Master is created.
7471 * s-finmas.adb: New unit System.Finalization_Masters.
7472 * s-finmas.ads: New unit System.Finalization_Masters.
7473 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
7474 * s-stposu.ads, s-stposu.adb: New unit implementing
7475 System.Storage_Pools.Subpools.
7477 2011-08-29 Bob Duff <duff@adacore.com>
7479 * tbuild.adb: Add assertion.
7481 2011-08-29 Thomas Quinot <quinot@adacore.com>
7483 * s-pooglo.adb: Minor reformatting.
7485 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7487 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
7488 an indexed component of a packed array whose element type is a record
7489 with a representation clause different from that of the right-hand
7490 side, generate a temporary to minimuze the number of bit-field
7491 operations generated.
7493 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7495 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
7496 declarations, and thus are likely insertion points for actions.
7498 2011-08-29 Bob Duff <duff@adacore.com>
7500 * einfo.ads: Minor comment fix.
7502 2011-08-29 Robert Dewar <dewar@adacore.com>
7504 * frontend.adb, gnat1drv.adb: Minor reformatting.
7506 2011-08-29 Tristan Gingold <gingold@adacore.com>
7508 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
7509 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
7510 space in front of the header.
7512 2011-08-29 Johannes Kanig <kanig@adacore.com>
7514 * frontend.adb (Frontend): Exit after creating Standard package when
7515 -gnatd.H is present.
7516 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
7519 2011-08-29 Robert Dewar <dewar@adacore.com>
7521 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
7522 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
7523 snames.ads-tmpl: Minor reformatting.
7525 2011-08-29 Philippe Gil <gil@adacore.com>
7527 * prj.adb (Reset_Units_In_Table): New procedure.
7528 Reset units to avoid access to freed memory.
7530 2011-08-29 Thomas Quinot <quinot@adacore.com>
7532 * get_scos.adb: When reading a P statement SCO without a pragma name
7533 (from an older ALI file), ensure that the Pragma_Name component is set
7534 to Unknown_Pragma (not left uninitialized).
7536 2011-08-29 Vincent Celier <celier@adacore.com>
7538 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
7539 modified to compute correctly the object path of a SAL project that is
7540 extending another library project.
7541 (Write_Path_File): New procedure.
7542 * makeutl.ads (Directories): New table moved from Buildgpr
7543 (Get_Directories): New procedure moved from Buildgpr
7544 (Write_Path_File): New procedure
7545 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
7546 paths before binding SALs, instead of Set_Ada_Paths.
7547 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
7549 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
7550 (Current_Source_Path_File_Of): New function
7551 (Set_Current_Object_Path_File_Of): New procedure
7552 (Current_Source_Object_File_Of): New function
7553 (Set_Current_Object_Path_File_Of): New procedure
7554 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
7555 (Current_Source_Path_File_Of): New function
7556 (Set_Current_Object_Path_File_Of): New procedure
7557 (Current_Source_Object_File_Of): New function
7558 (Set_Current_Object_Path_File_Of): New procedure
7560 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7562 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7563 packed entity, use a bit-field assignment only if there is no change of
7566 2011-08-29 Thomas Quinot <quinot@adacore.com>
7568 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7569 Is_RTU instead of using Chars comparisons.
7571 2011-08-29 Thomas Quinot <quinot@adacore.com>
7573 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7574 temporary object if the actual is constrained, and the discriminants
7575 read from the stream don't match.
7577 2011-08-29 Tristan Gingold <gingold@adacore.com>
7579 * sem_attr.adb, exp_attr.adb: Add handling of
7580 Attribute_System_Allocator_Alignment
7581 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7582 Attribute_System_Allocator_Alignment.
7583 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7584 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7585 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7586 get_target_system_allocator_alignment.
7588 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7590 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7593 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7595 * exp_ch3.adb (In_Runtime): Fix typo.
7597 2011-08-29 Bob Duff <duff@adacore.com>
7599 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7601 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7603 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7604 and a separate tag assignment is generated, ensure that the tag
7605 assignment is analyzed.
7607 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7609 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7610 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7611 of statement lists that may contain local declarations.
7612 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7613 duplicate the triggering statements needed for the expansion of this
7614 construct, when the trigger is a dispatching call to a synchronized
7617 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7619 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7620 * bindgen.adb: Add comments.
7621 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7624 2011-08-29 Robert Dewar <dewar@adacore.com>
7626 * exp_attr.adb: Minor reformatting.
7627 Minor code reorganization and commenting.
7628 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7631 2011-08-29 Thomas Quinot <quinot@adacore.com>
7633 * get_scos.adb: Ignore chaining indicators not currently supported
7636 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7638 * system.ads: Minor editing.
7640 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7642 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7644 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7645 Attribute_Elab_Subp_Body.
7646 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7647 * sem_util.adb: Update comments.
7649 2011-08-29 Thomas Quinot <quinot@adacore.com>
7651 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7652 pragma name for each SCO statement corresponding to a pragma.
7654 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7656 * opt.ads: Minor editing.
7658 2011-08-29 Yannick Moy <moy@adacore.com>
7660 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7661 that only made sense for CodePeer mode.
7663 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7665 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7666 which is no longer used.
7667 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7668 handling of the 64-bit division check.
7669 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7671 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7674 2011-08-29 Thomas Quinot <quinot@adacore.com>
7676 * get_scos.adb: Minor reformatting.
7678 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7680 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7681 statement list is wrapped in a block, the block is explicitly analyzed
7682 in order to properly redecorate the entities and create a servicing
7685 2011-08-29 Tristan Gingold <gingold@adacore.com>
7687 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7688 (Set_Zero_Cost_Handling): Remove.
7690 2011-08-29 Thomas Quinot <quinot@adacore.com>
7692 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7694 2011-08-29 Geert Bosch <bosch@adacore.com>
7696 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7697 instruction, as the latter may produce -0.0, which is not a valid VAX
7699 (Neg_G): Likewise for VAX F float.
7701 2011-08-29 Robert Dewar <dewar@adacore.com>
7703 * exp_util.adb: Minor reformatting.
7705 2011-08-29 Yannick Moy <moy@adacore.com>
7707 * sem_ch3.adb: Minor comment update.
7709 2011-08-29 Thomas Quinot <quinot@adacore.com>
7711 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7714 2011-08-29 Thomas Quinot <quinot@adacore.com>
7716 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7717 current statement sequence on a generic instantiation or a subprogram
7720 2011-08-29 Robert Dewar <dewar@adacore.com>
7722 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7725 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7727 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7728 Correct the check which involves the freeze node of a controlled or
7729 access-to-controlled type.
7731 2011-08-29 Geert Bosch <bosch@adacore.com>
7733 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7735 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7738 2011-08-29 Yannick Moy <moy@adacore.com>
7740 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7741 for every index type and component type that is not a subtype_mark.
7742 (Process_Subtype): Set Etype of subtype.
7744 2011-08-29 Robert Dewar <dewar@adacore.com>
7746 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7747 reorganization. Minor reformatting.
7749 2011-08-29 Steve Baird <baird@adacore.com>
7751 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7752 for CodePeer and ALFA modes.
7754 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7756 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7757 that comes from an enclosing scope if it is not the renaming of an
7758 actual, to handle properly a spurious ambiguity in an instance.
7760 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7762 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7763 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
7764 use it instead of the Esize of the first parameter.
7765 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7767 <Size>: Likewise. Call it for composite types on the RM size.
7769 2011-08-29 Yannick Moy <moy@adacore.com>
7771 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7772 * sem_util.adb (Unique_Name): Correct behaviour for names of
7775 2011-08-29 Yannick Moy <moy@adacore.com>
7777 * sem_prag.adb (Check_Precondition_Postcondition): In formal
7778 verification mode, analyze pragma expression for correctness, for
7779 pre/post on library-level subprogram, as it is not expanded later.
7781 2011-08-29 Yannick Moy <moy@adacore.com>
7783 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7784 in formal verification.
7786 2011-08-29 Thomas Quinot <quinot@adacore.com>
7788 * sem_util.adb: Minor reformatting.
7789 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7791 * par_sco.ads, par_sco.adb: Update comments.
7793 2011-08-29 Yannick Moy <moy@adacore.com>
7795 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7796 associated getter/setter.
7797 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7799 2011-08-29 Vincent Celier <celier@adacore.com>
7801 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7802 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7803 with declarations for Language_Kind and Dependency_Kind for Ada.
7804 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7805 (Process_Compiler): Take into account the new attributes Dependency_Kind
7807 (Check_Configuration): Check if language kind is unit based, not if the
7808 language name is Ada.
7809 (Process_Exceptions_Unit_Based): Ditto
7810 (Add_Language): Remove default additions of language and dependency kind
7811 * prj.ads: Minor comment change
7812 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7814 2011-08-29 Johannes Kanig <kanig@adacore.com>
7816 * debug.adb: Update comments.
7818 2011-08-24 Joseph Myers <joseph@codesourcery.com>
7820 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7821 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7822 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7823 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7824 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7826 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7828 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7829 (GNATLIBCFLAGS_FOR_C): Replace
7830 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7831 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7832 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7833 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7835 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7837 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7839 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7841 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7843 2011-08-05 Nicolas Roche <roche@adacore.com>
7845 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7846 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7848 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7850 2011-08-05 Matthew Heaney <heaney@adacore.com>
7852 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7853 subprogram bodies declared out-of-order.
7855 2011-08-05 Yannick Moy <moy@adacore.com>
7857 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7858 entities directly in package Standard, otherwise skip the standard
7861 2011-08-05 Robert Dewar <dewar@adacore.com>
7863 * a-cbmutr.adb: Minor reformatting
7864 (Allocate_Node): refactor node allocation algorithm
7866 2011-08-05 Robert Dewar <dewar@adacore.com>
7868 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7869 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7871 (Analyze_Pragma, case Check_Policy): Ditto.
7872 * sem_prag.ads (Check_Disabled): New function
7873 * snames.ads-tmpl: Add Name_Disable.
7875 2011-08-05 Robert Dewar <dewar@adacore.com>
7877 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7878 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7880 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7882 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7883 that appears in a generic formal part and applies to a formal
7886 2011-08-05 Robert Dewar <dewar@adacore.com>
7888 * a-cbmutr.ads: Minor reformatting.
7890 2011-08-05 Matthew Heaney <heaney@adacore.com>
7892 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7893 to check count, check sign of value instead.
7894 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7895 (Copy_Subtree): allocate copy of source element
7896 (Equal_Subtree): compare elements, not access objects
7898 2011-08-05 Vincent Celier <celier@adacore.com>
7900 * gnat_ugn.texi: Fix VMS alternative.
7902 2011-08-05 Thomas Quinot <quinot@adacore.com>
7904 * sem_ch11.adb: Add comment.
7906 2011-08-05 Robert Dewar <dewar@adacore.com>
7908 * exp_util.adb: Minor comment fix.
7910 2011-08-05 Robert Dewar <dewar@adacore.com>
7912 * scng.adb (Error_Unterminated_String): Improve flag position when
7915 2011-08-05 Matthew Heaney <heaney@adacore.com>
7917 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7919 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7920 multiway tree containers.
7922 2011-08-05 Robert Dewar <dewar@adacore.com>
7924 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7925 * stylesw.adb: Implement -gnatyC to control comment spacing
7926 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7928 * usage.adb: Add line for -gnatyC.
7930 2011-08-05 Robert Dewar <dewar@adacore.com>
7932 * gnat_ugn.texi: Document -gnatyC.
7933 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7934 synonym for COMMENTS2).
7936 2011-08-05 Robert Dewar <dewar@adacore.com>
7938 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7939 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7940 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7941 a-comutr.ads, lib-xref.adb: Minor reformatting.
7943 2011-08-05 Robert Dewar <dewar@adacore.com>
7945 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7946 warning if there is an exception handler present.
7948 2011-08-05 Pascal Obry <obry@adacore.com>
7950 * a-iteint.ads: Fix copyright year.
7952 2011-08-05 Thomas Quinot <quinot@adacore.com>
7954 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7955 statement SCO for a USE clause or a representation clause.
7957 2011-08-05 Yannick Moy <moy@adacore.com>
7959 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7960 between body and spec for stub.
7961 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7962 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7963 pragma precondition or postcondition, for which the enclosing
7964 subprogram or package in the AST is not the desired one, return empty.
7966 2011-08-05 Thomas Quinot <quinot@adacore.com>
7968 * g-expect.adb: Minor reformatting.
7970 2011-08-05 Bob Duff <duff@adacore.com>
7972 * a-fihema.adb: Comment out OS_Lib.
7974 2011-08-05 Matthew Heaney <heaney@adacore.com>
7976 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7977 (unbounded multiway tree containers) and a-iteint.ads.
7978 * a-comutr.ads, a-comutr.adb:
7979 This is the new Ada 2012 unit for unbounded multiway tree containers
7980 * a-cimutr.ads, a-cimutr.adb
7981 This is the new Ada 2012 unit for indefinite multiway tree containers
7982 * a-iteint.ads: New file.
7984 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7986 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7988 2011-08-05 Bob Duff <duff@adacore.com>
7990 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7992 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7994 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7996 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7997 general indexing aspects of Ada2012. Called when analyzing indexed
7998 components when other interpretations fail.
7999 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
8000 in an expression context where overloading is meaningful. This excludes
8001 the occurrence in an aspect specification (efficiency only).
8002 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
8003 related to iterators can be set by an attribute specification, but
8005 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
8006 Constant_Indexing and Variable_Indexing.
8007 (Check_Indexing_Functions): New procedure to perform legality checks.
8008 Additional semantic checks at end of declarations.
8010 2011-08-05 Sergey Rybin <rybin@adacore.com>
8012 * tree_io.ads: Update ASIS_Version_Number because of the change of the
8013 order of calling Tree_Write/Tree_Read routines made for aspects.
8015 2011-08-05 Bob Duff <duff@adacore.com>
8017 * a-fihema.adb (Finalize): Fix race condition.
8019 2011-08-05 Yannick Moy <moy@adacore.com>
8021 * sem_ch12.adb (Analyze_Package_Instantiation,
8022 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
8025 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8027 * sem_type.adb (Specific_Type): in an instance, the type-specific
8028 operand of an equality check that involves null may have a private
8029 type. Use full view to determine legality of construct.
8031 2011-08-05 Vincent Celier <celier@adacore.com>
8033 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8034 delete or close the file when the call to gnatmake was successful.
8036 2011-08-05 Yannick Moy <moy@adacore.com>
8038 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
8039 Global_Discard_Names.
8041 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8043 * sinfo.ads: comments on use of entity field for aspect specifications.
8045 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8047 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
8048 node is not itself an entity but a selected component, it is a
8049 rewritten parameterless call to an en enclosing synchronized operation,
8050 and this expansion will be performed again in the instance, so there is
8051 no global information to preserve.
8053 2011-08-05 Javier Miranda <miranda@adacore.com>
8055 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
8056 for renamings of predefined primitives.
8057 (In_Predef_Prims_DT): New subprogram.
8059 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8061 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
8062 possible interpretation of name is a reference type, add an
8063 interpretation that is the designated type of the reference
8064 discriminant of that type.
8065 * sem_res.adb (resolve): If the interpretation imposed by context is an
8066 implicit dereference, rewrite the node as the deference of the
8067 reference discriminant.
8068 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
8069 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
8070 parent type or base type.
8071 * sem_ch4.adb (Process_Indexed_Component,
8072 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
8073 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
8074 Check for implicit dereference.
8075 (List_Operand_Interps): Indicate when an implicit dereference is
8077 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
8079 2011-08-05 Thomas Quinot <quinot@adacore.com>
8081 * scos.ads: Update documentation of SCO table. Pragma statements can now
8082 be marked as disabled (using 'p' instead of 'P' as the statement kind).
8083 * par_sco.ads, par_sco.adb: Implement the above change.
8084 (Process_Decisions_Defer): Generate a P decision for the first parameter
8085 of a dyadic pragma Debug.
8086 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
8088 * put_scos.adb: Code simplification based on above change.
8090 2011-08-05 Robert Dewar <dewar@adacore.com>
8092 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
8093 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
8094 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
8095 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
8097 2011-08-05 Bob Duff <duff@adacore.com>
8099 * a-stunau.ads, g-spipat.adb: Update comments.
8101 2011-08-05 Bob Duff <duff@adacore.com>
8103 * a-fihema.ads: Minor comment fix.
8104 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
8106 (Attach, Detach): Remove some unnecessary code.
8107 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
8109 2011-08-05 Bob Duff <duff@adacore.com>
8111 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
8112 allocation for Objects component. This simplifies the code somewhat. It
8113 is also a little more efficient in the not-so-unusual case where there
8114 are no controlled objects allocated.
8115 Make Finalization_Started flag atomic.
8116 (Finalize): Avoid unnecessary detachment of items from the list.
8117 (pcol): Minor cleanup.
8119 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8121 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
8122 package whose name is the same as that of the generic unit, or its
8125 2011-08-05 Bob Duff <duff@adacore.com>
8127 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
8128 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
8129 Minor comment fixes.
8131 2011-08-05 Arnaud Charlet <charlet@adacore.com>
8133 * make.adb (Linking_Phase): No longer need to set source search path
8134 before calling gnatlink in CodePeer mode.
8135 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
8136 gcc in CodePeer mode, since the binder generated file no longer has a
8138 * switch.ads, switch.adb (Is_Language_Switch): Removed.
8139 * switch-c.adb: Update comment.
8141 2011-08-05 Thomas Quinot <quinot@adacore.com>
8143 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
8145 2011-08-05 Nicolas Roche <roche@adacore.com>
8147 * gnat_ugn.texi: Fix minor syntax error issue.
8149 2011-08-05 Vincent Celier <celier@adacore.com>
8151 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8152 delete or close the file when the call to gnatmake returns a non
8153 successful return code.
8155 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8157 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
8158 check, indicate that the copy of the original node does not come from
8159 source, to prevent an infinite recursion of the expansion.
8161 2011-08-05 Johannes Kanig <kanig@adacore.com>
8163 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
8164 VC generation for subprogram bodies.
8166 2011-08-05 Yannick Moy <moy@adacore.com>
8169 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
8170 the base type with the smallest allowed base type.
8172 2011-08-05 Sergey Rybin <rybin@adacore.com>
8174 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
8177 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8179 * sem_ch12.ads: minor comment updates.
8181 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8183 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
8184 instantiation and a formal package the compiler generates a package
8185 renaming declaration so that the generic name within the declaration
8186 is interpreted as a renaming of the instance. At the end of a formal
8187 package declaration, this renaming must become invisible.
8189 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8191 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
8192 comparison and rely on concrete entities instead.
8194 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8196 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
8197 and discriminants, to indicate that the type has an access discriminant
8198 that supports implicit dereference.
8199 * snames.ads-tmpl: Add names of aspects and attributes related to
8200 Ada2012 iterators: constant_indexing, default_iterator,
8201 iterator_element, implicit_dereference, variable_indexing.
8202 * aspects.ads, aspects.adb: entries for iterator-related aspects.
8203 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
8204 iterator-related aspects.
8205 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
8207 2011-08-05 Sergey Rybin <rybin@adacore.com>
8209 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
8210 metrics in gnatmetric to cover new kinds of coupling mentrics.
8212 2011-08-05 Steve Baird <baird@adacore.com>
8214 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
8215 of calling the user-defined main subprogram.
8216 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
8217 is set) Call_Main_Subprogram ahead of, as opposed to
8219 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
8220 generation of a "with" of the user-defined main subprogram.
8221 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
8222 (which is now called from Gen_Main instead).
8224 2011-08-05 Emmanuel Briot <briot@adacore.com>
8226 * projects.texi: Added reference to the Makefile package.
8228 2011-08-05 Thomas Quinot <quinot@adacore.com>
8230 * exp_ch7.adb: Minor comment rewording.
8232 2011-08-05 Ed Falis <falis@adacore.com>
8234 * env.c: Fix comment.
8236 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8238 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
8239 character comparison and rely on concrete entities instead.
8241 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8243 * sem_ch3.adb: (Check_Private_Overriding): better error message,
8244 suggested by AI95-0068.
8246 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8248 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
8249 the two potential initialization calls. This accounts for any
8250 access-before-elaboration checks which may precede the initialization
8252 (Next_Suitable_Statement): New routine. Returns the next real statement
8253 after the input node while skipping generated checks.
8254 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
8255 with comment on usage.
8256 Do not generate Elaborate_All when the trigger is a finalization call
8257 coming from a type init proc.
8258 (Check_Elab_Call): Propagate the initialization procedure context to
8259 subsequent calls to Check_A_Call.
8260 (Check_Internal_Call_Continue): Propagate the initialization procedure
8261 context to subsequent calls to Check_Elab_Call.
8262 (Is_Finalization_Procedure): New routine. Returns True if the input
8263 entity denotes a [Deep_]Finalize routine.
8264 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
8265 along with comment on usage.
8267 2011-08-05 Vadim Godunko <godunko@adacore.com>
8269 * s-atocou.ads: Add list of supported platforms.
8271 2011-08-05 Yannick Moy <moy@adacore.com>
8273 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
8275 * opt.ads (Disable_ALI_File): new Boolean flag
8276 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
8278 2011-08-05 Ed Falis <falis@adacore.com>
8280 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
8281 environ is properly defined.
8283 2011-08-05 Vincent Celier <celier@adacore.com>
8285 * make.adb (Compilation_Phase): Exit immediately when all objects have
8286 been found up to date, to avoid multiple exit messages.
8287 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
8288 same project for languages with no compiler.
8289 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
8291 2011-08-05 Robert Dewar <dewar@adacore.com>
8293 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
8294 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
8295 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
8296 s-atocou-builtin.adb: Minor reformatting.
8298 2011-08-05 Yannick Moy <moy@adacore.com>
8300 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
8301 if the node to wrap is a pragma check, this node and enclosed
8302 expression are not expanded, so do not apply any transformations here.
8303 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
8304 introducing transient scopes.
8306 2011-08-05 Jose Ruiz <ruiz@adacore.com>
8308 * adaint.c (__gnat_set_writable, __gnat_set_readable,
8309 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
8310 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
8311 routine is available, so we use the default implementation of these
8313 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
8314 support for copying attributes on VxWorks 6.
8316 2011-08-05 Yannick Moy <moy@adacore.com>
8318 * debug.adb: Remove use of -gnatd.D.
8319 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
8320 * opt.ads: Simplify variables for ALFA mode, to keep one only
8321 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
8324 2011-08-05 Vincent Celier <celier@adacore.com>
8326 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
8327 Builder'Default_Switches.
8329 2011-08-05 Vincent Celier <celier@adacore.com>
8331 * makeusg.adb: Add lines for --create-map-file switches.
8333 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8335 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
8336 profile is incomplete and the full view is available, replace it with
8338 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
8339 incomplete, freezing the subprogram is delayed until the full view is
8341 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
8342 fixed-point multiplication operator and the predefined operator is
8343 resolved in favor of the user-defined one.
8345 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8347 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
8350 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8352 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
8353 whether a type lacks user-defined Read or Write operations, or has a
8354 component that lacks them.
8355 * sem_attr.adb (Check_Stream_Attribute): if restriction
8356 No_Default_Stream_Attributes is active, verify that all subcomponent
8357 types of the target have user-defined stream operations, and report
8359 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
8360 * exp_strm.adb: Build_Elementary_Input_Call,
8361 Build_Elementary_Write_Call): remove checks for restriction
8362 No_Default_Stream_Attributes, now checked in semantics.
8364 2011-08-04 Vincent Celier <celier@adacore.com>
8366 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
8367 switches on the command line, look for all valid --RTS switches in the
8368 Builder switches and for each language use the first runtime name found
8369 to invoke gprconfig.
8370 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
8371 command line and there is no auto-configuration.
8372 (Runtime_Name_Set_For): New function.
8374 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8376 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
8377 elaborate initialization expression for variable Abort when processing
8378 a package body or a declaration.
8379 (Create_Finalizer): Propagate the package context when creating the
8380 exception-related variables.
8381 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
8382 For_Package along with usage comment.
8384 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8386 * gcc-interface/Makefile.in: Clean up targets.
8387 Enable new package for atomic counters and copy-on-write implementation
8388 of unbounded strings on x86 platforms.
8389 * gcc-interface/Make-lang.in: Update dependencies.
8391 2011-08-04 Robert Dewar <dewar@adacore.com>
8393 * exp_ch7.adb: Minor reformatting.
8395 2011-08-04 Robert Dewar <dewar@adacore.com>
8397 * exp_strm.adb: Minor reformatting.
8399 2011-08-04 Vadim Godunko <godunko@adacore.com>
8401 * s-atocou.adb: Replace by dummy version and use on targets where atomic
8402 operations are not supported.
8403 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
8404 * s-atocou-x86.adb: New file.
8405 * Makefile.rtl: Add s-atocou.o file
8407 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8409 * make.adb (Compile): Move setting of CodePeer_Mode to ...
8410 (Compilation_Phase): ... here.
8411 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
8413 2011-08-04 Thomas Quinot <quinot@adacore.com>
8415 * Make-generated.in: Fix minor typo in comment.
8417 2011-08-04 Thomas Quinot <quinot@adacore.com>
8419 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
8422 2011-08-04 Robert Dewar <dewar@adacore.com>
8424 * a-coinho.adb: Minor reformatting.
8426 2011-08-04 Robert Dewar <dewar@adacore.com>
8428 * a-coinho.ads: Minor reformatting.
8430 2011-08-04 Vadim Godunko <godunko@adacore.com>
8432 * s-atocou.ads, s-atocou.adb: New files.
8433 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
8434 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
8435 direct use of GCC's atomic builtins and replace them by use of new
8436 atomic counter package.
8438 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8440 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
8442 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8444 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
8445 with a call to Get_External_Tag.
8446 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
8447 subprogram usage. Remove the guard against package declarations and
8448 bodies since Build_Cleanup_Statements is no longer invoked in that
8450 (Build_Components): Initialize Tagged_Type_Stmts when the context
8451 contains at least one library-level tagged type.
8452 (Build_Finalizer): New local variables Has_Tagged_Types and
8453 Tagged_Type_Stmts along with associated comments on usage. Update the
8454 logic to include tagged type processing.
8455 (Create_Finalizer): Insert all library-level tagged type unregistration
8456 code before the jump block circuitry.
8457 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
8458 (Expand_N_Package_Declaration): Remove the call to
8459 Build_Cleanup_Statements.
8460 (Process_Tagged_Type_Declaration): New routine. Generate a call to
8461 unregister the external tag of a tagged type.
8462 (Processing_Actions): Reimplemented to handle tagged types.
8463 (Process_Declarations): Detect the declaration of a library-level
8464 tagged type and carry out the appropriate actions.
8465 (Unregister_Tagged_Types): Removed. The machinery has been directly
8466 merged with Build_Finalizer.
8468 2011-08-04 Robert Dewar <dewar@adacore.com>
8470 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
8471 gnatls.adb, exp_ch3.adb: Minor reformatting.
8473 2011-08-04 Marc Sango <sango@adacore.com>
8475 * sem_attr.adb (Analyze_Attribute): Replace the message
8476 "invisible attribute of}" of the spark restriction violation in
8477 attribute reference by the simple message "invisible attribute of type".
8478 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
8479 two insertion characters: '&' and '}'.
8481 2011-08-04 Vadim Godunko <godunko@adacore.com>
8483 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
8484 * a-coinho.ads, a-coinho.adb: New file.
8485 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
8487 2011-08-04 Nicolas Roche <roche@adacore.com>
8489 * alfa_test.adb: Not all ali files are containing alfa information even
8490 if compiled with -gnatd.F. So suppress warning about missing ALFA
8493 2011-08-04 Yannick Moy <moy@adacore.com>
8495 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
8497 * put_alfa.adb: Check that scope name is not empty.
8499 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8501 * exp_ch3.adb (Stream_Operation_Ok): new predicate
8502 Needs_Elementary_Stream_Operation, to determine whether user-defined
8503 Read and Write attributes are available for the elementary components
8504 of the given type. If only the predefined attributes are available,
8505 then when restriction No_Default_Stream_Attributes is active the
8506 predefined stream attributes for the composite type cannot be created.
8508 2011-08-04 Robert Dewar <dewar@adacore.com>
8510 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
8511 Put routines in alpha order
8513 2011-08-04 Jose Ruiz <ruiz@adacore.com>
8515 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
8516 * gcc-interface/Make-lang.in: Update dependencies.
8518 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8520 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
8521 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
8524 2011-08-04 Robert Dewar <dewar@adacore.com>
8526 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
8527 lib-xref-alfa.adb: Minor reformatting.
8529 2011-08-04 Marc Sango <sango@adacore.com>
8531 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
8532 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
8533 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
8536 2011-08-04 Tristan Gingold <gingold@adacore.com>
8538 * bindgen.adb (Gen_Adainit_C): Remove.
8539 (Gen_Adafinal_C): Ditto.
8540 (Gen_Elab_Externals_C): Ditto.
8541 (Gen_Elab_Calls_C): Ditto.
8542 (Gen_Elab_Order_C): Ditto.
8543 (Gen_Elab_Defs_C): Ditto.
8544 (Gen_Finalize_Library_C): Ditto.
8545 (Gen_Finalize_Library_Defs_C): Ditto.
8546 (Gen_Main_C): Ditto.
8547 (Gen_Output_File_C): Ditto.
8548 (Gen_Restrictions_C): Ditto.
8549 (Gen_Versions_C): Ditto.
8550 (Write_Info_Ada_C): Ditto.
8551 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
8552 (Gen_Output_File): Do not force Ada_Bind_File anymore.
8553 Always call Gen_Output_File_Ada.
8554 * gnatlink.adb (Begin_Info): Now a constant.
8556 (Ada_Bind_File): Remove
8557 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
8558 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8559 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8560 * opt.ads (Ada_Bind_File): Remove.
8562 2011-08-04 Thomas Quinot <quinot@adacore.com>
8564 * projects.texi: Document target-specific directory in default project
8567 2011-08-04 Thomas Quinot <quinot@adacore.com>
8569 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8572 2011-08-04 Yannick Moy <moy@adacore.com>
8574 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8575 opt.ads, lib-xref.ads: Code clean up.
8577 2011-08-04 Yannick Moy <moy@adacore.com>
8579 * gnat_rm.texi: Update description of Test_Case
8580 * gnat_ugn.texi: Typo.
8582 2011-08-04 Ed Falis <falis@adacore.com>
8584 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8586 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8588 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8589 it is of type Root_Controlled. This action eliminates fields Prev and
8590 Next from type equality.
8592 2011-08-04 Yannick Moy <moy@adacore.com>
8594 * lib-xref-alfa.adb: Correct typo.
8596 2011-08-04 Matthew Heaney <heaney@adacore.com>
8598 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8601 2011-08-04 Yannick Moy <moy@adacore.com>
8603 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8604 (Analyze_Pragma): allow static string expression for name of Test_Case,
8605 instead of simply string literals.
8606 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8609 2011-08-04 Vincent Celier <celier@adacore.com>
8611 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8612 case suffixes to find truncated main sources.
8614 2011-08-04 Tristan Gingold <gingold@adacore.com>
8616 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8617 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8618 (Compute_Current_Task): Ditto.
8620 2011-08-04 Tristan Gingold <gingold@adacore.com>
8622 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8624 2011-08-04 Yannick Moy <moy@adacore.com>
8626 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8627 library-level constant.
8628 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8629 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8630 used as selector of parameter association, in ALFA mode.
8632 2011-08-04 Robert Dewar <dewar@adacore.com>
8634 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8635 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8638 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8640 * make.adb (Linking_Phase): Set source search path before calling
8641 gnatlink in CodePeer mode.
8643 2011-08-04 Javier Miranda <miranda@adacore.com>
8645 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8646 Remove code which takes care of building TSDs.
8647 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8648 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8649 the accessibility check in VM targets.
8650 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8651 (Building_Static_DT): Now returns false for VM targets.
8652 (Build_VM_TSDs): Removed.
8653 (Expand_Interface_Conversion): Generate missing runtime check for
8654 conversions to interface types whose target type is unknown at compile
8656 (Make_VM_TSD): Add missing code to disable the generation of calls to
8657 Check_TSD if the tagged type is not defined at library level, or not
8658 has a representation clause specifying its external tag, or -gnatdQ is
8660 * exp_disp.ads (Build_VM_TSDs): Removed.
8661 (Make_VM_TSDs): Spec relocated from exp_disp.adb
8662 * sem_disp.adb (Check_Dispatching_Operation): No code required to
8663 register primitives in the dispatch tables in VM targets.
8664 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8665 initialization of class-wide interface objects in VM targets.
8666 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8669 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8671 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8672 when dotnet-ld cannot be found.
8674 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8676 * bindgen.adb: Simplify significantly generation of binder body file in
8678 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8679 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8682 2011-08-04 Yannick Moy <moy@adacore.com>
8684 * sem_prag.adb, sem.ads: Code cleanup.
8686 2011-08-04 Tristan Gingold <gingold@adacore.com>
8688 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8689 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8690 results if possible.
8691 * s-stusta.adb (Print): Adjust after changes in s-stausa.
8692 * gnat_ugn.texi: Update dynamic stack usage section.
8694 2011-08-04 Steve Baird <baird@adacore.com>
8696 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8697 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8698 contains only a call to the user-defined main subprogram.
8699 (Gen_Main_Ada) - If CodePeer_Mode is set, then
8700 call the "wrapper" subprogram instead of directly
8701 calling the user-defined main subprogram.
8703 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8705 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8706 alternatives of a case statement for controlled objects. Rename local
8707 variable A to Dead_Alt.
8708 (Expand_N_If_Statement): Check the then and else statements of an if
8709 statement for controlled objects. Check the then statements of all
8710 elsif parts of an if statement for controlled objects.
8711 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8713 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8714 detects a loop associated with the expansion of an array object.
8715 Augment the processing of the loop statements to account for a possible
8716 wrap done by Process_Statements_For_Controlled_Objects.
8717 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8718 statements and abortable part of an asynchronous select for controlled
8720 (Expand_N_Conditional_Entry_Call): Check the else statements of a
8721 conditional entry call for controlled objects.
8722 (Expand_N_Selective_Accept): Check the alternatives of a selective
8723 accept for controlled objects.
8724 (Expand_N_Timed_Entry_Call): Check the entry call and delay
8725 alternatives of a timed entry call for controlled objects.
8726 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8727 exception handler for controlled objects.
8728 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8729 Add formal parameter Nested_Constructs along with its associated
8731 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8732 Requires_Cleanup_Actions.
8733 (Process_Statements_For_Controlled_Objects): New routine.
8734 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8735 routine. Inspect a node which contains a non-handled sequence of
8736 statements for controlled objects. If such an object is found, the
8737 statements are wrapped in a block.
8739 2011-08-04 Bob Duff <duff@adacore.com>
8741 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8742 need to compare with Class_Wide_Type (T2), in order to get at the
8743 original class-wide type node.
8744 * sem_type.ads (Covers): Improve the comment.
8745 * einfo.ads (Class_Wide_Type): Improve the comment.
8746 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8747 the type of the Deref.
8749 2011-08-04 Yannick Moy <moy@adacore.com>
8751 * gnat_rm.texi: Document that Test_Case pragma can only appear on
8752 separate declarations.
8753 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8754 check identifier of pragma argument.
8755 (Chain_TC): check that no other test case associated to the same entity
8756 share the same name.
8757 (Check_Test_Case): disallow test case inside subprogram body
8758 (Analyze_Pragma): correct call to check identifier and not argument
8759 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8760 function gets name from test case pragma.
8762 2011-08-04 Yannick Moy <moy@adacore.com>
8764 * gnat_rm.texi: Document new pragma and aspect.
8765 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8766 (No_Duplicates_Allowed): new constant array defining whether duplicates
8767 aspects of each kind can appear on the same declaration.
8768 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8769 field, which points to a node holding the previous Spec_PPC_List.
8770 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8771 through the indirection with Contract.
8772 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8773 * par-prag.adb (Prag): do nothing on Test_Case pragma
8774 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8776 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8777 component Ensures of Test_Case.
8778 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8779 (Analyze_Generic_Subprogram_Declaration,
8780 Analyze_Subprogram_Instantiation,
8781 Analyze_Abstract_Subprogram_Declaration,
8782 Analyze_Subprogram_Body_Helper,
8783 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8784 insert contract in subprogram node at point of definition
8786 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8787 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8788 corresponding pragma
8789 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8790 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8791 similar to the analysis of pre/post
8792 (Derive_Subprogram): insert contract in subprogram node at point of
8794 * sem_prag.adb, sem_prag.ads
8795 (Check_Arg_Is_String_Literal, Check_Identifier):
8796 new checking procedures to be called in treatment of pragmas
8797 (Check_Test_Case): new procedure to check that a Test_Case aspect or
8798 pragma is well-formed. This does not check currently that 'Result is
8799 used only in the Ensures component of a Test_Case.
8800 (Analyze_Pragma): add case for Test_Case
8801 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8802 components of a Test_Case.
8803 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8804 expressions in the 3rd (and 4th if present) arguments of a Test_Case
8805 pragma, treated as spec expressions.
8806 (Sig_Flags): add value -1 for Test_Case.
8807 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8808 Get_Requires_From_Test_Case_Pragma): getters for both expression
8809 components of a Test_Case.
8810 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8811 indirection between an entry or [generic] subprogram entity and its
8812 pre/post + test-cases.
8813 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8814 get/set for fields of an N_Contract node.
8815 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8816 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8817 names and pragma for Test_Case.
8818 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8820 2011-08-04 Vincent Celier <celier@adacore.com>
8822 * gnat_ugn.texi: Improve documentation of gnatmake switch
8823 --source-info-file=.
8825 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8827 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8828 type). Initialize Atyp to the appropriate type which is later checked
8829 for completion. Rewrite the assertion associated with private type
8832 2011-08-04 Ed Falis <falis@adacore.com>
8834 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8835 initialize the number of CPUs.
8837 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8839 * sem_type.adb (Disambiguate): New subsidiary routine
8840 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8841 equality on an anonymous access type whose designated type is private
8842 does not lead to an ambiguity with the universal access equality
8843 operator in the body or child units of the defining package. The same
8844 is true for a multiplication operator on a private type completed with
8847 2011-08-04 Javier Miranda <miranda@adacore.com>
8849 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8850 (Normalize_Scalars_Config): Removed.
8852 (Register_Opt_Config_Switches): Remove registering config values of
8853 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8854 (Restore_Opt_Config_Switches): Remove code which restores the values of
8855 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8856 Init_Or_Norm_Scalars.
8857 (Save_Opt_Config_Switches): Remove code which saves values of
8858 Init_Or_Norm_Scalars and Normalize_Scalars.
8859 (Set_Opt_Config_Switches): Remove code which restores config values of
8860 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8861 Init_Or_Norm_Scalars.
8863 2011-08-04 Yannick Moy <moy@adacore.com>
8865 * frontend.adb (Frontend): remove previous patch to avoid full
8866 qualification in ALFA mode.
8867 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8868 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8869 unique name for an entity, which could be used to identify the entity
8870 across compilation units.
8872 2011-08-04 Thomas Quinot <quinot@adacore.com>
8875 (Initialize_Default_Project_Path): Add target specific directory
8876 ($prefix/$target/lib/gnat) in front of project path in all cases
8877 (making gnatmake's behaviour consistent with gprbuild).
8878 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8879 Pass target name from Sdefault to project subsystem.
8880 * gnatls.adb: Show new target specific default project directory.
8882 2011-08-04 Johannes Kanig <kanig@adacore.com>
8884 * cstand.adb: Add Information to Identifier in Standard
8885 (Identifer_For): Set Entity to the corresponding entity
8887 2011-08-04 Sergey Rybin <rybin@adacore.com>
8889 * gnat_ugn.texi: Update doc on gnatcheck.
8891 2011-08-04 Yannick Moy <moy@adacore.com>
8893 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8896 2011-08-04 Yannick Moy <moy@adacore.com>
8898 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8899 performing expansion.
8900 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8901 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8902 it is not called in ALFA mode.
8904 2011-08-04 Emmanuel Briot <briot@adacore.com>
8906 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8907 after all, so removed.
8909 2011-08-04 Sergey Rybin <rybin@adacore.com>
8911 * vms_data.ads: Add missing VMS qualifiers.
8913 2011-08-04 Emmanuel Briot <briot@adacore.com>
8915 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8916 the list of files on the command line after processing it through
8919 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8921 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8922 processing for .NET/JVM. These targets can now benefit from
8923 Raise_From_Controlled_Operation and they share the same processing with
8925 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8926 These targets need transient scopes in order to properly finalize short
8927 lived controlled objects.
8928 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8929 NET/JVM. These targets can now benefit from
8930 Raise_From_Controlled_Operation and they share the same processing with
8933 2011-08-04 Geert Bosch <bosch@adacore.com>
8935 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8937 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8939 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8940 Expand_Record_Aggregate, to determine whether aggregate must be
8941 expanded into assignments. This is the case if the ancestor part is
8942 private, regarless of the setting of the flag Has_Private_Ancestor.
8944 2011-08-04 Ed Falis <falis@adacore.com>
8946 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8948 2011-08-04 Bob Duff <duff@adacore.com>
8950 * sinfo.ads: Fix comment.
8952 2011-08-04 Steve Baird <baird@adacore.com>
8954 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8955 choose a package name in much the same way as is
8956 done for JGNAT when VM_Target /= No_VM, except that
8957 a slightly more distinctive prefix string is used.
8959 2011-08-04 Emmanuel Briot <briot@adacore.com>
8961 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8962 gnatmake command line.
8963 This behavior was never documented (and was supported only because of
8964 an early bug in the code). This case might lead to ambiguous cases
8965 (between unit names and truncated base names without suffixes).
8967 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8969 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8970 Remove the external tag of a tagged type from the internal hash table.
8971 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8972 expanded usage of the routine. Strenghten the check for Is_Master. Add
8973 processing for tagged types.
8974 (Build_Finalizer): Create all the necessary lists used in finalizer
8975 creation when the processed context is a package that may contain
8977 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8978 Requires_Cleanup_Actions.
8979 (Expand_N_Package_Body): Package bodies may need clean up code
8980 depending on whether they contain tagged types.
8981 (Expand_N_Package_Declaration): Package declarations may need clean up
8982 code depending on whether they contain tagged types.
8983 (Unregister_Tagged_Types): New routine. Search through a list of
8984 declarations or statements, looking for non-abstract Ada tagged types.
8985 For each such type, generate code to unregister the external tag.
8986 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8987 Requires_Cleanup_Actions.
8988 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8989 through a list of declarations or statements looking for non-abstract
8990 Ada tagged types or controlled objects.
8991 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8992 Requires_Cleanup_Actions.
8993 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8994 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8997 2011-08-04 Vincent Celier <celier@adacore.com>
8999 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
9000 has Ada sources, not project Project, because if the root project
9001 Project has no sources of its own, all projects will be deemed without
9004 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9006 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
9007 of the No_Param_Proc acc-to-subp type used for initialization of
9008 __gnat_finalize_library_objects so that it's declared at library level
9009 rather than nested inside of the adainit routine.
9011 2011-08-04 Javier Miranda <miranda@adacore.com>
9013 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
9014 if the tagged type has a representation clause which specifies its
9017 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9019 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
9020 Remove previous procedure with that name.
9021 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
9023 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
9024 subtype mark, the ancestor cannot have unknown discriminants.
9025 (Resolve_Record_Aggregate): if the type has invisible components
9026 because of a private ancestor, the aggregate is illegal.
9028 2011-08-04 Vincent Celier <celier@adacore.com>
9030 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
9031 account switches -gnat2005, -gnat12 and -gnat2012.
9033 2011-08-04 Bob Duff <duff@adacore.com>
9035 * s-tasdeb.ads: Minor comment fix.
9037 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9039 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
9041 * switch.ads, switch.adb (Is_Language_Switch): New function.
9043 2011-08-04 Vincent Celier <celier@adacore.com>
9045 * switch-c.adb: Minor comment addition.
9047 2011-08-04 Vincent Celier <celier@adacore.com>
9049 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
9050 ending with '=' is followed by a space (missing file name).
9052 2011-08-04 Pascal Obry <obry@adacore.com>
9054 * g-regist.ads: Fix size of HKEY on x86_64-windows.
9056 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9058 * sem_ch12.adb (Analyze_Associations): New routine
9059 Check_Overloaded_Formal_Subprogram to reject a formal package when
9060 there is a named association or a box initialisation for an overloaded
9061 formal subprogram of the corresponding generic.
9063 2011-08-04 Yannick Moy <moy@adacore.com>
9065 * alfa.ads (ALFA_Xref_Record): add component for type of entity
9066 * get_alfa.adb, put_alfa.adb: Read and write new component of
9068 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
9070 2011-08-04 Pascal Obry <obry@adacore.com>
9072 * urealp.adb: Minor reformatting.
9074 2011-08-04 Tristan Gingold <gingold@adacore.com>
9076 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
9077 Handle the case when Cleanup_Protected_Object returns Empty.
9079 2011-08-04 Yannick Moy <moy@adacore.com>
9081 * frontend.adb (Frontend): only qualify names in non-ALFA mode
9083 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9085 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
9086 call, ignore functions.
9088 2011-08-04 Geert Bosch <bosch@adacore.com>
9090 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
9093 2011-08-04 Emmanuel Briot <briot@adacore.com>
9095 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
9096 as an index for Builder'Switches. This conforms to the documentation.
9097 * make.adb (Insert_Project_Sources): avoid duplicate code
9099 2011-08-04 Emmanuel Briot <briot@adacore.com>
9101 * makeutl.adb (Complete_Mains): if the user has passed a relative file
9102 name on the command line (for instance "../dummy"), never assume it can
9105 2011-08-04 Tristan Gingold <gingold@adacore.com>
9107 * bindgen.adb: Remove code the reference or create the
9108 Break_Start/__gnat_break_start procedure.
9109 * s-stalib.adb (Break_Start): Removed.
9111 2011-08-04 Emmanuel Briot <briot@adacore.com>
9113 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
9114 shared with gprbuild.
9116 2011-08-04 Yannick Moy <moy@adacore.com>
9118 * par-ch4.adb (P_Primary): preferentially issue an error message about
9119 a missing parenthesis arount a conditional or case expression in Ada
9120 2012 mode, if we detect that the alignment is not correct for a
9123 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9125 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
9126 tag-to-class-wide conversion as needing finalization actions.
9127 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
9128 a tag-to-class-wide conversion as needing finalization actions.
9129 (Is_Finalizable_Transient): The result of a tag-to-class-wide
9130 conversion does not need finalization actions.
9131 (Is_Tag_To_CW_Conversion): New routine.
9132 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
9133 whether an object is the result of a tag-to-class-wide conversion.
9135 2011-08-04 Yannick Moy <moy@adacore.com>
9137 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
9138 the left-hand-side and right-hand-side of a conjunct are inserted when
9139 translating a pre- or postcondition
9140 * sem_ch6.adb: Correct typo in comment
9142 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9144 * gnat_rm.texi: Ravenscar does not prohibit dependence on
9145 Unchecked_Conversion and Unchecked_Deallocation.
9147 2011-08-04 Thomas Quinot <quinot@adacore.com>
9149 * make.adb: Minor reformatting.
9151 2011-08-04 Emmanuel Briot <briot@adacore.com>
9153 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
9154 sources in the project and its imported projects, but not in the whole
9157 2011-08-04 Emmanuel Briot <briot@adacore.com>
9159 * make.adb: Remove debug trace.
9161 2011-08-04 Vincent Celier <celier@adacore.com>
9163 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
9164 path in canonical form, to be able to compare path names on platforms
9165 such as Windows or Darwin.
9167 2011-08-04 Thomas Quinot <quinot@adacore.com>
9169 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
9170 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
9171 * scos.ads: Update documentation accordingly.
9172 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
9175 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9177 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
9178 attribute only if prefix type is scalar.
9180 2011-08-04 Emmanuel Briot <briot@adacore.com>
9182 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
9183 in gnatmake for specifying mains on the command line that do not belong
9184 to the main project. These mains must currently all belong to the same
9186 (Ultimate_Extension_Of): removed, since duplicated
9187 Ultimate_Extending_Project.
9189 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9191 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
9193 (CodePeer_Mode_String): New.
9194 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
9196 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
9197 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
9198 mode, since no useful elaboration subprogram is needed by CodePeer.
9199 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
9200 In this mode, compile binder file with -gnatC and do stop after this
9203 2011-08-04 Vincent Celier <celier@adacore.com>
9205 * exp_ch7.adb: Minor comment fix.
9207 2011-08-04 Robert Dewar <dewar@adacore.com>
9209 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
9210 exp_ch4.adb, makeutl.adb: Minor reformatting.
9212 2011-08-04 Emmanuel Briot <briot@adacore.com>
9214 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
9215 Create several new subprograms to move code out of Make. This makes the
9216 code more readable, removes code duplication, and is a preparation work
9217 for adding support for aggregate projects.
9219 2011-08-04 Tristan Gingold <gingold@adacore.com>
9221 * s-po32gl.ads, s-po32gl.adb: New files.
9222 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
9223 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
9224 (Build_Finalization_Collection): Use it.
9225 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
9226 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
9228 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
9229 * gcc-interface/Make-lang.in: Update dependencies.
9231 2011-08-04 Emmanuel Briot <briot@adacore.com>
9233 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
9236 2011-08-04 Emmanuel Briot <briot@adacore.com>
9238 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
9239 command line is not a file name, also check whether it could be a unit
9242 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9244 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
9245 the header of the finalization routine.
9246 If the unit has no finalizer but is a body whose spec has one, then
9247 generate the decrement of the elaboration entity only.
9248 If the unit has a finalizer and is a spec, then do not generate the
9249 decrement of the elaboration entity.
9250 (Gen_Finalize_Library_C): Likewise.
9252 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9254 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
9255 (Bounds_Size_Expression): Removed.
9256 (Double_Alignment_Of): New subsidiary routine.
9257 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
9258 for a hole in the dope vector of unconstrained arrays due to different
9259 index and element alignments.
9261 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9263 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
9264 raise program_error because body has not been seen yet.
9266 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9268 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
9271 2011-08-04 Vincent Celier <celier@adacore.com>
9273 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
9275 2011-08-04 Yannick Moy <moy@adacore.com>
9277 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
9278 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
9280 2011-08-04 Thomas Quinot <quinot@adacore.com>
9282 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
9283 instantiation in RCI.
9285 2011-08-04 Emmanuel Briot <briot@adacore.com>
9287 * make.adb: Share more code with gprbuild
9289 2011-08-04 Emmanuel Briot <briot@adacore.com>
9291 * projects.texi: Added documentation for the IDE'Gnat project file
9294 2011-08-04 Nicolas Roche <roche@adacore.com>
9296 * gnat_rm.texi: Minor editing.
9298 2011-08-04 Javier Miranda <miranda@adacore.com>
9300 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
9301 and the library case for VM targets.
9302 (Gen_Adainit_Ada): Likewise.
9304 2011-08-04 Robert Dewar <dewar@adacore.com>
9306 * g-altive.ads: Minor comment updates.
9307 * prj-nmsc.adb: Minor reformatting.
9309 2011-08-04 Javier Miranda <miranda@adacore.com>
9312 (Normalize_Scalars_Config): Value of the configuration switch set by
9313 pragma Normalize_Scalars when it appears in the gnat.adc file.
9314 (Normalize_Scalars): New field for record Config_Switches_Type. Used
9315 to save and restore settings of this pragma.
9317 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
9318 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
9320 2011-08-04 Vincent Celier <celier@adacore.com>
9322 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
9324 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9326 * makeutl.adb: Minor reformatting.
9328 2011-08-04 Olivier Hainque <hainque@adacore.com>
9330 * g-altive.ads: Update comments to reflect that only the soft
9331 binding is available today.
9333 2011-08-04 Robert Dewar <dewar@adacore.com>
9335 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
9336 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
9337 * gcc-interface/Make-lang.in: Update dependencies.
9339 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9341 * prj-env.adb: Remove local debug traces.
9343 2011-08-04 Yannick Moy <moy@adacore.com>
9345 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
9346 was used instead of Hi_OK, which could cause a read of an uninitialized
9347 value later on. Detected while working on the new warning.
9348 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
9350 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
9351 in more cases, in order to detect more unreferenced values.
9352 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
9353 object for expression, if any.
9355 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9357 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
9358 the operand types instead of the Esize.
9360 2011-08-04 Steve Baird <baird@adacore.com>
9362 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
9363 enable CodePeer_Mode.
9364 * bindusg.adb (Display): Add help message describing -P binder switch.
9365 * gnat_ugn.texi: Document -P binder switch.
9366 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
9367 user-defined main program directly.
9368 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
9369 user-defined main program in the context clause of the package body.
9371 2011-08-04 Yannick Moy <moy@adacore.com>
9373 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
9374 duplicate of Defining_Entity
9375 (Get_Unique_Entity_For_Decl): rename function into
9376 Unique_Defining_Entity
9377 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
9378 (Formal_Proof_On): remove synthesized flag
9379 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9380 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
9381 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
9382 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
9383 Annotate (Formal_Proof)
9385 2011-08-04 Emmanuel Briot <briot@adacore.com>
9387 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
9388 source files with non-standard naming schemes, in imported projects
9390 2011-08-04 Emmanuel Briot <briot@adacore.com>
9392 * makeutl.adb (Complete_Mains): when a multi-unit source file is
9393 specified on the gprbuild command line, we need to compile all units
9394 within that file, not just the first one we find
9395 Fix error message for mains that are not found.
9397 2011-08-04 Thomas Quinot <quinot@adacore.com>
9399 * sem_ch6.adb: Update comment.
9400 * sem_ch12.adb: Minor reformatting.
9402 2011-08-04 Bob Duff <duff@adacore.com>
9404 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
9405 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
9406 race condition whose symptom is to fail to lock Parent. That, in turn,
9407 causes Parent.Awake_Count to be accessed without locking Parent, which
9408 causes another race condition whose symptom is that Parent.Awake_Count
9409 can be off by 1 (either too high or too low). The solution is to lock
9410 Parent unconditionally, and then lock Acceptor, before reading
9411 Acceptor.Terminate_Alternative.
9413 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9415 * debug.adb: Update comment.
9417 2011-08-04 Robert Dewar <dewar@adacore.com>
9419 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
9420 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
9421 exp_ch6.adb: Minor reformatting.
9423 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9425 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
9428 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9430 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
9432 2011-08-04 Thomas Quinot <quinot@adacore.com>
9434 * sinfo.ads: Minor reformatting.
9436 2011-08-04 Emmanuel Briot <briot@adacore.com>
9438 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
9439 even if there is no location.
9441 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9443 * sem_res.adb, sem_ch4.adb: move check for restriction
9444 No_Task_Hierarchy to resolve_allocator.
9446 2011-08-04 Thomas Quinot <quinot@adacore.com>
9448 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
9449 This flag of N_Pragma nodes is not used, remove it as well as all of
9450 the associated circuitry.
9452 2011-08-04 Javier Miranda <miranda@adacore.com>
9454 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
9455 runtime check on duplicated externa tags
9456 * debug.adb Document switch -gnatdQ.
9458 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9460 * a-fihema.ads: Minor typo fix.
9462 2011-08-04 Yannick Moy <moy@adacore.com>
9464 * sem_ch10.adb: Minor comment update.
9466 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9468 * einfo.adb: Update the node field usage to reflect the renaming of
9469 Return_Flag to Return_ Flag_Or_Transient_Decl.
9470 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
9471 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
9472 (Write_Field15_Name): Change Return_Flag to
9473 Return_Flag_Or_Transient_Decl.
9474 * einfo.ads: Rename node field Return_Flag to
9475 Return_Flag_Or_Transient_Decl. Update the associated comment and all
9476 occurrences in entities.
9477 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
9478 associated Inline pragma.
9479 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
9480 associated Inline pragma.
9481 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
9483 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
9484 Return_Flag and Set_Return_Flag.
9485 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
9486 objects generated for controlled transients declared inside an
9487 Exception_With_Actions. Update the calls to Return_Flag.
9488 (Process_Object_Declaration): Add code to add a null guard for hook
9489 objects generated for controlled transients declared inside an
9490 Exception_With_Actions. Update related comment.
9491 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
9492 objects generated for controlled transients declared inside an
9493 Exception_With_Actions. Update the calls to Return_Flag.
9494 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
9496 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9498 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
9499 positional aggregate.
9501 2011-08-04 Vincent Celier <celier@adacore.com>
9503 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
9504 SLOC only for pragmas.
9506 2011-08-04 Emmanuel Briot <briot@adacore.com>
9508 * projects.texi: Minor typo fix.
9510 2011-08-04 Emmanuel Briot <briot@adacore.com>
9512 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
9513 on case-sensitive file systems.
9515 2011-08-04 Thomas Quinot <quinot@adacore.com>
9517 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
9518 nested in a disabled pragma.
9519 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
9520 enclosing pragma, if any, for X decisions.
9522 2011-08-04 Thomas Quinot <quinot@adacore.com>
9524 * sem_prag.adb: Minor reformatting.
9526 2011-08-04 Vincent Celier <celier@adacore.com>
9528 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
9529 allowed in no run time mode.
9531 2011-08-04 Vincent Celier <celier@adacore.com>
9533 * make.adb (Check): When -gnatc is used, check for the source file
9534 inside the ALI file with a canonical case file name.
9536 2011-08-04 Emmanuel Briot <briot@adacore.com>
9538 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
9539 overriding the separator.
9541 2011-08-04 Robert Dewar <dewar@adacore.com>
9543 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
9544 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
9546 2011-08-04 Robert Dewar <dewar@adacore.com>
9548 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
9550 2011-08-04 Yannick Moy <moy@adacore.com>
9552 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
9553 'Result only appears in postcondition of function.
9555 2011-08-04 Thomas Quinot <quinot@adacore.com>
9557 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9558 external tag, include the value of the external tag in the exception
9561 2011-08-04 Yannick Moy <moy@adacore.com>
9563 * sem_attr.adb (Result): modify error message for misplaced 'Result
9565 2011-08-04 Sergey Rybin <rybin@adacore.com>
9567 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9568 clear that the second argument must be an identifier.
9570 2011-08-04 Thomas Quinot <quinot@adacore.com>
9572 * exp_ch9.adb (Build_Barrier_Function): When compiling with
9573 -fpreserve-control-flow, insert an IF statement on the barrier
9574 condition to ensure that a conditional branch instruction is generated.
9576 2011-08-04 Emmanuel Briot <briot@adacore.com>
9578 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9579 (Processing_Flags.Ignore_Missing_With): new flag.
9581 2011-08-04 Emmanuel Briot <briot@adacore.com>
9583 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9584 Source_List_File on case-insensitive systems where the file is actually
9585 on a case-sensitive file system (NFS,...).
9587 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9589 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9590 function return contains a controlled [extension] aggregate and the
9591 return statement is not part of a handled sequence of statements, wrap
9592 the return in a block. This ensures that all controlled temporaries
9593 generated during aggregate resolution will be picked up by the
9594 finalization machinery.
9596 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9598 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9599 components, freeze type before resolution, to ensure that default
9600 initializations are present for all components.
9601 * sem_res.adb (Resolve_Actuals): the designated object of an
9602 accces-to-constant type is a legal actual in a call to an
9603 initialization procedure.
9605 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9607 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9608 N_Unchecked_Type_Conversion to the possible containers of a renamed
9611 2011-08-04 Yannick Moy <moy@adacore.com>
9613 * par-ch13.adb (Aspect_Specifications_Present): recognize
9614 "with Identifier'Class =>" as an aspect, so that a meaningful warning
9615 is issued in Strict mode.
9616 * par.adb: Fix typos in comments.
9618 2011-08-04 Yannick Moy <moy@adacore.com>
9620 * sem_attr.adb (Result): modify error message to take into account Post
9621 aspect when compiling Ada 2012 (or newer) code.
9623 2011-08-04 Nicolas Roche <roche@adacore.com>
9625 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9626 remove need for GCC exceptions.
9628 2011-08-04 Vincent Celier <celier@adacore.com>
9630 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9631 project, not the source file name.
9632 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9633 excluded, continue looking. This excluded source will only be returned
9634 if there is no other source with the same base name that is not locally
9637 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9639 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9640 private and one of the operands is a real literal, use a qualified
9641 expression rather than a conversion which is not meaningful to the
9644 2011-08-04 Yannick Moy <moy@adacore.com>
9646 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9647 corresponding aspect X'Class are allowed, proceed with analysis of the
9648 aspect instead of skipping it.
9650 2011-08-04 Tristan Gingold <gingold@adacore.com>
9652 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9653 This will allow to have an Ada implementation for the subprogram.
9655 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9657 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9658 completion and aspects are present, apply them to the entity for the
9659 type which is currently the partial view, but which is the one that
9661 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9662 applies to a partial view, indicate that the full view has predicates
9663 and delayed aspects.
9664 (Replace_Type_Reference): Handle properly predicates that apply to the
9665 full view of a private completion.
9667 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9669 * layout.adb (Layout_Type): For composite types, do not set Esize.
9670 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9672 (Size_Known): Look at the RM size of components instead of the Esize.
9673 (Freeze_Record_Type): Look at the RM size instead of the Esize to
9674 issue warning and activate Implicit_Packing.
9675 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
9676 if the Esize is not known.
9677 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9678 for elementary types only.
9679 (Analyze_Record_Representation_Clause): Look at the RM size instead
9680 of the Esize to issue errors.
9681 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9683 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
9685 Look at the RM size instead of the Esize for types if the latter is
9687 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9689 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9691 * sem_type.adb: proper handling of equality not involving anonymous
9694 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9696 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9697 Vis_Decls. When creating a library-level finalizer for a package spec,
9698 both the declaration and body of the finalizer are inserted either in
9699 the visible or private declarations of the package spec.
9701 2011-08-04 Javier Miranda <miranda@adacore.com>
9703 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9704 use of the full-view of a type when invoking Is_Ancestor.
9705 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9706 the full-view of private parents is requested, then use also the
9707 full-view of the parent of the first derivation.
9709 2011-08-04 Tristan Gingold <gingold@adacore.com>
9711 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9712 instead of the locally imported procedure.
9713 * s-taprop-mingw.adb (Enter_Task): Ditto.
9714 * s-valrea.adb (Scan_Real): Ditto.
9715 * s-imgrea.adb (Set_Image_Real): Ditto.
9716 * s-flocon.ads: Make the package pure.
9718 2011-08-04 Thomas Quinot <quinot@adacore.com>
9720 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9721 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9722 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9723 New subprogram, moved here from...
9724 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9725 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9726 rewriting of the last argument into a procedure call statement here...
9727 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9730 2011-08-04 Thomas Quinot <quinot@adacore.com>
9732 * par_sco.adb: Minor reformatting.
9734 2011-08-04 Robert Dewar <dewar@adacore.com>
9736 * erroutc.adb: Minor reformatting.
9738 2011-08-04 Thomas Quinot <quinot@adacore.com>
9740 * par_sco.adb: Comment update.
9742 2011-08-04 Tristan Gingold <gingold@adacore.com>
9744 * s-flocon.ads: New file.
9745 * g-flocon.ads: Now a renaming of s-flocon.
9746 * Makefile.rtl: Add s-flocon.o
9748 2011-08-04 Javier Miranda <miranda@adacore.com>
9750 * exp_strm.adb (Build_Array_Input_Function): if the array type is
9751 constrained, do not attempt to build a subtype of it.
9753 2011-08-04 Yannick Moy <moy@adacore.com>
9755 * errout.ads Change comments: remove 'R'M as an example where quotes
9756 are needed; add ALFA as another case where quotes are not needed
9757 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9758 case where quotes are not needed.
9759 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9760 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9761 Remove all occurrences of 'A'L'F'A
9763 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9765 * sem_ch13.adb: check legality of invariant pragma.
9767 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9769 * bindgen.adb: Add comments.
9771 2011-08-04 Yannick Moy <moy@adacore.com>
9773 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9775 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9776 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9778 2011-08-04 Robert Dewar <dewar@adacore.com>
9780 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9781 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9782 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9784 2011-08-04 Thomas Quinot <quinot@adacore.com>
9786 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9788 2011-08-04 Thomas Quinot <quinot@adacore.com>
9791 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9794 2011-08-04 Robert Dewar <dewar@adacore.com>
9796 * einfo.ads, exp_ch4.adb: Minor reformatting.
9798 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9800 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9802 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9804 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9805 type in all cases to compute list of primitive operations, because full
9806 view may be an itype that is not attached to the list of declarations.
9808 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9810 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9811 library has already been finalized.
9812 (Gen_Adafinal_C): Likewise.
9813 (Gen_Adainit_Ada): Generate an early return if the library has
9814 already been elaborated.
9815 (Gen_Adainit_C): Likewise.
9816 (Gen_Output_File_Ada): Generate an elaboration flag.
9817 (Gen_Output_File_C): Likewise.
9819 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9821 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9822 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9823 built in the first place.
9824 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9825 for CodePeer because Finalize_Address was not built to begin with.
9826 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9828 2011-08-04 Pascal Obry <obry@adacore.com>
9830 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9831 filenames, this ensures unicity of filenames across processes.
9833 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9835 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9836 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9837 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9838 Add False as the actual to From_Abort in the generated call to
9839 Raise_From_Controlled_Operation.
9841 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9843 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9844 so that the ali file name can be retrieved from outside of this package.
9845 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9846 doing nothing in the general case, but used to update the object file
9847 timestamp if directly generated by the backend.
9848 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9849 to a later time than the ali file one.
9851 2011-08-04 Yannick Moy <moy@adacore.com>
9853 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9854 entities whose body contains an Annotate pragma which forces formal
9856 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9857 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9858 Mark_Non_ALFA_Subprogram to pass in a message and node.
9859 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9860 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9861 surrounding subprogram.
9862 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9863 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9864 as not in ALFA is annotated with Formal_Proof being On, then an error
9865 is issued based on the additional parameters for message and node.
9866 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9867 * gcc-interface/Make-lang.in: Update dependencies.
9869 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9871 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9872 Finalize_Address when CodePeer is enabled.
9874 2011-08-04 Pascal Obry <obry@adacore.com>
9876 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9877 the latter returns a pointer to a static buffer which is deallocated
9878 at the end of the routine.
9880 2011-08-04 Yannick Moy <moy@adacore.com>
9882 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9883 after index creation; mark unconstrained base array type generated as
9884 being in/not in ALFA as well
9885 (Make_Index): mark subtype created as in/not in ALFA
9886 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9887 over a loop as in/not in ALFA, depending on its type and form of loop
9890 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9892 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9893 directly to False on .NET and JVM.
9895 2011-08-04 Yannick Moy <moy@adacore.com>
9897 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9898 constraint that subtype must come from source code to be in ALFA, so
9899 that anonymous subtypes can be in ALFA too.
9901 2011-08-04 Yannick Moy <moy@adacore.com>
9903 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9904 reference for ALFA mode.
9905 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9906 procedure public so as to use it from formal verification back-end.
9908 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9910 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9911 invalid checks of the Parameter, making Remove_Switch not working
9914 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9916 * targparm.ads: Update header: no run-time exception is needed on this
9919 2011-08-04 Vincent Celier <celier@adacore.com>
9921 * a-fihema.adb: Use System.IO instead of GNAT.IO
9923 2011-08-04 Thomas Quinot <quinot@adacore.com>
9925 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9926 are forbidden in Compiler_Unit mode.
9928 2011-08-04 Robert Dewar <dewar@adacore.com>
9930 * sem_util.adb: Minor reformatting.
9932 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9934 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9935 library-level finalizers.
9936 (Gen_Finalize_Library_C): Update the import string for library-level
9938 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9939 library-level finalizer.
9940 * exp_ch7.adb: Remove with and use clauses for Stringt.
9941 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9942 Spec_Decl. Add local variable Body_Id. The names of library-level
9943 finalizers are now manually fully qualified and are no longer external.
9944 A single name is now capable of servicing .NET, JVM and non-VM targets.
9945 Pragma Export is no longer required to provide visibility for the name.
9946 (Create_Finalizer_String): Removed.
9947 (New_Finalizer_Name): New routine which mimics New_..._Name.
9949 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9951 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9952 elaboration counter to Standard_Short_Integer.
9953 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9954 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9955 (Gen_Elab_Externals_C): Likewise.
9957 2011-08-04 Ed Falis <falis@adacore.com>
9959 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9960 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9961 system-vxworks-mips.ads, system-vxworks-x86.ads
9962 (Always_Compatible_Rep): set to False for all VxWorks targets.
9964 2011-08-04 Robert Dewar <dewar@adacore.com>
9966 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9967 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9968 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9969 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9970 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9971 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9972 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9973 Minor reformatting and code reorganization.
9975 2011-08-04 Emmanuel Briot <briot@adacore.com>
9977 * projects.texi: Added doc for aggregate projects.
9979 2011-08-04 Emmanuel Briot <briot@adacore.com>
9981 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9982 Add support for overriding the Project_Path in aggregate projects.
9984 2011-08-04 Robert Dewar <dewar@adacore.com>
9986 * a-cofove.ads: Minor reformatting.
9988 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9990 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9991 on the generated code.
9992 (Build_Finalize_Statements): Update the comment on the generated code.
9993 (Build_Initialize_Statements): Update the comment on the generated code.
9994 (Build_Object_Declarations): Add local variable Result. The object
9995 declarations are now built in sequence.
9996 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9999 2011-08-04 Robert Dewar <dewar@adacore.com>
10001 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
10003 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
10005 * einfo.ads (Elaboration_Entity): Document new definition and use.
10006 (Elaboration_Entity_Required): Adjust to above change.
10007 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
10008 * exp_ch12.adb: And with and use for Snames.
10009 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
10010 * exp_util.adb (Set_Elaboration_Flag): Likewise.
10011 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
10012 <Check_Unit_Name>: Deal with N_Expanded_Name.
10013 <Attribute_Elaborated>: Extend to all unit names.
10014 * sem_elab.adb: And with and use for Uintp.
10015 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
10016 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
10017 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
10018 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
10019 from Gen_Adainit_Ada.
10020 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
10021 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
10022 case, do not call System.Standard_Library.Adafinal; instead call
10023 finalize_library if needed.
10024 (Gen_Adafinal_C): Likewise.
10025 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
10026 non-main program case.
10027 (Gen_Adainit_C): Generate a couple of external declarations here.
10028 In the main program case, set SSL.Finalize_Library_Objects.
10029 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
10030 (Gen_Elab_Calls_C): Likewise.
10031 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
10032 (Gen_Finalize_Library_C): Likewise. Generate a full function.
10033 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
10035 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
10036 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
10038 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
10039 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
10040 of external declarations. Call Gen_Finalize_Library_C.
10042 2011-08-04 Emmanuel Briot <briot@adacore.com>
10044 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
10045 Compute_Compilation_Phases): new subprogram.
10046 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
10047 The number of mains as well as the various compilation phases that
10048 need to be run are now project tree specific, since various
10049 aggregated trees might have different requirements. In particular,
10050 they do not all require bind or link phases.
10052 2011-08-04 Emmanuel Briot <briot@adacore.com>
10054 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
10055 (Project_Tree_Appdata): New type.
10056 It is now possible to associate application-specific data to a project
10057 tree. In particular, this is used in the gprbuild builder to avoid a
10058 number of global tables and htables, especially now that there can be
10059 several project trees loaded at once because of aggregate projects.
10060 (Debug_Name): new procedure.
10061 * projects.texi: Clarify syntax of "**" for Source_Dirs
10063 2011-08-03 Emmanuel Briot <briot@adacore.com>
10065 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
10066 the "roots" for a main.
10067 (Fill_From_Project): add support for aggregate projects. Main units
10068 in aggregated projects are now automatically added in the list of
10069 files to build (although this fails later on in gprbuild, because
10070 these files are not using the root proejct tree, so this needs
10072 * gcc-interface/Make-lang.in: Update dependencies.
10074 2011-08-03 Yannick Moy <moy@adacore.com>
10076 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
10077 conditional expression in ALFA.
10078 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
10079 expressions as not in ALFA.
10081 2011-08-03 Robert Dewar <dewar@adacore.com>
10083 * a-cofove.adb: Minor reformatting.
10085 2011-08-03 Emmanuel Briot <briot@adacore.com>
10087 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
10088 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
10090 These packages are more logically placed in the Queue package, since
10091 they manipulate the queue. It is also likely that they can be adapted
10092 for gnatmake, thus sharing more code.
10093 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
10094 that we could move the above.
10096 2011-08-03 Emmanuel Briot <briot@adacore.com>
10098 * errutil.adb (Finalize): clean up the list of error messages on exit.
10099 Calling this subprogram multiple times will no longer show duplicate
10100 error messages on stderr.
10102 2011-08-03 Emmanuel Briot <briot@adacore.com>
10104 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
10105 Getopt_Switches when we have already define a command line
10108 2011-08-03 Yannick Moy <moy@adacore.com>
10110 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
10111 in ALFA. Instead, they are considered as assertions to prove.
10112 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
10113 nodes as not in ALFA. Instead, include conditional expressions in ALFA
10114 if they have no ELSE part, or if they occur in pre- and postconditions,
10115 where the Condition cannot have side-effects in ALFA
10116 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
10117 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
10118 Instead, include type conversion between scalar types in ALFA.
10119 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
10120 if-and-only-if its type is in ALFA.
10122 2011-08-03 Thomas Quinot <quinot@adacore.com>
10124 * scos.adb, get_scos.adb, put_scos.adb
10125 New code letter for decisions: G (entry guard)
10127 (Traverse_Subprogram_Body): Rename to...
10128 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
10129 (Traverse_Protected_Body): New subprogram
10130 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
10131 protected bodies and entry bodies.
10133 2011-08-03 Yannick Moy <moy@adacore.com>
10135 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
10136 entities with get/set subprograms, which is set on procedure entities
10137 generated by the compiler for a postcondition.
10138 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
10139 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
10140 entity for a declaration
10141 (Get_Unique_Entity_For_Decl): new function returning an entity which
10142 represents a declaration, so that matching spec and body have the same
10145 2011-08-03 Robert Dewar <dewar@adacore.com>
10147 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
10148 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
10150 2011-08-03 Yannick Moy <moy@adacore.com>
10152 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
10153 library-level because retriction No_Implicit_Dynamic_Code in the
10154 front-end prevents its definition as a local subprogram
10155 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
10156 for reuse in other contexts
10157 (Traverse_Declarations_Or_Statements,
10158 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
10159 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
10160 procedures take a callback parameter to be called on all declarations
10162 (Traverse_All_Compilation_Units): new generic function to traverse a
10163 compilation unit and call a callback parameter on all declarations
10165 2011-08-03 Javier Miranda <miranda@adacore.com>
10167 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
10168 in Java since they are always enclosed in a namespace that
10169 differentiates them, and overloaded entities are supported by the VM.
10171 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10173 * checks.adb (Determine_Range): If a computed bound of an operation is
10174 outside the range of the base type of the expression, and overflow
10175 checks are enabled, the result is unknown and cannot be used for any
10176 subsequent constant folding.
10177 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
10178 unknown, so is the result of the comparison.
10180 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10182 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
10183 From_Abort. When finalization was triggered by an abort, propagate
10184 Standard'Abort_Signal rather than Program_Error.
10185 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
10187 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
10188 From_Abort. When finalization was triggered by an abort, propagate
10189 Standard'Abort_Signal rather than Program_Error.
10190 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
10192 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
10193 Abort_Id. Update the calls to Build_Object_Declarations and
10194 Build_Raise_Statement to include Abort_Id.
10195 (Build_Adjust_Statements): New local variable Abort_Id. Update the
10196 calls to Build_Object_Declarations and Build_Raise_Statement to include
10198 (Build_Finalize_Statements): New local variable Abort_Id. Update the
10199 calls to Build_Object_Declarations and Build_Raise_Statement to include
10201 (Build_Components): Create an entity for Abort_Id when exceptions are
10202 allowed on the target.
10203 (Build_Finalizer): New local variable Abort_Id.
10204 (Build_Initialize_Statements): New local variable Abort_Id. Update the
10205 calls to Build_Object_Declarations and Build_Raise_Statement to include
10207 (Build_Object_Declarations): Add new formal Abort_Id. Create the
10208 declaration of flag Abort_Id to preserve the original abort status
10209 before finalization code is executed.
10210 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
10211 runtime routine Raise_From_Controlled_Operation.
10212 (Create_Finalizer): Update the call to Build_Raise_Statement to include
10213 Abort_Id. Update the call to Build_Object_Declarations to include
10214 Abort_Id. Update the layout of the finalizer body.
10215 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
10216 (Process_Transient_Objects): New local variable Abort_Id. Remove the
10217 clunky code to create all flags and objects related to
10218 exception propagation and replace it with a call to
10219 Build_Object_Declarations. Update the call to Build_Raise_Statement to
10221 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
10222 Add new formal Abort_Id and associated comment on its use.
10223 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
10225 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
10226 Remove the clunky code to create all flags and objects related to
10227 exception propagation and replace it with a call to
10228 Build_Object_Declarations. Update the call to Build_Raise_Statement.
10230 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10232 * s-tassta.adb: Fix minor typos.
10234 2011-08-03 Robert Dewar <dewar@adacore.com>
10236 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
10237 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
10239 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10241 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
10242 to packages. This ensures that the finalizer body will not end up
10243 inside the freeze node.
10244 (Process_Declarations): Add code to detect whether a freeze node has a
10245 nested finalization collection.
10247 2011-08-03 Pascal Obry <obry@adacore.com>
10249 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
10250 (Current_Session): Return a not null access to Session_Type.
10251 (Default_Session): Likewise.
10253 2011-08-03 Robert Dewar <dewar@adacore.com>
10255 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
10256 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
10258 2011-08-03 Pascal Obry <obry@adacore.com>
10260 * g-awk.ads: Minor comment fix.
10262 2011-08-03 Sergey Rybin <rybin@adacore.com>
10264 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10265 the tree structure related to discriminant constraints.
10266 Original_Discriminant cannot be used any more for computing the
10267 defining name for the reference to a discriminant.
10269 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10271 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
10272 function is not visibly tagged, this is not a dispatching call and
10273 therfore is not Tag_Indeterminate, even if the function is marked as
10274 dispatching on result.
10276 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10278 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
10279 (Expand_N_Free_Statement): Add a guard to protect against run-times
10280 which do not support controlled types.
10281 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
10282 against run-times which do not support controlled types.
10283 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
10284 against run-times which do not support controlled types.
10285 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
10286 against run-times which do not support controlled types.
10287 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
10288 protect against run-times which do not support controlled types.
10290 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10292 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
10293 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
10295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10297 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
10298 modified in the source, to prevent spurious warnings when compiling
10301 2011-08-03 Thomas Quinot <quinot@adacore.com>
10303 * a-except-2005.adb: Minor reformatting.
10305 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10307 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
10308 is a renaming declaration in the private part of a package, do not emit
10309 a warning that the with_clause could be moved because the renaming may
10310 be used in the body or in a child unit.
10312 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10314 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10315 Propagate the Comes_From_Source attribute from the original return
10316 object to the renaming.
10318 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10320 * exp_ch7.adb (Build_Raise_Statement): Do not call
10321 Raise_From_Controlled_Operation when this routine is not present in
10322 the run-time library.
10323 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
10324 libraries (Ravenscar), tasks are non-terminating, and protected objects
10325 and tasks can only appear at library level, so we do not want
10326 finalization of protected objects nor tasks.
10327 * exp_intr.adb: Minor clarification in comment.
10328 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
10329 Gen_Output_File_C): Remove references to finalization of library-level
10330 objects when using restricted run-time libraries.
10332 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10334 * sem_ch3.adb (Build_Discriminant_Constraints): Set
10335 Original_Discriminant only if the parent type is a generic formal.
10337 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10339 * exp_ch13.adb: Add with and use clause for Targparm;
10340 (Expand_N_Free_Statement): Prevent the generation of a custom
10341 Deallocate on .NET/JVM targets since this requires pools and address
10343 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
10344 .NET/JVM targets, attach the newly allocated object to the access
10345 type's finalization collection. Do not generate a call to
10346 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
10347 exist in the runtime.
10348 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
10349 create a custom Allocate for object that do not require initialization.
10350 Attach a newly allocated object to the access type's finalization
10351 collection on .NET/JVM.
10352 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
10353 assignment of controlled types on .NET/JVM. The two hidden pointers
10354 Prev and Next and stored and later restored after the assignment takes
10356 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
10357 kludge for .NET/JVM to recognize a particular piece of code coming from
10358 Heap_Management and change the call to Finalize into Deep_Finalize.
10359 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
10360 finalization collections on .NET/JVM only for types derived from
10361 Controlled. Separate the association of storage pools with a collection
10362 and only allow it on non-.NET/JVM targets.
10363 (Make_Attach_Call): New routine.
10364 (Make_Detach_Call): New routine.
10365 (Process_Object_Declarations): Suppress the generation of
10366 build-in-place return object clean up code on .NET/JVM since it uses
10368 * exp_ch7.ads (Make_Attach_Call): New routine.
10369 (Make_Detach_Call): New routine.
10370 * exp_intr.adb Add with and use clause for Targparm.
10371 (Expand_Unc_Deallocation): Detach a controlled object from a collection
10372 on .NET/JVM targets.
10373 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
10374 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
10375 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
10376 names used in finalization.
10378 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10380 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
10381 (Attach, Detach): Lock the current task when chaining an object onto a
10384 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10386 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
10387 Rewritten to create the message strings when the exception is not
10388 raised by an abort during finalization.
10389 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
10390 Raise_From_Controlled_Operation and update its associated comment.
10391 * a-fihema.ads, a-fihema.adb: New GNAT unit.
10392 Ada.Finalization.Heap_Management provides key functionality
10393 associated with controlled objects on the heap, their creation,
10394 finalization and reclamation. Type Finalization_Collection is
10395 effectively a wrapper which sits ontop of a storage pool and performs
10396 all necessary bookkeeping for all the objects it contains. Each
10397 access-to-controlled or access-to-class-wide type receives a collection
10398 as part of its expansion. The compiler generates buffer code and
10399 invokes Allocate / Deallocate to create and destroy allocated
10400 controlled objects.
10401 * a-finali.adb ("="): Removed.
10402 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
10403 fields Prev and Next.
10404 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
10405 A library unit with at least one controlled object on the library level
10406 has a special finalizer which is invoked by the binder. To signal this,
10407 ali files carry field PF.
10408 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
10409 associated comment on field usage.
10410 * a-tags.adb (Get_RC_Offset): Removed.
10411 (Needs_Finalization): New routine.
10412 * a-tags.ads: Update the structure of the GNAT dispatch tables.
10413 Dispatch tables now carry field Needs_Finalization which provides
10414 runtime indication whether a type is controlled or has controlled
10415 components or both. Remove field RC_Offset.
10416 (Get_RC_Offset): Removed along with its associated pragma Export.
10417 Since tagged types with controlled components no longer carry hidden
10418 field _controller, the special mechanism to retrieve its location is no
10420 (Needs_Finalization): New routine.
10421 * atree.ads, atree.adb (Elist24): New routine.
10422 (Set_Elist24): New routine.
10423 * atree.h: Add a define clause for Elist24.
10424 * bindgen.adb New library-level variable Lib_Final_Built.
10425 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
10426 presence of a VM target, the routine generates calls to the proper
10427 library finalization routine.
10428 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
10429 targets. Set the correct library finalization routine depending on
10430 whether the library has controlled objects or this is a VM compilation.
10431 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
10432 to library-level finalizers of compiled units in reverse order of
10433 elaboration. It also produces exception management code and reraises a
10434 potential exception after all units have been finalized.
10435 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
10436 library-level finalizers of compiled units in reverse order of
10438 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
10439 definitions of all library-level finalizers available to the compilation
10440 (Gen_Main_Ada): Directly call Adafinal which now contails all target
10442 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
10443 System.Standard_Library.Adafinal directly. If the library needs
10444 finalization actions, create the sequence of finalization calls.
10445 (Gen_Output_File_Ada): Alphabetize local variables and constants.
10446 Generate a with clause for System.Soft_Links when compiling for a VM.
10447 Remove the code which imports System.Standard_Library.Adafinal as
10448 Do_Finalize. Generate the library finalization routine.
10449 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
10450 If the library needs finalization actions, create all the definitions
10451 of library- level finalizers.
10452 (Has_Finalizer): New routine. Determines whether at least one compiled
10453 unit has a library-level finalizer.
10454 Add type Qualification_Mode.
10455 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
10456 * einfo.adb: New usage of field 15 as Return_Flag.
10457 Remove Finalization_Chain_Entity from the usages of field 19.
10458 Remove Associated_Final_Chain from the usages of field 23.
10459 New usage of field 23 as Associated_Collection.
10460 New usage of field 24 as Finalizer.
10461 New usage of flag 252 as Is_Processed_Transient.
10462 (Associated_Final_Chain): Removed.
10463 (Associated_Collection): New routine.
10464 (Finalization_Chain_Entity): Removed.
10465 (Finalizer): New routine.
10466 (Is_Finalizer): New routine.
10467 (Is_Processed_Transient): New routine.
10468 (Return_Flag): New routine.
10469 (Set_Associated_Final_Chain): Removed.
10470 (Set_Associated_Collection): New routine.
10471 (Set_Finalization_Chain_Entity): Removed.
10472 (Set_Finalizer): New routine.
10473 (Set_Is_Processed_Transient): New routine.
10474 (Set_Return_Flag): New routine.
10475 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
10477 (Write_Field8_Name): Alphabetize the output.
10478 (Write_Field11_Name): Alphabetize the output.
10479 (Write_Field12_Name): Alphabetize the output.
10480 (Write_Field13_Name): Alphabetize the output.
10481 (Write_Field14_Name): Alphabetize the output.
10482 (Write_Field15_Name): Alphabetize the output.
10483 (Write_Field16_Name): Alphabetize the output.
10484 (Write_Field17_Name): Alphabetize the output.
10485 (Write_Field18_Name): Alphabetize the output.
10486 (Write_Field19_Name): Alphabetize the output. Remove the output of
10487 Finalization_Chain_Entity.
10488 (Write_Field20_Name): Alphabetize the output.
10489 (Write_Field21_Name): Alphabetize the output.
10490 (Write_Field22_Name): Alphabetize the output.
10491 (Write_Field23_Name): Alphabetize the output. Remove the output of
10492 Associated_Final_Chain. Add output for Associated_Collection.
10493 (Write_Field24_Name): Alphabetize the output.
10494 (Write_Field25_Name): Add output for Finalizer.
10495 (Write_Field26_Name): Alphabetize the output.
10496 (Write_Field27_Name): Alphabetize the output.
10497 (Write_Field28_Name): Alphabetize the output.
10498 * einfo.ads: Add new field description for Associated_Collection and
10500 Remove Associated_Final_Chain and its uses in nodes.
10501 Remove Finalization_Chain_Entity and its uses in nodes.
10502 Add new field description for Finalizer and its uses in nodes.
10503 Add new synthesized attribute Is_Finalizer.
10504 Add new flag description for Is_Processed_Transient and its uses in
10506 Add new field description for Return_Flag and its uses in nodes.
10507 (Associated_Final_Chain): Removed along with its pragma Inline.
10508 (Associated_Collection): New routine and pragma Inline.
10509 (Finalization_Chain_Entity): Removed along with its pragma Inline.
10510 (Finalizer): New routine and pragma Inline.
10511 (Is_Finalizer): New routine and pragma Inline.
10512 (Is_Processed_Transient): New routine and pragma Inline.
10513 (Return_Flag): New routine and pragma Inline.
10514 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
10515 (Set_Associated_Collection): New routine and pragma Inline.
10516 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
10517 (Set_Finalizer): New routine and pragma Inline.
10518 (Set_Is_Processed_Transient): New routine and pragma Inline.
10519 (Set_Return_Flag): New routine and pragma Inline.
10520 * exp_aggr.adb: Alphabetize subprograms.
10521 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
10522 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
10523 associated comments. Remove local variables External_Final_List and
10525 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
10526 Ancestor. Remove the retrieval of finalization lists. Update the call to
10528 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
10529 lists. Update the call to Late_Expansion.
10530 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
10531 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
10532 (Gen_Assign): Remove the retrieval of the finalization list used to
10533 build the assignment. Update the calls to Make_Init_Call and
10535 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
10536 Remove the mechanism to determine attachment levels and finalization
10537 list retrieval. Remove the processing for coextensions.
10538 (Init_Controller): Removed. Controllers no longer exist.
10539 (Late_Expansion): Remove formals Flist and Obj along with their
10540 associated comments. Update the calls to Build_Record_Aggr_Code and
10541 Build_Array_Aggr_Code.
10542 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
10543 (Expand_N_Freeze_Entity): Add special processing for finalizers which
10544 appear in entry bodies, protected subprograms and task bodies.
10545 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
10546 * exp_ch3.adb (Add_Final_Chain): Removed.
10547 (Build_Array_Init_Proc): Alphabetize local variables.
10548 (Build_Assignment): Alphabetize local variables. Update the call to
10550 (Build_Class_Wide_Master): Rename local variables to better reflect
10552 (Build_Discriminant_Assignments): Code reformatting.
10553 (Build_Init_Call_Thru): Code reformatting.
10554 (Build_Init_Procedure): Code reformatting. Generate a special version
10555 of Deep_Finalize which is capable of finalizing all initialized
10556 components and ignore the rest.
10557 (Build_Init_Statements): Rename local variables to better reflect their
10559 Reimplement the mechanism to include the creation and update of an index
10560 variable called a "counter". It is used as a bookmark for tracing
10561 initialized and non-initialized components.
10562 (Build_Initialization_Call): Remove local variable Controller_Typ.
10563 Alphabetize all local variables. Remove the initialization of the
10564 record controller and update the call to Make_Init_Call.
10565 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10566 New local variable Counter.
10567 (Constrain_Array): Alphabetize.
10568 (Expand_Freeze_Array_Type): Create a collection instead of a
10570 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10571 Finalize_Address which is used in conjunction with allocated controlled
10573 (Expand_N_Object_Declaration): Remove the creation of a finalization
10574 list for anonymous access types. Update the calls to Make_Init_Call and
10576 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10577 retrieval of finalization lists. Remove the expansion of the record
10578 controller. Create TSS primitive Finalize_Address used in conjunction
10579 with controlled objects on the heap. Create finalization collections
10580 for access-to-controlled record components.
10581 (Expand_Record_Controller): Removed.
10582 (Freeze_Type): Remove the freezing of record controllers. Freezing of
10583 class-wide types now requires additional processing. Create
10584 finalization collections for access-to-controlled types.
10585 (Increment_Counter): New routine.
10586 (Make_Counter): New routine.
10587 (Make_Eq_If): Remove the mention of Name_uController.
10588 (Make_Predefined_Primitive_Specs): There is no longer need to skip
10589 types coming from System.Finalization_Root.
10590 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10591 (Predefined_Primitive_Bodies): There is no longer need to skip types
10592 coming from System.Finalization_Root.
10593 (Stream_Operation_OK): Do not generate stream routines for
10594 type Ada.Finalization.Heap_Management.Finalization_Collection.
10595 * exp_ch3.ads: Alphabetize subprograms.
10596 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10597 Add with and use clause for Lib.
10598 (Complete_Coextension_Finalization): Removed.
10599 (Complete_Controlled_Allocation): New routine. Create a finalization
10600 collection for anonymous access-to-controlled types. Create a custom
10601 Allocate which interfaces with the back end and the machinery in
10603 (Expand_Allocator_Expression): Add necessary calls to
10604 Complete_Controlled_Allocation. Remove the retrieval of finalization
10605 lists. Update the calls to Make_Adjust_Call. Generate a call to
10606 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10607 the associated collection.
10608 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10609 Code clean up. Remove the retrieval of finalization lists and
10611 Update the call to Make_Init_Call. Generate a call to
10612 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10613 the associated collection.
10614 (Get_Allocator_Final_List): Removed. Finalization lists are not
10616 (Suitable_Element): Remove the mention of Name_uController.
10617 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10618 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10619 the left hand side, carry out the assignment and adjust the left hand
10621 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10622 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10623 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10624 BIP_Collection and BIPcollection.
10625 (Build_Heap_Allocator): New routine used to allocate the return object
10626 of a build-in-place function onto a collection.
10627 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10628 (Expand_Call): Do not replace direct calls to Deep routines with their
10630 (Expand_N_Extended_Return_Statement): Give all variables shorter names
10631 and update their occurrences. Add a special return flag to monitor the
10632 [ab]normal execution of the function. The flag is set right before the
10634 Rewrite the mechanism used to allocate a build-in-place return object
10635 on the heap or on a storage pool.
10636 (Is_Direct_Deep_Call): New routine.
10637 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10638 build-in-place function call instead of a final list. Build a call to
10639 Set_Finalize_Address_Ptr to decorate the associated collection.
10640 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10641 order to name the build-in-place function call's result for later
10642 finalization. Add a collection to a build-in-place function call
10643 instead of a final list.
10644 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10645 build-in-place function call instead of a final list. Remove the code
10646 which moves one final list and transforms it into the actual in a
10647 nested build-in-place call.
10648 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10649 build-in-place function call instead of a final list.
10650 (Move_Final_List): Removed.
10651 (Needs_BIP_Collection): New routine.
10652 (Needs_BIP_Final_List): Removed.
10653 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10654 enumeration type BIP_Formal_Kind.
10655 Update the related comment.
10656 (Needs_BIP_Collection): New routine.
10657 (Needs_BIP_Final_List): Removed.
10658 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10659 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10660 majority of subprograms in this unit. Add Name_Finalize_Address to
10661 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10662 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10663 statements for an array type.
10664 (Build_Adjust_Statements): Create the adjust statements for a record
10666 (Build_Cleanup_Statements): New routine. A procedure which given any
10667 construct containing asynchronous calls, references to _master, or is a
10668 task body, a task allocation or a protected body produces the necessary
10669 runtime calls to clean up these constructs.
10670 (Build_Exception_Handler): New routine.
10671 (Build_Final_List): Removed.
10672 (Build_Finalization_Collection): New routine. A core procedure which
10673 creates a collection to service heap allocated controlled objects
10674 associated with an access-to-controlled type.
10675 (Build_Finalize_Statements): Create the finalization statements for a
10677 (Build_Finalizer): New routine. A core procedure which given any
10678 construct with declarations and/or statements detects all objects which
10679 need any type of clean up (controlled objects, protected objects) and
10680 generates all necessary code to clean up the said objects in the proper
10682 (Build_Finalizer_Call): New routine.
10683 (Build_Initialize_Statements): Create the initialization statements for
10684 an array type. The generated routine contains code to finalize partially
10685 initialized arrays.
10686 (Build_Object_Declarations): New routine.
10687 (Build_Raise_Statement): New routine.
10688 (Clean_Simple_Protected_Objects): Removed.
10689 (Controller_Component): Removed.
10690 (Enclosing_Function): New routine.
10691 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10692 either declarations or statements or both.
10693 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10694 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10696 (Find_Final_List): Removed.
10697 (Global_Flist_Ref): Removed.
10698 (In_Finalization_Root): Removed.
10699 (Insert_Actions_In_Scope_Around): Determine the range of the transient
10700 scope in terms of tree nodes. Process all transient variables within
10702 (Make_Adjust_Call): Rewritten. There is no longer an attach call
10703 generated after the adjust.
10704 (Make_Attach_Call): Removed.
10705 (Make_Call): New routine.
10706 (Make_Clean): Removed.
10707 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10709 (Make_Deep_Proc): Rewritten to generate the new profile signature used
10711 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10713 (Make_Final_Call): Modified to simply create a call to either
10714 Deep_Finalize or Finalize.
10715 (Make_Finalize_Address_Body): New routine.
10716 (Make_Finalize_Address_Stmts): New routine. A function which produces
10717 TSS primitive Finalize_Address used in conjunction with heap allocated
10718 controlled objects.
10719 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10720 (Make_Init_Call): Rewritten. There is no longer an attach call
10721 generated after initialization.
10722 (Make_Local_Deep_Finalize): New routine.
10723 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10724 (Make_Transient_Block): Remove the finalization list retrieval and
10726 (Needs_Finalization): Moved to Exp_Util.
10727 (Parent_Field_Type): New routine.
10728 (Preprocess_Components): New routine.
10729 (Process_Transient_Objects): New routine.
10730 (Wrap_HSS_In_Block): New routine.
10731 (Wrap_Transient_Declaration): Remove finalization list management and
10732 controller insertion.
10733 (Wrap_Transient_Expression): Code reformatting.
10734 (Wrap_Transient_Statement): Code reformatting.
10735 * exp_ch7.ads (Build_Final_List): Removed.
10736 (Build_Finalization_Collection): New routine.
10737 (Build_Raise_Statement): New routine.
10738 (Controller_Component): Removed.
10739 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10740 (Find_Final_List): Removed.
10741 (In_Finalization_Root): Removed.
10742 (Is_Simple_Protected_Type): Update related comment.
10743 (Make_Adjust_Call): New parameter profile and associated comments.
10744 (Make_Attach_Call): Removed.
10745 (Make_Final_Call): New parameter profile and associated comments.
10746 (Make_Finalize_Address_Body): New routine.
10747 (Make_Init_Call): New parameter profile and associated comments.
10748 (Make_Local_Deep_Finalize): New routine.
10749 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10750 (Needs_Finalization): Moved to Exp_Util.
10751 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10752 (Expand_N_Protected_Body): Remove the handling of finalization lists.
10753 (Find_Protection_Type): Moved to Exp_Util.
10754 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10755 (Make_DT): Update sequence of dispatch table initialization. Remove the
10756 initialization of field RC_Offset. Add initialization of field Needs_
10758 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10759 Reimplement how an object is first finalized, then deallocated.
10760 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10762 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10763 Register TSS_Finalize_Address with type TSS_Names.
10764 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10765 procedure provides the interface between an allocation / deallocation
10766 and the support machinery in Ada.Finalization.Heap_Management.
10767 (Find_Init_Call): Code reformatting.
10768 (Find_Init_Call_In_List): Code reformatting.
10769 (Find_Protection_Type): Moved from Exp_Ch9.
10770 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10771 (Has_Controlled_Coextensions): Removed.
10772 (Has_Controlled_Objects): New routine.
10773 (In_Library_Level_Package_Body): New routine.
10774 (Insert_Action_After): New routine.
10775 (Is_Finalizable_Transient): New routine. This predicate determines
10776 whether an object declaration is one of the many variants of controlled
10778 (Is_Null_Access_BIP_Func_Call): New routine.
10779 (Is_Non_BIP_Func_Call): New routine.
10780 (Is_Related_To_Func_Return): New routine.
10781 (Needs_Finalization): Moved from Exp_Ch7.
10782 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10783 (Find_Protection_Type): Moved from Exp_Ch9.
10784 (Has_Controlled_Coextensions): Removed.
10785 (Has_Controlled_Objects): New routine.
10786 (In_Library_Level_Package_Body): New routine.
10787 (Insert_Action_After): New routine.
10788 (Is_Finalizable_Transient): New routine.
10789 (Is_Null_Access_BIP_Func_Call): New routine.
10790 (Is_Non_BIP_Func_Call): New routine.
10791 (Is_Related_To_Func_Return): New routine.
10792 (Needs_Finalization): Moved from Exp_ch7.
10793 * expander.adb (Expand): Add a case for N_Free_Statement.
10794 * freeze.adb (Freeze_All): Replace the generation of a finalization
10795 list with a collection for access-to-controlled types.
10796 (Freeze_Entity): Code reformatting.
10797 (Freeze_Record_Type): Remove the freezing of a record controller
10799 (Freeze_Subprogram): Code reformatting.
10800 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10802 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10803 has a library-level finalizer.
10804 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10805 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10806 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10807 files. Add a-fihema to the list of object files.
10809 Alphabetize the associations in type Is_Parameterless_Attribute.
10810 * rtsfind.ads: Ada.Finalization_List.Controller and
10811 System.Finalization_Implementation are no longer a GNAT unit.
10812 Update the range of type Ada_Finalization_Child. Remove the following
10813 recoverable entities:
10815 RE_Attach_To_Final_List
10819 RE_Finalizable_Ptr_Ptr
10820 RE_Global_Final_List
10821 RE_Limited_Record_Controller
10824 RE_Record_Controller
10825 RE_Simple_List_Controller
10827 Add the following recoverable entities:
10829 RE_Add_Offset_To_Address
10833 RE_Exception_Identity
10834 RE_Finalization_Collection
10835 RE_Finalization_Collection_Ptr
10836 RE_Needs_Finalization
10837 RE_Save_Library_Occurrence
10838 RE_Set_Finalize_Address_Ptr
10839 RE_Set_Storage_Pool_Ptr
10841 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10843 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10844 (First_Stored_Discriminant): Remove the mention of Name_uController.
10845 * sem_aux.ads: Comment reformatting.
10846 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10847 to redecorate an already existing class-wide type.
10848 (Decorate_Tagged_Type): New parameter profile and associated comment.
10849 Create a "shadow class-wide type" for a shadow entity.
10850 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10851 of the final chain along with the associated comment.
10852 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10853 Full_Desig and set it to the full view of the designated type.
10854 Initialize the finalization collection to empty.
10855 (Build_Derived_Record_Type): Alphabetize local variables. Code
10857 (Collect_Fixed_Components): Remove the mention of Name_uController.
10858 (Create_Constrained_Components): Remove the mention of Name_uController.
10859 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10860 class-wide type of a shadow entity.
10861 (Process_Full_View): Update the machinery which marks type
10862 Limited_Controlled's entity as limited.
10863 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10864 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10865 list, instead make a collection build-in-place formal.
10866 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10867 a designated type in order to establish a match between the renaming
10868 and the renamed entity.
10869 (Find_Selected_Component): Add guard to prevent spurious exceptions
10870 from being raised on .NET/JVM.
10871 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10872 to the list of primitive that need special processing. Update arrays
10873 C_Names and D_Names.
10874 (Replace_Types): Handle class-wide types.
10875 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10876 different parameter profile, look at the first formal.
10877 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10878 use clauses for Exp_Util.
10879 * sem_res.adb: Remove with and use clauses for Elists.
10880 (Propagate_Coextensions): Removed.
10881 (Resolve_Allocator): Do not propagate the list of coextensions from one
10882 allocator to another.
10883 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10884 Deaccessed_T to Desig_Typ.
10885 (Enter_Name): Remove the mention of Name_uController.
10886 (Gather_Components): Remove the mention of Name_uController.
10887 (Incomplete_Or_Private_View): New routine.
10888 (Is_Coextension_Root): Removed.
10889 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10890 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10891 (Is_Coextension_Root): Removed.
10892 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10893 Controlled types are now derived from a null tagged record. Remove
10894 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10895 * sinfo.adb (Coextensions): Removed.
10896 (Set_Coextensions): Removed.
10897 * sinfo.ads: Remove Coextensions from the explanation of node fields
10898 and its uses in nodes.
10899 Update the field usage of N_Allocator.
10900 (Coextensions): Removed along with its pragma Inline.
10901 (Set_Coextensions): Removed along with its pragma Inline.
10902 * snames.ads-tmpl: Remove names
10907 Name_uLocal_Final_List
10908 Name_Finalization_Root
10915 Name_Finalize_Address
10916 * s-pooglo.adb (Allocate): Add overriding indicator.
10917 (Deallocate): Add overriding indicator.
10918 (Storage_Size): Add overriding indicator.
10919 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10920 than Finalize_Global_List.
10921 (Null_Finalize_Global_List): Removed.
10922 (Save_Library_Occurrence): New routine.
10923 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10924 initialization. Add variable Finalize_Library_Objects along with its
10925 pragma Export. Add variables Library_Exception and
10926 Library_Exception_Set along with their pragma Export.
10927 (Null_Finalize_Global_List): Removed.
10928 (Save_Library_Occurrence): New routine.
10929 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10930 rather than Finalize_Global_List.
10931 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10932 of the constructed node.
10934 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10936 * link.c: Include "auto-host.h" before system headers.
10938 2011-08-03 Vincent Celier <celier@adacore.com>
10940 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10941 that are not extended. Do not check if a library project that is
10942 extended should be regenerated. Do not add to table Library_Paths the
10943 libraries that are in extended projects. Link only with libraries that
10944 are in libray projects that are not extended.
10945 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10946 for a library project that is extended.
10948 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10950 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10951 conforming subprogram renamings that appear to be completions if they
10952 are not fully conformant.
10953 Such renamings are homographs but not completions.
10954 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10955 names in a subprogram renaming that appears in an instance.
10957 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10959 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10960 not immutably limited, build actual subtype from expression to provide
10961 proper bounds to caller.
10963 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10965 * sem_ch8.adb: Minor comment correction.
10967 2011-08-03 Thomas Quinot <quinot@adacore.com>
10969 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10970 returning a limited array, use an extended return statement.
10972 2011-08-03 Vincent Celier <celier@adacore.com>
10974 * make.adb (Initialize): If --subdirs= is used, but no project file is
10975 specified, attempt to create the specify subdir if it does not already
10976 exist and use it as the object directory as if -D had been specified.
10978 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10980 * s-tpopsp-vms.adb: New file.
10981 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10982 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10984 2011-08-03 Emmanuel Briot <briot@adacore.com>
10986 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10989 2011-08-03 Yannick Moy <moy@adacore.com>
10991 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10992 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10993 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10994 detect that an array has static bounds.
10996 2011-08-03 Thomas Quinot <quinot@adacore.com>
10998 * exp_dist.adb: Minor reformatting.
11000 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11002 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
11003 (ATCB_Key): Removed, not always used.
11005 2011-08-03 Emmanuel Briot <briot@adacore.com>
11007 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
11008 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
11009 most remaining global variables.
11011 2011-08-03 Robert Dewar <dewar@adacore.com>
11013 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
11014 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
11017 2011-08-03 Javier Miranda <miranda@adacore.com>
11019 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
11020 that must be passed by copy in VM targets.
11022 2011-08-03 Emmanuel Briot <briot@adacore.com>
11024 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
11025 duplicates a similar htable now in the project tree.
11027 2011-08-03 Claire Dross <dross@adacore.com>
11029 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
11030 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
11031 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
11032 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
11033 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
11034 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
11035 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
11038 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11040 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
11041 (ATCB_Key): Removed, not always used.
11042 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
11043 s-taprop-posix.adb.
11044 * s-tpopsp-tls.adb: New file.
11045 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
11046 x86/x64/ia64/powerpc/sparc Linux.
11048 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11050 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
11051 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
11053 2011-08-03 Thomas Quinot <quinot@adacore.com>
11055 * rtsfind.ads, exp_dist.adb, exp_dist.ads
11056 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
11057 Fix type selection for mapping integer types to PolyORB types.
11059 2011-08-03 Bob Duff <duff@adacore.com>
11061 * sem_ch7.adb: Minor comment clarification.
11063 2011-08-03 Bob Duff <duff@adacore.com>
11065 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
11066 an error analyzing a choice, skip further processing. Further
11067 processing could cause a crash or cascade errors.
11069 2011-08-03 Emmanuel Briot <briot@adacore.com>
11071 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
11072 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
11073 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
11074 prj-env.ads (Shared_Project_Tree_Data): new type
11075 An aggregate project and its aggregated trees need to share the common
11076 data structures used for lists of strings, packages,... This makes the
11077 code simpler since otherwise we have to pass the root tree (also used
11078 for the configuration file data) in addition to the current project
11079 tree. This also avoids ambiguities as to which tree should be used.
11080 And finally this saves a bit of memory.
11081 (For_Every_Project_Imported): new parameter Tree.
11082 Since aggregated projects are using a different tree, we need to let
11083 the caller know which tree to use to manipulate the returned project.
11085 2011-08-03 Robert Dewar <dewar@adacore.com>
11087 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
11088 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
11089 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
11090 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
11092 2011-08-03 Javier Miranda <miranda@adacore.com>
11094 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
11095 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
11097 2011-08-03 Bob Duff <duff@adacore.com>
11099 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
11102 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
11104 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
11105 g-sehash.ads: Fix typo. Update header.
11107 2011-08-03 Thomas Quinot <quinot@adacore.com>
11109 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
11112 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11114 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
11115 prefixes of private types along with records, since the selector may be
11117 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
11118 private types along with records, since the selector may be a
11121 2011-08-03 Emmanuel Briot <briot@adacore.com>
11123 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
11125 2011-08-03 Javier Miranda <miranda@adacore.com>
11127 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
11128 Tagged_Type_Expansion.
11130 2011-08-03 Yannick Moy <moy@adacore.com>
11132 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
11133 violation when the argument of concatenation is the name of a
11136 2011-08-03 Emmanuel Briot <briot@adacore.com>
11138 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
11139 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
11140 (Process_Declarative_Items): new parameter Child_Env.
11142 2011-08-03 Yannick Moy <moy@adacore.com>
11144 * alfa.ads: Update format of ALFA section in ALI file in order to
11145 add a mapping from bodies to specs when both are present.
11146 (ALFA_Scope_Record): Add components for spec file/scope.
11147 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
11149 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
11150 collected, fill in the spec information when relevant.
11151 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
11154 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11156 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
11157 code unit to decide whether to add internally generated subprograms.
11159 2011-08-03 Javier Miranda <miranda@adacore.com>
11161 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
11162 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
11163 be handled by copy in VM targets.
11165 2011-08-03 Emmanuel Briot <briot@adacore.com>
11167 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
11168 code with Makeutl.Get_Switches.
11169 * prj-tree.adb: Update comment.
11171 2011-08-03 Thomas Quinot <quinot@adacore.com>
11173 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
11174 subprogram with a limited formal that does not support external
11177 2011-08-03 Yannick Moy <moy@adacore.com>
11179 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
11181 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
11182 not from current unit in two phases, because it is not possible to
11183 change the table while iterating over its content.
11184 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
11186 2011-08-03 Sergey Rybin <rybin@adacore.com>
11188 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
11189 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
11191 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11193 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
11194 and the component type is composite, this is ambiguous for predefined
11195 concatenation, but if the node is not overloaded and the entity is a use
11196 -defined function its profile can be used to resolve that aggregate.
11198 2011-08-03 Robert Dewar <dewar@adacore.com>
11200 * exp_ch4.adb: Minor code cleanup.
11202 2011-08-03 Thomas Quinot <quinot@adacore.com>
11204 * exp_dist.adb: Do not generate distribution stubs if serious errors
11205 have been diagnosed.
11207 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11209 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
11210 the first formal of a primitive operation, go to the base type to
11211 handle properly an access to a derived type with constrained
11213 * sem_type.adb (Disambiguate): an immediately visible operator hides a
11214 user-defined function that is only use-visible.
11216 2011-08-03 Robert Dewar <dewar@adacore.com>
11218 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
11219 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
11220 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
11221 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
11222 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
11223 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
11224 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
11225 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
11227 2011-08-03 Robert Dewar <dewar@adacore.com>
11229 * repinfo.adb (List_Mechanism): Add handling of
11230 Convention_Ada_Pass_By_XXX.
11231 * sem_mech.adb (Set_Mechanism): Ditto.
11232 * sem_prag.adb (Process_Convention): Add entries for
11233 Convention_Ada_Pass_By_XXX.
11234 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
11236 2011-08-03 Pascal Obry <obry@adacore.com>
11238 * makeutl.adb: Minor reformatting.
11240 2011-08-03 Vincent Celier <celier@adacore.com>
11243 (Get_File_Name) If the file cannot be found when there are no config
11244 pragmas file and May_Fail is True, return No_File instead of the file
11245 name, to be consistent.
11247 2011-08-03 Pascal Obry <obry@adacore.com>
11249 * adaint.c (__gnat_is_executable_file_attr): Avoid access
11252 2011-08-03 Javier Miranda <miranda@adacore.com>
11255 (Same_Representation): In VM targets the representation of arrays with
11256 aliased components differs from arrays with non-aliased components.
11258 2011-08-03 Emmanuel Briot <briot@adacore.com>
11260 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
11261 not systematically lower case attribute indexes that contain no "."
11262 Fix definition of several Naming attributes, which take
11263 a unit name as index and therefore should be case insensitive.
11264 Minor refactoring (reduce length of variable names).
11266 2011-08-03 Emmanuel Briot <briot@adacore.com>
11268 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
11270 2011-08-03 Emmanuel Briot <briot@adacore.com>
11272 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
11273 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
11274 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
11275 prj-tree.ads (Prj.Tree.Environment): new type.
11277 2011-08-03 Emmanuel Briot <briot@adacore.com>
11279 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
11280 prj-tree.adb, prj-tree.ads (Environment): new type.
11282 2011-08-03 Emmanuel Briot <briot@adacore.com>
11284 * prj-tree.ads: Remove unused variable.
11286 2011-08-03 Yannick Moy <moy@adacore.com>
11288 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
11289 issuing messages related to SPARK restriction violation.
11291 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11293 * sem_ch6.adb: guard against error nodes in return statements.
11295 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11297 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
11298 a warning can only appear on a configuration file, so emit warning
11299 without further checks.
11301 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11303 * s-interr.ads: add overriding keyword.
11305 2011-08-03 Geert Bosch <bosch@adacore.com>
11307 * exp_attr.adb: Fix minor typo.
11309 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11311 * par-ch4.adb: improve error recovery.
11313 2011-08-03 Emmanuel Briot <briot@adacore.com>
11315 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
11316 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
11317 to Errout_Handling.
11319 2011-08-03 Emmanuel Briot <briot@adacore.com>
11321 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
11322 "external" as an attribute name in aggregate projects.
11324 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11326 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
11327 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
11328 from 0, so we need to adjust.
11330 2011-08-03 Emmanuel Briot <briot@adacore.com>
11332 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
11333 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
11335 2011-08-03 Yannick Moy <moy@adacore.com>
11337 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
11338 restriction on overloaded entity if the entity is not an operator.
11340 2011-08-03 Yannick Moy <moy@adacore.com>
11342 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
11343 restrict.ads: Rename remaining Check_Formal_Restriction* into
11344 Check_SPARK_Restriction*.
11346 2011-08-03 Emmanuel Briot <briot@adacore.com>
11348 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
11349 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
11351 (Project_Empty): removed
11352 (Empty_Project): new parameter Qualifier
11353 This is used to have fields specific to aggregate projects, cleaner
11354 New field to store the list of aggregated projects.
11355 (Check_Aggregate_Project): removed
11356 (Process_Aggregated_Projects, Free): new subprograms.
11358 2011-08-03 Olivier Hainque <hainque@adacore.com>
11360 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
11362 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11364 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
11365 explicit dereference of an unconstrained type, create a constrained
11366 subtype for it, as is done for function calls that return an
11367 unconstrained type.
11369 2011-08-03 Thomas Quinot <quinot@adacore.com>
11371 * g-pehage.adb (Finalize): Avoid possible double-free.
11373 2011-08-03 Steve Baird <baird@adacore.com>
11375 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
11376 Elab_Spec/Body attrs in CodePeer_Mode.
11378 2011-08-03 Javier Miranda <miranda@adacore.com>
11380 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
11381 low bound is not known at compile time but they have no others choice.
11382 Done because in this case the bounds can be obtained directly from the
11385 2011-08-03 Ed Falis <falis@adacore.com>
11387 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
11388 on VxWorks SMP. Remove unusable constant ANY_CPU.
11390 2011-08-03 Emmanuel Briot <briot@adacore.com>
11392 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
11393 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
11394 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
11395 Prj.Env.Initialize_Empty): new subprograms
11396 (Get_Env, Find_Project): remove parameter Target_Name.
11398 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11400 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
11401 as a condition for the delayed call to Derived_Subprograms done for the
11402 case of the rewriting of a derived type that constrains the
11403 discriminants of its parent type.
11404 Avoids redundant subprogram derivations for private subtype derivations.
11406 2011-08-03 Javier Miranda <miranda@adacore.com>
11408 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
11409 Build_Record_Aggr_Code.
11410 (Build_Record_Aggr_Code): Add missing support to initialize hidden
11411 discriminants in extension aggregates.
11413 2011-08-03 Emmanuel Briot <briot@adacore.com>
11415 * prj-pp.adb (Print): also output project qualifiers, since in
11416 particular "aggregate" is mandatory in an aggregate project.
11418 2011-08-03 Emmanuel Briot <briot@adacore.com>
11420 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
11421 (Debug_Output): new function.
11423 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11425 * gnat_ugn.texi: Document -Wstack-usage.
11426 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
11428 2011-08-03 Thomas Quinot <quinot@adacore.com>
11430 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
11431 have keyword LIMITED.
11433 2011-08-03 Yannick Moy <moy@adacore.com>
11435 * alfa.adb, alfa.ads, alfa_test.adb: New files.
11436 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
11437 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
11438 section (does not happen in compiler, only if code directly calls
11440 * get_alfa.adb, get_alfa.ads: New files.
11441 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
11443 * lib-xref-alfa.adb: New file.
11444 * lib-xref.adb, lib-xref.ads
11445 (Xref_Entry): redefine information needed in cross-references for ALFA.
11446 Push ALFA treatments in separated local package.
11447 (Enclosing_Subpragram_Or_Package): treat specially subprogram
11448 identifiers. Return entity of package body instead of spec. Return
11449 Empty for a scope with no location.
11450 (Generate_Reference): adapt to new components for ALFA information.
11451 Remove the need for D references on definitions.
11452 (Is_Local_Reference): moved to ALFA local package
11453 (Output_References): extract subfunction as Extract_Source_Name
11454 (Output_Local_References): remove procedure, replaced by filtering of
11455 cross-references in package ALFA and printing in Put_ALFA.
11456 (Write_Entity_Name): remove procedure
11457 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
11458 print exact name of entity as it appears in source file
11459 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
11460 * put_alfa.adb, put_alfa.ads: New files.
11461 * xref_lib.adb (Search_Xref): protect read of cross-references against
11462 reading other sections of the ALI file, in gnatxref
11463 (Search): protect read of cross-references against reading other
11464 sections of the ALI file, in gnatfind.
11465 * gcc-interface/Make-lang.in: Update dependencies.
11467 2011-08-03 Thomas Quinot <quinot@adacore.com>
11469 * sem_ch3.adb: Minor reformatting.
11471 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11473 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
11474 raising an exception.
11476 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11478 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
11479 type, always use 1 as the lower bound or string, even if lower bound of
11480 context is not static, to handle properly null strings in a non-static
11483 2011-08-03 Bob Duff <duff@adacore.com>
11485 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
11486 always legal on the right-hand side of an assignment statement; there
11487 is always an applicable index constraint in this case. Therefore, the
11488 check for Pkind = N_Assignment_Statement is now unconditional -- it
11489 doesn't depend on whether Is_Constrained (Typ).
11491 2011-08-03 Robert Dewar <dewar@adacore.com>
11493 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
11495 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11497 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
11498 for an itype created within a generic unit.
11500 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11502 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
11503 suppresses all inlining.
11505 2011-08-03 Robert Dewar <dewar@adacore.com>
11507 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
11508 exp_aggr.adb: Minor reformatting.
11510 2011-08-03 Thomas Quinot <quinot@adacore.com>
11512 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
11513 tagged assignment when discriminant checks are suppressed. This is
11514 useless and extremely costly in terms of static stack usage.
11516 2011-08-03 Bob Duff <duff@adacore.com>
11518 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
11519 of generics, because this leads to the wrong entity in the wrong scope,
11520 causing (e.g.) pragma Export_Procedure to get an error if the entity is
11522 (Process_Interface_Name): Follow Alias for instances of generics, to
11523 correct for the above change.
11525 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11527 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
11528 is an integer literal it is always safe to replace the reference. In
11529 addition, if the reference appears in the generated code for an object
11530 declaration it is necessary to copy because otherwise the reference
11531 might be to the uninitilized value of the discriminant of the object
11534 2011-08-03 Pascal Obry <obry@adacore.com>
11536 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
11537 ACL used, in this case we want to check for ending .exe, not .exe
11538 anywhere in the path.
11540 2011-08-03 Sergey Rybin <rybin@adacore.com>
11542 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
11543 the tree structure (semantic decoration of references to record
11546 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11548 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
11549 choices of a named array aggregate, bail out when any choices are
11550 marked as Errors_Posted.
11552 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11554 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
11555 in which entity is frozen, to handle properly loop variables in
11558 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11560 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11561 subtype is not static, compute the upper bound using attributes, to
11562 handle properly index types that are not integer types.
11564 2011-08-03 Bob Duff <duff@adacore.com>
11566 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11567 Update copyright notice.
11569 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11571 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11572 Original_Discriminant if within an instance.
11573 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11575 2011-08-03 Thomas Quinot <quinot@adacore.com>
11577 * einfo.ads: Minor reformatting.
11579 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11581 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11582 composite type with an unfrozen subcomponent, in the profile of a
11583 primitive operation.
11585 2011-08-03 Robert Dewar <dewar@adacore.com>
11587 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11589 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11591 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11592 unconstrained type with discriminants is initialized with an aggregate,
11593 use the constrained subtype of the aggregate as the type of the object,
11594 because it is immutable, and this allows the back-end to generate no
11595 code for the object declaration.
11597 2011-08-03 Robert Dewar <dewar@adacore.com>
11599 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11600 comparison operand is variable, and turns out to be zero or negative.
11602 2011-08-03 Javier Miranda <miranda@adacore.com>
11605 (Expand_Dispatching_Constructor_Call): Disable expansion of
11606 code required for native targets. Done to avoid generating
11607 references to unavailable runtime entities in VM targets.
11609 (Expand_N_Object_Declaration): Add missing support to handle
11610 the explicit initialization of class-wide interface objects.
11613 2011-08-03 Matthew Heaney <heaney@adacore.com>
11615 * a-cobove.adb (Merge): Move source onto target, instead of using
11618 2011-08-03 Matthew Heaney <heaney@adacore.com>
11620 * a-cbdlli.adb (Splice): Move source items from first to last.
11622 2011-08-03 Yannick Moy <moy@adacore.com>
11624 * sem_util.ads: Add comment.
11626 2011-08-03 Javier Miranda <miranda@adacore.com>
11629 (Expand_Record_Aggregate): In VM targets disable the expansion into
11630 assignments of aggregates whose type is not known at compile time.
11632 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11634 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11635 protected entries and task entries, to build the proper renaming
11636 declaration for entry formals, used in debugging.
11637 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11638 parameters in the same way.
11640 2011-08-02 Robert Dewar <dewar@adacore.com>
11642 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11643 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11644 code reorganization.
11646 2011-08-02 Robert Dewar <dewar@adacore.com>
11648 * debug.adb: Debug flag d.P to suppress length comparison optimization
11649 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11650 comparison of Length by comparing First/Last instead.
11652 2011-08-02 Matthew Heaney <heaney@adacore.com>
11654 * a-cobove.ads: Code clean up.
11656 2011-08-02 Vincent Celier <celier@adacore.com>
11658 * adaint.c (file_names_case_sensitive_cache): New static int.
11659 (__gnat_get_file_names_case_sensitive): Cache the return value in
11660 file_names_case_sensitive_cache at the first invocation, to avoid
11661 multiple calls to getenv.
11663 2011-08-02 Bob Duff <duff@adacore.com>
11665 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11667 2011-08-02 Yannick Moy <moy@adacore.com>
11669 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11670 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11671 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11672 indicate that we are in a precondition or postcondition. This is used in
11673 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11674 decide whether to flag the spec or body of the current subprogram as
11677 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
11679 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11681 * a-extiin.ads: New file.
11683 2011-08-02 Bob Duff <duff@adacore.com>
11685 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11686 now raises Name_Error instead of Use_Error in certain cases. The other
11687 parts of this AI were already implemented properly.
11689 2011-08-02 Vincent Celier <celier@adacore.com>
11691 * link.c: Only import "auto-host.h" when building the gnattools.
11693 2011-08-02 Yannick Moy <moy@adacore.com>
11695 * sem_util.adb: Inter-unit inlining does not work for a subprogram
11696 which calls a local subprogram, so extract subprogram
11697 from Mark_Non_ALFA_Subprogram_Body.
11699 2011-08-02 Javier Miranda <miranda@adacore.com>
11702 (Extract_Dispatching_Call): If the type of the dispatching object is an
11703 access type then return an explicit dereference in the Object out-mode
11706 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11708 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11709 compatibility checks for all indexes of an array subtype, not just the
11710 first. Reset Has_Dynamic_Range_Check on the subtype before each
11711 potential check to ensure that Insert_Range_Checks will not elide any
11712 of the dynamic checks.
11714 2011-08-02 Yannick Moy <moy@adacore.com>
11716 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11717 SPARK restriction at parsing time.
11718 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11719 directive only if the SPARK restriction is set for this unit.
11721 2011-08-02 Yannick Moy <moy@adacore.com>
11723 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11724 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11725 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11726 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11727 Mark_Non_ALFA_Subprogram_Body.
11728 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11731 2011-08-02 Yannick Moy <moy@adacore.com>
11733 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11736 2011-08-02 Robert Dewar <dewar@adacore.com>
11738 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11739 exp_ch3.adb: Minor reformatting.
11741 2011-08-02 Emmanuel Briot <briot@adacore.com>
11743 * adaint.c (__gnat_locate_exec_on_path): only returns executable
11744 files, not any regular file.
11745 (__gnat_locate_file_with_predicate): new subprogram.
11747 2011-08-02 Yannick Moy <moy@adacore.com>
11749 * sinfo.adb, sinfo.ads: Restrict the use of flags
11750 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11751 nodes, plus N_Subtype_Declaration for the 2nd one.
11753 2011-08-02 Sergey Rybin <rybin@adacore.com>
11755 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11756 - fix bugs in the description of Source_Trace;
11757 - get rid of UNIT_NAME;
11759 2011-08-02 Javier Miranda <miranda@adacore.com>
11762 (Build_Dispatching_Requeue): Adding support for VM targets
11763 since we cannot directly reference the Tag entity.
11764 * exp_sel.adb (Build_K): Adding support for VM targets.
11765 (Build_S_Assignment): Adding support for VM targets.
11767 (Default_Prim_Op_Position): In VM targets do not restrict availability
11768 of predefined interface primitives to compiling in Ada 2005 mode.
11769 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11770 restricted to compiling in Ada 2005 mode.
11771 (Make_VM_TSD): Generate code that declares and initializes the OSD
11772 record. Needed to support dispatching calls through synchronized
11775 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11776 primitives associated with synchronized interfaces.
11777 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11778 primitives associated with synchronized interfaces.
11780 2011-08-02 Yannick Moy <moy@adacore.com>
11782 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11783 statements hidden in SPARK if preceded by the HIDE directive
11784 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11785 exception handlers as hidden in SPARK if preceded by the HIDE directive
11786 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11787 if starting with the HIDE directive
11788 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11789 starting with the HIDE directive; mark the declarations in a private
11790 part as hidden in SPARK if the private part starts with the HIDE
11792 * restrict.adb, restrict.ads
11793 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11794 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11795 argument node belongs to a part which is hidden in SPARK
11796 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11797 parts in SPARK; protect the possibly costly call to
11798 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11799 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11800 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11801 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11803 (Scan): recognize special comment starting with '#' and followed by
11804 SPARK keyword "hide" as a HIDE directive.
11806 2011-08-02 Yannick Moy <moy@adacore.com>
11808 * types.ads, erroutc.ads: Minor reformatting.
11810 2011-08-02 Vincent Celier <celier@adacore.com>
11812 * link.c: Add response file support for cross platforms.
11814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11816 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11817 in an association, set parent field of copy before partial analysis.
11818 * sem_res.adb (Resolve_Slice): create reference to itype only when
11819 expansion is enabled.
11821 2011-08-02 Yannick Moy <moy@adacore.com>
11823 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11824 for new flag denoting which subprogram bodies are in ALFA
11825 * restrict.adb, sem_ch7.adb: Update comment
11826 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11827 sem_ch9.adb, sem_res.adb: Add calls to
11828 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11829 * sem_ch6.adb (Analyze_Function_Return): add calls to
11830 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11831 middle of the body, and extended return.
11832 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11833 False when missing return.
11834 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11835 to True for subprograms whose spec is in ALFA. Remove later on the flag
11836 on the entity used for a subprogram body when there exists a separate
11838 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11839 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11840 False, otherwise do nothing.
11842 2011-08-02 Robert Dewar <dewar@adacore.com>
11844 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11846 2011-08-02 Yannick Moy <moy@adacore.com>
11848 * sem_ch4.ads: minor formatting.
11850 2011-08-02 Yannick Moy <moy@adacore.com>
11852 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11853 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11854 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11855 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11856 opt.ads: cleanup of SPARK mode
11858 2011-08-02 Yannick Moy <moy@adacore.com>
11860 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11862 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11863 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11865 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11866 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11867 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11868 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11870 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11872 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11873 functions whose return type is not in ALFA.
11874 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11876 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11877 parameter's type is not in ALFA.
11878 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11883 * sem_ch6 (Analyze_Expression_Function): treat the function as
11884 Inline_Always, and introduce a subprogram declaration for it when it is
11886 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11887 expression functions, so that the back-end can determine whether they
11888 can in fact be inlined.
11889 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11890 a function body comes from an expression function.
11892 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11894 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11895 null exclusions to test Can_Never_Be_Null on the anonymous access types
11896 of the formals rather than testing the formals themselves. Exclude this
11897 check in cases where the Old_Formal is marked as a controlling formal,
11898 to avoid issuing spurious errors for bodies completing dispatching
11899 operations (due to the flag not getting set on controlling access
11900 formals in body specs).
11901 (Find_Corresponding_Spec): When checking full and subtype conformance of
11902 subprogram bodies in instances, pass Designated and E in that order, for
11903 consistency with the expected order of the formals (New_Id followed by
11906 2011-08-02 Robert Dewar <dewar@adacore.com>
11908 * sem_ch8.adb: Minor reformatting.
11910 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11912 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11913 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11914 primitive operations of class-wide actuals.
11916 2011-08-02 Javier Miranda <miranda@adacore.com>
11918 * exp_atag.ads, exp_atag.adb
11919 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11920 since its value is implicitly passed in argument Typ.
11921 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11922 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11923 Build_Common_Dispatching_Select_Statements.
11925 2011-08-02 Robert Dewar <dewar@adacore.com>
11927 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11928 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11929 Minor reformatting.
11931 2011-08-02 Robert Dewar <dewar@adacore.com>
11933 * sem_res.adb: Minor reformatting.
11934 * sem_prag.adb: Minor reformatting.
11936 2011-08-02 Javier Miranda <miranda@adacore.com>
11938 * exp_atag.adb, exp_atags.ads
11939 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11940 by the tagged type Entity. Required to use this routine in the VM
11941 targets since we do not have available the Tag entity in the VM
11944 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11945 Ada.Tags has not been previously loaded.
11947 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11948 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11950 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11951 view of enclosing scopes. Required to handle enclosing scopes that
11952 are synchronized types whose full view is a task type.
11954 (Build_VM_TSDs): Minor code improvement to avoid generating and
11955 analyzing lists with empty nodes.
11956 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11957 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11958 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11959 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11960 (Make_Select_Specific_Data_Table): Add support for VM targets.
11961 (Make_VM_TSD): Generate code to initialize the SSD structure of
11964 2011-08-02 Yannick Moy <moy@adacore.com>
11966 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11967 cross-references section in ALI.
11968 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11969 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11971 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11972 subprogram or package entity of a node
11973 (Is_Local_Reference_Type): new function returns True for references
11974 selected in local cross-references.
11975 (Lt): function extracted from Lt in Output_References
11976 (Write_Entity_Name): function extracted from Output_References
11977 (Generate_Definition): generate reference with type 'D' for definition
11978 of objects (object declaration and parameter specification), with
11979 appropriate locations and units, for use in local cross-references.
11980 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11981 references of type 'I' for initialization in object definition.
11982 (Output_References): move part of function Lt and procedure
11983 Write_Entity_Name outside of the body. Ignore references of types 'D'
11984 and 'I' introduced for local cross-references.
11985 (Output_Local_References): new procedure to output the local
11986 cross-references sections.
11987 (Lref_Entity_Status): new array defining whether an entity is a local
11988 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11989 with 'I' type when initialization expression is present.
11990 * get_scos.adb, get_scos.ads: Correct comments and typos
11992 2011-08-02 Javier Miranda <miranda@adacore.com>
11994 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11996 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11998 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12001 2011-08-02 Vincent Celier <celier@adacore.com>
12003 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12004 (No_Space_Img): New function
12005 (Find_Excluded_Sources): When reading from a file, record the file name
12006 and the line number for each excluded source.
12007 (Mark_Excluded_Sources): When reporting an error, if the excluded
12008 sources were read from a file, include file name and line number in
12011 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12013 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12015 2011-08-02 Robert Dewar <dewar@adacore.com>
12017 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12019 2011-08-02 Javier Miranda <miranda@adacore.com>
12021 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12022 generation of TSDs to the DOTNET compiler.
12023 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12024 generation of TSDs to the DOTNET compiler.
12026 2011-08-02 Javier Miranda <miranda@adacore.com>
12028 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12029 record of all the tagged types declared inside library level package
12030 declarations, library level package bodies or library level subprograms.
12031 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12032 associated with a given tagged type.
12033 (Build_VM_TSDs): New subprogram.
12034 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12035 compilation units that are subprograms.
12036 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12037 compilation units that are package bodies.
12038 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12039 units that are a package declaration or a package instantiation.
12040 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12041 reorganization to improve the error generated by the frontend when the
12042 function Ada.Tags.Secondary_Tag is not available.
12043 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12044 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12046 2011-08-02 Javier Miranda <miranda@adacore.com>
12048 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12050 2011-08-02 Robert Dewar <dewar@adacore.com>
12052 * s-imenne.ads: Minor reformatting.
12054 2011-08-02 Robert Dewar <dewar@adacore.com>
12056 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12057 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12058 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12060 2011-08-02 Robert Dewar <dewar@adacore.com>
12062 * einfo.ads (Materialize_Entity): Document this is only for renamings
12063 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12064 required debug information in the case where we transform the object
12065 declaration into a renaming declaration.
12066 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12068 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12069 Materialize_Entity.
12071 2011-08-02 Robert Dewar <dewar@adacore.com>
12073 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12074 Suppress_Init_Procs.
12075 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12076 Suppress_Initialization/Initialization_Suppressed.
12077 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12078 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12079 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12080 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12082 2011-08-02 Robert Dewar <dewar@adacore.com>
12084 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12085 Minor reformatting.
12087 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12089 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12090 only have inheritable classwide pre/postconditions.
12092 2011-08-02 Javier Miranda <miranda@adacore.com>
12094 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12095 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12096 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12097 checks if the external tag of a type is the same as the external tag
12098 of some other declaration.
12100 2011-08-02 Thomas Quinot <quinot@adacore.com>
12102 * s-taskin.ads: Minor reformatting.
12104 2011-08-02 Emmanuel Briot <briot@adacore.com>
12106 * g-comlin.adb (Display_Help): swap the order in which it prints the
12107 short help and the general usage.
12109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12111 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12112 the aspect declarations and attach them to the generic copy for
12113 subsequent analysis.
12114 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12115 declarations of the generic tree to the new subprogram declarations.
12116 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12117 conditions that apply to a subprogram instance.
12119 2011-08-02 Robert Dewar <dewar@adacore.com>
12121 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12123 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12125 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12126 private type with a tagged full view is not derived in the immediate
12127 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12129 2011-08-02 Robert Dewar <dewar@adacore.com>
12131 * exp_ch4.adb: Minor reformatting.
12133 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12135 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12136 Ada2012 iterator, the loop will be rewritten during expansion into a
12137 while loop with a cursor and an element declaration. Do not analyze the
12138 body in this case, because if the container is for indefinite types the
12139 actual subtype of the elements will only be determined when the cursor
12140 declaration is analyzed.
12142 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12144 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12145 size/alignment related attributes in CodePeer_Mode.
12147 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12149 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12150 Prepend_Element, since this can result in the operation getting the
12151 wrong slot in the full type's dispatch table if the full type has
12152 inherited operations. The incomplete type's operation will get added
12153 to the proper position in the full type's primitives
12154 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12155 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12156 dispatching operations, since there are cases where nonprimitive
12157 subprograms can get added to the list of incomplete dependents (such
12158 as subprograms in nested packages).
12159 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12160 private part when determining whether to add a primitive with a
12161 parameter of a tagged incomplete type to the Private_Dependents list.
12162 Such primitives can also occur in the visible part, and should not have
12163 been excluded from being private dependents.
12164 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12165 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12166 list of a Taft-amendment incomplete type is a primitive before issuing
12167 an error that the full type must appear in the same unit. There are
12168 cases where nonprimitives can be in the list (such as subprograms in
12170 * sem_disp.adb (Derives_From): Use correct condition for checking that
12171 a formal's type is derived from the type of the corresponding formal in
12172 the parent subprogram (the condition was completely wrong). Add
12173 checking that was missing for controlling result types being derived
12174 from the result type of the parent operation.
12176 2011-08-02 Yannick Moy <moy@adacore.com>
12178 * errout.adb (First_Node): minor renaming
12179 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12182 2011-08-02 Yannick Moy <moy@adacore.com>
12184 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12185 before accessing operands.
12186 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12187 decide whether an initialization expression respects SPARK rules, as
12188 the plain node is the expanded one. This allows for more valid warnings
12190 * gnat_rm.texi: Minor update.
12192 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12194 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12197 2011-08-02 Robert Dewar <dewar@adacore.com>
12199 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12201 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12203 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12204 loop statements and the element renaming declaration with a block when
12205 the element type is controlled.
12207 2011-08-02 Yannick Moy <moy@adacore.com>
12209 * sinfo.ads: Minor formatting.
12211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12213 * sem_aggr.adb (Add_Association): if the association has a box and no
12214 expression, use the Sloc of the aggregate itself for the new
12216 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12219 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12221 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12222 When a container is provided via a function call, generate a renaming
12223 of the function result. This avoids the creation of a transient scope
12224 and the premature finalization of the container.
12225 * exp_ch7.adb (Is_Container_Cursor): Removed.
12226 (Wrap_Transient_Declaration): Remove the supression of the finalization
12227 of the list controller when the declaration denotes a container cursor,
12230 2011-08-02 Yannick Moy <moy@adacore.com>
12232 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12233 node is from source, instead of the original node being from source.
12235 (Resolve_Array_Aggregate): refine the check for a static expression, to
12236 recognize also static ranges
12237 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12238 Array_Type_Declaration): postpone the test for the type being a subtype
12239 mark after the type has been resolved, so that component-selection and
12240 expanded-name are discriminated.
12241 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12242 to distinguish the case of an iteration scheme, so that an error is
12243 issed on a non-static range in SPARK except in an iteration scheme.
12244 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12245 In_Iter_Schm = True.
12246 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12247 user-defined operators so that they are allowed in renaming
12249 (Find_Selected_Component): refine the check for prefixing of operators
12250 so that they are allowed in renaming. Move the checks for restrictions
12251 on selector name after analysis discriminated between
12252 component-selection and expanded-name.
12253 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12254 concatenation argument of string type if it is static.
12255 * sem_util.adb, sem_util.ads
12256 (Check_Later_Vs_Basic_Declarations): add a new function
12257 Is_Later_Declarative_Item to decice which declarations are allowed as
12258 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12259 mode, add that renamings are considered as later items.
12260 (Enclosing_Package): new function to return the enclosing package
12261 (Enter_Name): correct the rule for homonyms in SPARK
12262 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12263 from source (result of expansion) to avoid issuing wrong warnings.
12265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12267 * errout.adb: On anything but an expression First_Node returns its
12270 2011-08-02 Pascal Obry <obry@adacore.com>
12272 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12274 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12276 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12277 Set the associated loop as the related expression of internally
12279 * exp_ch7.adb (Is_Container_Cursor): New routine.
12280 (Wrap_Transient_Declaration): Supress the finalization of the list
12281 controller when the declaration denotes a container cursor.
12283 2011-08-02 Yannick Moy <moy@adacore.com>
12285 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12287 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12288 expression is a simple expression. This check cannot be performed in
12289 the semantics, so just drop it.
12290 (P_Index_Or_Discriminant_Constraint): move check that the index or
12291 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12292 semantics. Other cases were previously checked in the semantics.
12293 * par-ch4.adb (P_Name): move checks that a selector name is not
12294 character literal or an operator symbol to Find_Selected_Component in
12296 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12297 declarations are not placed after later declarations in a separate
12298 procedure in Sem_Util (possibly not the best choice?), to be used both
12299 during parsing, for Ada 83 mode, and during semantic analysis, for
12301 * par-endh.adb (Check_End): move check that end label is not missing
12302 to Process_End_Label in the semantics
12303 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12304 the special case for SPARK restriction
12305 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12306 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12307 parameter Force to issue the error message even on internal node (used
12308 for generated end label). Call Check_Restriction to check when an error
12309 must be issued. In SPARK mode, issue an error message even if the
12310 restriction is not set.
12311 (Check_Restriction): new procedure with an additional out parameter to
12312 inform the caller that a message has been issued
12313 * sem_aggr.adb: Minor modification of message
12314 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12315 instead of issuing an error message directly
12316 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12317 declarations are not placed after later declarations, by calling
12318 Check_Later_Vs_Basic_Declarations
12319 (Analyze_Subtype_Declaration): move here the check that an index or
12320 discriminant constraint must be a subtype mark. Change the check that
12321 a subtype of String must start at one so that it works on subtype marks.
12322 * sem_ch4.adb (Analyze_Call): move here the check that a named
12323 association cannot follow a positional one in a call
12324 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12325 instead of issuing an error message directly
12326 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12327 selector name is not a character literal or an operator symbol. Move
12328 here the check that the prefix of an expanded name cannot be a
12329 subprogram or a loop statement.
12330 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12331 procedure called from parsing and semantics to check that basic
12332 declarations are not placed after later declarations
12333 (Process_End_Label): move here the check that end label is not missing
12335 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12337 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12338 representation clause in codepeer mode, since it confuses CodePeer and
12339 does not bring useful info.
12341 2011-08-02 Ed Falis <falis@adacore.com>
12343 * init.c: initialize fp hw on MILS.
12345 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12347 * errout.adb (First_Node): for bodies, return the node itself (small
12348 optimization). For other nodes, do not check source_unit if the node
12349 comes from Standard.
12351 2011-08-02 Robert Dewar <dewar@adacore.com>
12353 * exp_ch3.adb: Minor comment additions.
12354 * sem_ch13.adb: Minor reformatting.
12356 2011-08-02 Pascal Obry <obry@adacore.com>
12358 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12360 2011-08-02 Robert Dewar <dewar@adacore.com>
12362 * sem_attr.adb: Minor reformatting.
12364 2011-08-02 Robert Dewar <dewar@adacore.com>
12366 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12367 (Has_Default_Component_Value): Removed
12368 * einfo.ads Comment updates
12369 (Has_Default_Aspect): Replaces Has_Default_Value
12370 (Has_Default_Component_Value): Removed
12372 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12374 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12375 (Get_Simple_Init_Val): Handle Default_Value aspect
12376 (Needs_Simple_Initialization): Handle Default_Value aspect
12377 * exp_ch3.ads: Needs_Simple_Initialization
12378 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12379 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12381 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12382 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12383 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12385 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12387 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12388 package containing iteration primitives.
12389 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12391 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12393 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12394 "of", pre-analyze expression in case it is a function call with
12395 finalization actions that must be placed ahead of the loop.
12396 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12397 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12399 2011-08-02 Geert Bosch <bosch@adacore.com>
12401 * cstand.adb (Create_Float_Types): Only consider C's long double for
12402 Long_Long_Float, in addition to double.
12404 2011-08-02 Robert Dewar <dewar@adacore.com>
12406 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12407 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12408 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12409 Minor reformatting.
12411 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12413 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12416 2011-08-02 Javier Miranda <miranda@adacore.com>
12418 * einfo.ads, einfo.adb
12419 (Original_Access_Type): Move this attribute to Node26 since there was
12420 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12421 which causes conflicts and breaks the generation of the .NET compiler.
12422 (Interface_Name): Add missing documentation on JGNAT only uses of
12425 2011-08-02 Geert Bosch <bosch@adacore.com>
12427 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12428 (Find_Back_End_Float_Type): Likewise
12429 (Create_Back_End_Float_Types): Likewise
12430 (Create_Float_Types): Likewise
12431 (Register_Float_Type): Likewise
12432 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12433 Nlist and split out type selection in new local Find_Base_Type function.
12434 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12436 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12438 2011-08-02 Robert Dewar <dewar@adacore.com>
12440 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12442 * opt.ads: Minor comment change.
12443 * sem_ch12.adb: Minor code reorganization.
12445 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12447 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12448 subtype's list of rep items to the list on the full subtype in the case
12449 where the lists are the same.
12451 2011-08-02 Geert Bosch <bosch@adacore.com>
12453 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12454 using the one from System.Strings, which also deallocates all strings.
12456 2011-08-02 Geert Bosch <bosch@adacore.com>
12458 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12460 * gcc-interface/Make-lang.in: Update dependencies.
12462 2011-08-02 Olivier Hainque <hainque@adacore.com>
12464 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12467 2011-08-02 Javier Miranda <miranda@adacore.com>
12469 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12470 associated with anonymous access to subprograms.
12472 2011-08-02 Geert Bosch <bosch@adacore.com>
12475 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12476 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12477 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12478 (Add_Symbol_Definition): Move to switch-c.adb
12479 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12480 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12481 (Add_Symbol_Definition): Move to switch-c.adb.
12482 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12484 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12485 Move to warnsw.adb.
12486 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12487 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12488 Move to warnsw.adb.
12489 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12490 (Add_Symbol_Definition): Moved from Prepcomp.
12491 * switch-c.ads: Update copyright notice. Use String_List instead of
12492 Argument_List, removing dependency on System.OS_Lib.
12494 2011-08-02 Yannick Moy <moy@adacore.com>
12496 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12497 mode on initialization expression which does not respect SPARK
12499 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12500 if the tree referenced by its argument represents an initialization
12501 expression in SPARK, suitable for initializing an object in an object
12504 2011-08-02 Javier Miranda <miranda@adacore.com>
12506 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12507 internally generated access to subprogram with its associated protected
12509 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12511 2011-08-02 Geert Bosch <bosch@adacore.com>
12513 * cstand.adb (Register_Float_Type): Print information about type to
12514 register, if the Debug_Flag_Dot_B is set.
12515 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12516 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12517 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12518 with a requested precision of more than Max_Digits digits and no more
12519 than Max_Base_Digits digits, if a range specification is present and the
12520 Predefined_Float_Types list has a suitable type to derive from.
12521 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12522 case of type completion with pragma Import
12524 (Process_Import_Predefined_Type): Processing to complete a type
12525 with pragma Import. Currently supports floating point types only.
12526 (Set_Convention_From_Pragma): Do nothing without underlying type.
12527 (Process_Convention): Guard against absence of underlying type,
12528 which may happen when importing incomplete types.
12529 (Process_Import_Or_Interface): Handle case of importing predefined
12530 types. Tweak error message.
12532 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12534 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12535 functions to previous change. Reorganize code slightly.
12537 2011-08-02 Geert Bosch <bosch@adacore.com>
12539 * back_end.ads (Register_Type_Proc): New call back procedure type for
12540 allowing the back end to provide information about available types.
12541 (Register_Back_End_Types): New procedure to register back end types.
12542 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12544 * cstand.adb (Back_End_Float_Types): New list for floating point types
12545 supported by the back end.
12546 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12547 (Copy_Float_Type): New procedure to make new copies of predefined types.
12548 (Register_Float_Type): New call back procedure to populate the BEFT list
12549 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12550 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12551 (Create_Float_Types): New procedure to create entities for floating
12552 point types predefined in Standard, and put these and any remaining
12553 BEFTs on the Predefined_Float_Types list.
12554 * stand.ads (Predefined_Float_Types): New list for predefined floating
12555 point types that do not have declarations in package Standard.
12557 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12559 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12560 entity node for the unit containing the parameter.
12561 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12562 (Add_Inlined_Subprogram): Likewise.
12563 * gcc-interface/Make-lang.in: Update dependencies.
12565 2011-08-02 Thomas Quinot <quinot@adacore.com>
12567 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12570 2011-08-02 Geert Bosch <bosch@adacore.com>
12572 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12574 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12576 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12577 computed value of Base_Type.
12579 2011-08-02 Yannick Moy <moy@adacore.com>
12581 * restrict.adb (Check_Restriction): issue an error for any use of
12582 class-wide, even if the No_Dispatch restriction is not set.
12583 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12584 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12585 when completing a private extension, the type named in the private part
12586 is not the same as that named in the visible part.
12587 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12588 of an inherited primitive operations of a tagged type or type extension
12589 that returns the tagged type.
12590 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12591 function which returns True for an implicit operation inherited by the
12592 derived type declaration for the argument type.
12593 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12596 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12598 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12599 Process_Bounds, to perform analysis with expansion of a range or an
12600 expression that is the iteration scheme for a loop.
12601 (Analyze_Iterator_Specification): If domain of iteration is given by a
12602 function call with a controlled result, as is the case if call returns
12603 a predefined container, ensure that finalization actions are properly
12605 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12607 2011-08-02 Javier Miranda <miranda@adacore.com>
12609 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12610 * gcc-interface/Make-lang.in: Update dependencies.
12612 2011-08-02 Javier Miranda <miranda@adacore.com>
12614 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12615 determine if the analysis is performed using N or Original_Node (N).
12616 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12617 functionality of routine Is_Variable avoids code duplication.
12618 * checks.adb (Determine_Range): Handle temporaries generated by
12619 Remove_Side_Effects.
12621 2011-08-02 Javier Miranda <miranda@adacore.com>
12623 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12624 expansion of the condition. Required since the previous analysis was
12625 done with expansion disabled (see Resolve_Quantified_Expression) and
12626 hence checks were not inserted and record comparisons have not been
12629 2011-08-02 Ed Falis <falis@adacore.com>
12631 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12634 2011-08-02 Bob Duff <duff@adacore.com>
12636 * opt.ads: Minor comment fix.
12638 2011-08-02 Bob Duff <duff@adacore.com>
12640 * sem_ch12.adb (Analyze_Package_Instantiation,
12641 Analyze_Subprogram_Instantiation): Turn off style checking while
12642 analyzing an instance. Whatever style checks that apply to the generic
12643 unit should apply, so it makes no sense to apply them in an instance.
12644 This was causing trouble when compiling an instance of a runtime
12645 unit that violates the -gnatyO switch.
12646 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12647 one of the two case statements, causing spurious errors.
12649 2011-08-02 Robert Dewar <dewar@adacore.com>
12651 * uname.adb: Minor reformatting.
12652 * gnatcmd.adb: Minor reformatting.
12653 * exp_attr.adb: Minor reformatting.
12655 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12657 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12658 No_Dispatching_Calls, do not look for the Assign primitive, because
12659 predefined primitives are not created in this case.
12661 2011-08-02 Bob Duff <duff@adacore.com>
12663 * stylesw.ads: Minor comment fixes.
12665 2011-08-02 Robert Dewar <dewar@adacore.com>
12667 * freeze.adb (Add_To_Result): New procedure.
12669 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12671 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12672 time, if the specific run-time routines for handling streams of strings
12673 are not available, use the default mechanism.
12675 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12677 * s-regpat.ads: Fix typo.
12679 2011-08-02 Vincent Celier <celier@adacore.com>
12681 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12682 not null, call it to create the in memory config project file without
12683 parsing an existing default config project file.
12685 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12687 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12689 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12691 * sem_elim.adb: an abstract subprogram does not need an eliminate
12692 pragma for its descendant to be eliminable.
12694 2011-08-02 Ed Falis <falis@adacore.com>
12696 * init.c: revert to handling before previous checkin for VxWorks
12697 * s-intman-vxworks.adb: delete unnecessary declarations related to
12698 using Ada interrupt facilities for handling signals.
12699 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12700 * s-intman-vxworks.ads: Import __gnat_install_handler as
12701 Initialize_Interrupts.
12702 * s-taprop-vxworks.adb: Delete Signal_Mask.
12703 (Abort_Handler): change construction of mask to unblock exception
12706 2011-08-02 Jerome Guitton <guitton@adacore.com>
12708 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12709 Debug_Raise_Exception before propagation starts.
12711 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12713 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12714 to Restriction_Check_Required.
12715 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12716 * sem_res.adb (Resolve_Call): Likewise.
12717 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12719 2011-08-02 Bob Duff <duff@adacore.com>
12721 * stylesw.ads: Update comment.
12722 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12723 * errout.ads: Remove obsolete comment.
12725 2011-08-02 Javier Miranda <miranda@adacore.com>
12727 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12728 (Set_Is_Safe_To_Reevaluate): new procedure.
12729 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12730 assignment is allowed on safe-to-reevaluate variables.
12731 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12732 temporary created to remove side effects in expressions that use
12733 the secondary stack as safe-to-reevaluate.
12734 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12735 variables that are not true constants.
12737 2011-08-02 Robert Dewar <dewar@adacore.com>
12739 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12740 sem_res.adb, sem_ch6.adb: Minor reformatting.
12742 2011-08-02 Jerome Guitton <guitton@adacore.com>
12744 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12748 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12749 not set Overridden_Operation if subprogram is an initialization
12752 2011-08-02 Yannick Moy <moy@adacore.com>
12754 * par-ch6.adb: Correct obsolete name in comments
12755 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12756 which takes two message arguments (existing function takes one), with
12757 second message used for continuation.
12758 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12759 block statements that originate from a source block statement, not
12760 generated block statements
12761 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12762 symmetry with procedure case
12763 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12764 function to issue an error in formal mode if a package specification
12765 contains more than one tagged type or type extension.
12766 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12767 parameters matching formals of tagged types are objects (or ancestor
12768 type conversions of objects), not general expressions. Issue an error
12769 on view conversions that are not involving ancestor conversion of an
12771 (Resolve_Type_Conversion): in formal mode, issue an error on the
12772 operand of an ancestor type conversion which is not an object
12773 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12774 procedure so that it works also for actuals of function calls
12775 (Is_Actual_Tagged_Parameter): new function which determines if its
12776 argument is an actual parameter of a formal of tagged type in a
12778 (Is_SPARK_Object_Reference): new function which determines if the tree
12779 referenced by its argument represents an object in SPARK
12781 2011-08-02 Robert Dewar <dewar@adacore.com>
12783 * sem_ch3.adb: Minor reformatting
12784 Minor comment addition
12785 Minor error msg text change
12787 2011-08-02 Javier Miranda <miranda@adacore.com>
12789 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12790 function. Used to be more precise when we generate a variable plus one
12791 assignment to remove side effects in the evaluation of the Bound
12793 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12794 of the bound expression to force its re-analysis and thus expand the
12795 associated transient scope (if required). Code cleanup replacing the
12796 previous code that declared the constant entity by an invocation to
12797 routine Force_Evaluation which centralizes this work in the frontend.
12799 2011-08-02 Robert Dewar <dewar@adacore.com>
12801 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12802 (Base_Type): Now uses improved Is_Base_Type function
12803 * einfo.ads (Base_Type): Inline this function
12805 2011-08-02 Robert Dewar <dewar@adacore.com>
12807 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12808 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12810 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12812 * gcc-interface/Make-lang.in: Update dependencies.
12813 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12816 2011-08-02 Yannick Moy <moy@adacore.com>
12818 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12819 non-simple expression used in delta constraint
12820 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12821 index constraint which is not a subtype mark
12822 * par.adb: With and use Restrict
12823 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12824 mode on component type which is not a subtype mark and default
12825 expression on component
12826 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12827 of string which does not have a lower index bound equal to 1
12828 (Array_Type_Declaration): issue an error in formal mode on index or
12829 component type which is not a subtype mark, and on aliased keyword on
12831 (Derived_Type_Declaration): issue an error in formal mode on interface,
12832 limited or abstract type
12833 (Record_Type_Declaration): issue an error in formal mode on interface
12834 (Record_Type_Definition): issue an error in formal mode on tagged types
12835 and type extensions not declared in the specification of a library unit
12836 package; on null non-tagged record; on variant part
12838 2011-08-02 Vincent Celier <celier@adacore.com>
12840 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12841 not declared for qualified library project when Library_Name is not
12842 declared, but Library_Dir is.
12844 2011-08-02 Robert Dewar <dewar@adacore.com>
12846 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12847 pragmas (affects aspects [Component_]Default_Value
12848 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12849 component type for the resolution
12851 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12853 * einfo.adb (Base_Type): Tune implementation for speed.
12855 2011-08-02 Robert Dewar <dewar@adacore.com>
12857 * freeze.adb: Minor reformatting.
12859 2011-08-02 Thomas Quinot <quinot@adacore.com>
12861 * scos.ads: Update comments.
12863 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12865 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12866 base type, because the parent may be a subtype of a private type whose
12867 convention is established in a private part.
12869 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12871 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12872 statement in a block when the expansion of the return expression has
12873 created a finalization chain.
12874 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12875 with the parent node.
12876 Add N_Extended_Return_Statement to handle the case where a transient
12877 object declaration appears in the Return_Object_Declarations list of
12878 an extended return statement.
12880 2011-08-02 Matthew Gingell <gingell@adacore.com>
12882 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12883 unused parameter 'name'.
12885 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12887 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12888 inherited operation, check whether its alias, which is the source
12889 operastion that it renames, has been marked eliminated.
12891 2011-08-02 Javier Miranda <miranda@adacore.com>
12893 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12894 in-mode parameter whose type is an access type since it can be used to
12895 modify its designated object. Enforce code that handles as safe an
12896 access type that is not access-to-constant but it is the result of a
12897 previous removal of side-effects.
12898 (Remove_Side_Effects): Minor code reorganization of cases which require
12899 no action. Done to incorporate documentation on new cases uncovered
12900 working in this ticket: no action needed if this routine was invoked
12901 too early and the nodes are not yet decorated.
12902 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12903 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12904 were issued with actuals that are implicitly provided by
12907 2011-08-02 Robert Dewar <dewar@adacore.com>
12909 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12911 2011-08-02 Yannick Moy <moy@adacore.com>
12913 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12914 to issue an error in formal mode on attribute not supported in this mode
12915 (Analyze_Attribute): issue errors on standard attributes not supported
12917 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12918 comment, and issue error in formal mode on modulus which is not a power
12920 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12922 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12924 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12925 operator on modular type (except 'not').
12927 2011-08-02 Robert Dewar <dewar@adacore.com>
12929 * gnat_rm.texi: Minor reformatting.
12931 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12933 * s-osinte-linux.ads: Minor comment update and reformatting.
12934 * i-cexten.ads: Make this unit pure, as for its parent.
12935 Will allow its usage in more contexts if needed.
12937 2011-08-02 Robert Dewar <dewar@adacore.com>
12939 * s-utf_32.ads: Minor comment fix.
12941 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12943 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12944 operation of a tagged synchronized type, handle the case where the
12945 controlling argument is overloaded.
12947 2011-08-02 Yannick Moy <moy@adacore.com>
12949 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12950 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12951 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12952 SPARK mode and formal verification mode on processing SPARK restriction
12953 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12954 requiring consistency checking.
12956 2011-08-02 Robert Dewar <dewar@adacore.com>
12958 * sem_res.adb: Minor reformatting.
12960 2011-08-02 Robert Dewar <dewar@adacore.com>
12962 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12963 a-cforse.ads: Remove unneeded with of Ada.Containers
12964 Remove commented out pragma Inline's
12965 Move specifications of new subprograms to the actual specs
12967 2011-08-02 Yannick Moy <moy@adacore.com>
12969 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12970 a-cforse.ads: Update comments.
12972 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12974 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12976 2011-08-02 Robert Dewar <dewar@adacore.com>
12978 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12979 a-cforse.ads, a-cofove.ads: Minor reformatting.
12981 2011-08-02 Claire Dross <dross@adacore.com>
12983 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12984 a-cofove.ads: Add comments.
12986 2011-08-02 Yannick Moy <moy@adacore.com>
12988 * gnat_rm.texi: Document formal containers.
12990 2011-08-02 Emmanuel Briot <briot@adacore.com>
12992 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12993 are empty sections.
12995 2011-08-02 Robert Dewar <dewar@adacore.com>
12997 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13000 2011-08-02 Robert Dewar <dewar@adacore.com>
13002 * aspects.adb: New aspects Default_Value and Default_Component_Value
13003 New format of Aspect_Names table checks for omitted entries
13004 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13005 handling of boolean aspects for derived types.
13006 New aspects Default_Value and Default_Component_Value
13007 New format of Aspect_Names table checks for omitted entries
13008 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13009 (Has_Default_Value): New flag
13010 (Has_Default_Component_Value): New flag
13011 (Has_Default_Value): New flag
13012 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13014 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13015 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13016 Default_Value and Default_Component_Value
13017 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13018 New aspects Default_Value and Default_Component_Value
13019 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13020 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13022 2011-08-02 Vincent Celier <celier@adacore.com>
13024 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13025 inherit library kind.
13027 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13029 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13030 Minor reformatting.
13032 2011-08-02 Robert Dewar <dewar@adacore.com>
13034 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13036 2011-08-02 Yannick Moy <moy@adacore.com>
13038 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13040 2011-08-02 Robert Dewar <dewar@adacore.com>
13042 * impunit.adb: Add comment.
13044 2011-08-02 Yannick Moy <moy@adacore.com>
13046 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13047 qualification of aggregates in formal mode
13048 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13050 (Resolve_Aggregate): complete the test that an aggregate is adequately
13051 qualified in formal mode
13053 2011-08-02 Pascal Obry <obry@adacore.com>
13055 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13056 * mlib-prj.adb: Supress warning when compiling binder generated file.
13057 (Build_Library): Supress all warnings when compiling the binder
13060 2011-08-02 Yannick Moy <moy@adacore.com>
13062 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13064 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13065 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13066 Add with/use clauses to make Check_Formal_Restriction visible
13068 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13070 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13071 in-parameters when type of the generic formal is private in the generic
13072 spec and non-private in the body.
13074 2011-08-02 Claire Dross <dross@adacore.com>
13076 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13077 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13078 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13079 * impunit.adb, Makefile.rtl: Take new files into account.
13081 2011-08-02 Robert Dewar <dewar@adacore.com>
13083 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13084 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13086 2011-08-02 Yannick Moy <moy@adacore.com>
13088 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13090 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13091 matching static array bounds, taking into account the special case of
13093 * sem_ch3.adb: Typo in comment.
13095 2011-08-02 Yannick Moy <moy@adacore.com>
13097 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13098 which issues an error in formal mode if its argument node is originally
13100 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13101 has a discriminant specification so that it does not include the case
13103 (Derived_Type_Declaration): move here the test that a derived type has a
13104 discriminant specification
13105 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13106 first element of a component association before accessing its choices
13107 (presence of component association is not enough)
13108 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13109 declaration is a library item before accessing the next element in a
13110 list, as library items are not member of lists
13111 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13112 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13113 Check_Formal_Restriction whenever possible.
13115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13117 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13118 reference when needed.
13120 2011-08-02 Bob Duff <duff@adacore.com>
13122 * gnat_ugn.texi: Fix typo.
13124 2011-08-02 Vincent Celier <celier@adacore.com>
13126 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13127 archive file name. Do not use the full path name of archives for Open
13130 2011-08-02 Robert Dewar <dewar@adacore.com>
13132 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13133 Analyze_Aspect_Specifications
13135 (Analyze_Aspect_Specifications): New handling for boolean aspects
13136 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13137 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13138 sequence for Analyze_Aspect_Specifications
13139 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13140 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13142 2011-08-02 Robert Dewar <dewar@adacore.com>
13144 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13145 aspects, since these no longer exist.
13147 2011-08-02 Robert Dewar <dewar@adacore.com>
13149 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13150 semicolon, do not try to see if there are aspects following it.
13151 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13154 2011-08-02 Robert Dewar <dewar@adacore.com>
13156 * sem_ch8.adb, aspects.ads: Minor reformatting.
13158 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13160 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13161 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13163 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13165 2011-08-02 Yannick Moy <moy@adacore.com>
13167 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13168 mode on subprogram declaration outside of package specification, unless
13169 it is followed by a pragma Import
13170 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13171 Access_Type_Declaration): issue error in formal mode on access type
13172 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13174 (Analyze_Object_Declaration): issue error in formal mode on object
13175 declaration which does not respect SPARK restrictions
13176 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13177 declaration which does not respect SPARK restrictions
13178 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13179 error in formal mode on digits or delta constraint
13180 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13181 decimal fixed point type
13182 (Derived_Type_Declaration): issue error in formal mode on derived type
13183 other than type extensions of tagged record types
13184 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13185 with check on access definition
13186 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13187 mode on protected definition.
13188 (Analyze_Task_Definition): issue error in formal mode on task definition
13190 2011-08-02 Robert Dewar <dewar@adacore.com>
13192 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13194 2011-08-02 Javier Miranda <miranda@adacore.com>
13196 * sem_ch6.adb (Can_Override_Operator): New function.
13197 (Verify_Overriding_Indicator): Add missing code to check overriding
13198 indicator in operators. Fixes regression.
13199 (Check_Overriding_Indicator): Minor reformating after replacing the
13200 code that evaluates if the subprogram can override an operator by
13201 invocations to the above new function.
13203 (Write_Field26_Name): Add missing code to ensure that, following
13204 the documentation in einfo.ads, this field is not shown as attribute
13205 "Static_Initialization" on non-dispatching functions.
13207 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13209 * sem_res.adb (Resolve_Call): A call to
13210 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13211 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13212 i.e., when the second parameter is of type Time_Span.
13214 2011-08-02 Vincent Celier <celier@adacore.com>
13216 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13217 with an archive instead of -L<library dir> -l<library name>.
13219 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13221 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13222 mark the base types In_Use in addition to making the operations
13225 2011-08-02 Ed Falis <falis@adacore.com>
13227 * init.c: add and setup __gnat_signal_mask for the exception signals
13228 * s-inmaop-vxworks.adb: new file.
13229 * s-intman-vxworks.adb: remove unnecessary initializations and
13231 * s-intman-vxworks.ads: remove unnecessary variable
13232 * s-taprop-vxworks.adb: simplify signal initialization
13234 2011-08-02 Robert Dewar <dewar@adacore.com>
13236 * sem_ch8.adb: Minor code reorganization, comment updates.
13238 2011-08-02 Robert Dewar <dewar@adacore.com>
13240 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13241 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13243 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13244 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13246 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13248 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13249 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13250 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13251 use_type_clauses, to handle more efficiently use_type and use_all_type
13253 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13254 Ada2012 Use_All_Type clause.
13255 (Use_Class_Wide_Operations): new procedure.
13257 2011-08-02 Robert Dewar <dewar@adacore.com>
13259 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13260 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13261 expression to expression function.
13263 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13265 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13266 if types are compatible.
13268 2011-08-02 Yannick Moy <moy@adacore.com>
13270 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13271 returns True if its argument array types have same dimension and same
13272 static bounds at each index.
13273 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13274 OUT or IN OUT paramaters which are not view conversions in SPARK.
13275 (Resolve_Arithmetic_Op): issue an error in formal mode on
13276 multiplication or division with operands of fixed point types which are
13277 not qualified or explicitly converted.
13278 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13279 Boolean or array type (except String) operands.
13280 (Resolve_Equality_Op): issue an error in formal mode on equality
13281 operators for array types other than String with non-matching static
13283 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13284 for array types with non-matching static bounds. Factorize the code in
13285 Matching_Static_Array_Bounds.
13286 (Resolve_Qualified_Expression): issue an error in formal mode on
13287 qualified expressions for array types with non-matching static bounds.
13288 (Resolve_Type_Conversion): issue an error in formal mode on type
13289 conversion for array types with non-matching static bounds
13291 2011-08-02 Robert Dewar <dewar@adacore.com>
13293 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13295 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13297 * par-ch9.adb: save location of entry for proper error message.
13299 2011-08-02 Javier Miranda <miranda@adacore.com>
13301 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13302 (Use_Full_View) which permits this routine to climb through the
13303 ancestors using the full-view of private parents.
13304 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13305 Use_Full_View to true in calls to Is_Ancestor.
13306 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13307 true in call to Is_Ancestor.
13308 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13309 Use_Full_View to true in call to Is_Ancestor.
13310 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13311 call to Is_Ancestor.
13312 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13313 Use_Full_View to true in calls to Is_Ancestor.
13314 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13315 Make_Select_Specific_Data_Table, Register_Primitive,
13316 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13317 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13318 to true in call to Is_Ancestor.
13319 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13320 Use_Full_View to true in calls to Is_Ancestor.
13322 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13323 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13325 2011-08-02 Robert Dewar <dewar@adacore.com>
13327 * gnat_rm.texi: Minor reformatting.
13328 * sem_prag.adb: Minor reformatting.
13330 2011-08-02 Tristan Gingold <gingold@adacore.com>
13332 * vms_data.ads: Add VMS qualifier for -gnateP.
13334 2011-08-02 Robert Dewar <dewar@adacore.com>
13336 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13337 * par-ch7.adb (P_Package): Proper placement of aspects for package
13338 decl/instantiation.
13339 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13340 (End_Statements): Add Is_Sloc parameterr
13341 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13342 (Check_End): Ad Is_Sloc parameter
13343 (End_Statements): Add Is_Sloc parameterr
13345 2011-08-02 Vincent Celier <celier@adacore.com>
13347 * ug_words: Add VMS qualifier equivalent to -gnateP:
13348 /SYMBOL_PREPROCESSING.
13350 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13352 * gnat-style.texi: For hexadecimal numeric literals the typical
13353 grouping of digits is 4 to represent 2 bytes.
13354 A procedure spec which is split into several lines is indented two
13357 2011-08-02 Yannick Moy <moy@adacore.com>
13359 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13360 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13361 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13363 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13364 choice in array aggregate
13365 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13367 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13368 positional and named aggregate for record, or others in record
13369 aggregate, or multiple choice in record aggregate
13370 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13371 array operands to logical operations AND, OR and XOR do not have the
13372 same static lower and higher bounds
13373 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13375 2011-08-01 Robert Dewar <dewar@adacore.com>
13377 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13378 Replaces Last_Source_Node_In_Sequence.
13379 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13380 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13381 parens and blank in string (this was inconsistently implemented).
13383 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13384 blank in string (this was inconsistently implemented).
13386 (Set_Global_Switches): Set formal mode switches appropriately
13387 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13389 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13390 call Set_Error_Msg_Lang to set "spark" as language name.
13391 * par.adb: Remove unnecessary call to set formal language for errout
13392 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13393 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13395 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13396 calls to it, moved after resolution so that types are known
13397 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13398 result of concatenation is not of type String
13399 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13400 concatenation is not properly restricted
13401 * gnat_rm.texi: Add doc on pragma Spark_95.
13402 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13403 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13404 * gcc-interface/Make-lang.in: Update dependencies.
13406 2011-08-01 Javier Miranda <miranda@adacore.com>
13408 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13409 condition that detects if the overridden operation must replace an
13412 2011-08-01 Javier Miranda <miranda@adacore.com>
13414 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13415 code declarations inserted by Insert_Actions in each alternative of the
13416 N_Case_Expression node.
13418 2011-08-01 Robert Dewar <dewar@adacore.com>
13420 * sem_ch6.adb: Minor code reorganization.
13421 * sem_util.adb: Minor reformatting.
13423 2011-08-01 Pascal Obry <obry@adacore.com>
13425 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13426 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13428 2011-08-01 Yannick Moy <moy@adacore.com>
13430 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13431 literal or operator symbol which is prefixed
13432 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13433 mode on access attributes.
13434 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13435 that concatenation operands are properly restricted in formal mode
13436 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13437 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13438 result of the concatenation has a type different from String.
13439 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13440 Analyze_Quantified_Expression, Analyze_Slice,
13441 Analyze_Null): issue an error in formal mode on unsupported constructs
13443 (Analyze_Block_Statement): only issue error on source block statement
13444 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13445 function which returns the last node in a list of nodes for which
13446 Comes_From_Source returns True, if any
13447 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13448 Last_Source_Node_In_Sequence
13449 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13450 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13451 mode on unsupported constructs
13452 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13453 rest of the actions may be needed later on since the error is marked as
13455 * sinfo.ads: Typos in comments.
13457 2011-08-01 Pascal Obry <obry@adacore.com>
13459 * projects.texi: Minor editing.
13461 2011-08-01 Yannick Moy <moy@adacore.com>
13463 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13464 insertion character ~~
13465 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13466 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13467 with insertion character ~~
13468 (Set_Msg_Text): treat insertion character ~~
13469 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13470 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13471 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13472 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13473 errors related to the formal language restriction not serious
13474 (insertion character |).
13475 * par.adb (Par): set formal language for error messages if needed
13476 * sem_ch6.adb (Check_Missing_Return): take into account possible
13477 generated statements at the end of the function
13478 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13479 enumeration value to define a new pragma SPARK_95
13480 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13481 SPARK_Version): new type and variables to store the SPARK version
13483 (SPARK_Mode): return True when SPARK_Version is set
13484 * par-prag.adb: Correct indentation
13485 (Prag): take Pragma_SPARK_95 into account
13486 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13489 2011-08-01 Robert Dewar <dewar@adacore.com>
13491 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13492 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13493 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13495 2011-08-01 Pascal Obry <obry@adacore.com>
13497 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13498 Target_Name to Get_Path call.
13499 (Parse_Single_Project): Likewise.
13500 (Post_Parse_Context_Clause): Likewise.
13501 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13502 Call Initialise_Project_Path with the proper Target_Name.
13503 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13505 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13506 with the proper Target_Name.
13507 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13508 Part.Parse routine.
13509 (Parse_Project_And_Apply_Config): Likewise.
13510 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13511 This is fine as this part of the code is supporting only native
13513 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13514 is fine as this part of the code is supporting only native compilation.
13516 2011-08-01 Yannick Moy <moy@adacore.com>
13518 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13519 of homonym, unless the homonym is one of the cases allowed in SPARK
13520 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13521 package declaration occurring after a body.
13523 2011-08-01 Robert Dewar <dewar@adacore.com>
13525 * checks.adb, exp_ch4.adb: Minor reformatting.
13527 2011-08-01 Javier Miranda <miranda@adacore.com>
13529 * einfo.ads (Access_Disp_Table): Fix documentation.
13530 (Dispatch_Table_Wrappers): Fix documentation.
13532 2011-08-01 Pascal Obry <obry@adacore.com>
13534 * prj-env.adb, prj-env.ads: Minor reformatting.
13536 2011-08-01 Yannick Moy <moy@adacore.com>
13538 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13539 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13540 procedures out of these packages.
13541 * errout.ads, errout.adb
13542 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13543 procedures in of this package
13544 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13545 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13546 on misplaced later vs initial declarations, like in Ada 83
13547 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13548 formal mode on attribute of private type whose full type declaration
13550 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13551 package declaration inside a package specification
13552 (Analyze_Full_Type_Declaration): issue error in formal mode on
13553 controlled type or discriminant type
13554 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13555 user-defined operator means that it should come from the source
13556 (New_Overloaded_Entity): issue error in formal mode on overloaded
13558 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13560 2011-08-01 Thomas Quinot <quinot@adacore.com>
13562 * atree.adb: Minor reformatting.
13563 * checks.adb: Minor reformatting.
13565 2011-08-01 Vincent Celier <celier@adacore.com>
13567 * s-parame-vms-ia64.ads: Fix typo in comment
13569 * s-parame-vms-restrict.ads: Removed, unused.
13571 2011-08-01 Javier Miranda <miranda@adacore.com>
13574 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13576 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13577 * sem_ch3.ads, sem_ch3.adb
13578 (Is_Constant_Bound): New extended version of the subprogram that was
13579 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13580 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13581 * sem_aux.ads (Constant_Value): Fix typo in comment.
13582 * checks.adb (Generate_Index_Checks): New implementation which, for
13583 array objects with constant bounds, generates the runtime check
13584 referencing the bounds of the array type. For other cases this routine
13585 provides its previous behavior obtaining such values from the array
13587 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13589 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13590 we cannot have semantic interpretations of the new node.
13592 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13594 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13597 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13599 * sem_ch8.adb: Minor code editing.
13600 * s-vxwext.adb: Remove trailing space.
13601 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13602 consistency with other files.
13604 2011-08-01 Thomas Quinot <quinot@adacore.com>
13606 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13608 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13610 * par-ch10.adb: reject parameterized expressions as compilation unit.
13611 * sem_ch4.adb: handle properly conditional expression with overloaded
13612 then_clause and no else_clause.
13614 2011-08-01 Tristan Gingold <gingold@adacore.com>
13616 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13617 like done by System.Aux_DEC.
13618 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13620 2011-08-01 Yannick Moy <moy@adacore.com>
13622 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13623 missing label at end of declaration (subprogram or package)
13624 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13625 of positional and named parameter association
13626 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13627 Error_Msg_SP which adds a prefix to the error message giving the name
13628 of the formal language analyzed
13629 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13630 access result type in subprogram, unconstrained array as result type,.
13631 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13633 * sem_ch8.adb: Code clean up.
13635 2011-08-01 Javier Miranda <miranda@adacore.com>
13637 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13638 * einfo.ads (Access_Disp_Table): Fix documentation.
13639 (Dispatch_Table_Wrappers): Fix documentation.
13640 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13641 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13642 to enforce the documentation of this attribute.
13643 (Set_Is_Interface): Cleanup the assertion.
13644 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13645 the Underlying_Type entity before reading attribute Access_Disp_Table.
13646 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13647 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13648 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13649 the Underlying_Type entity before reading attribute Access_Disp_Table.
13650 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13651 Locate the Underlying_Type entity before reading attribute
13654 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13656 * s-poosiz.ads: Additional overriding indicators.
13658 2011-08-01 Yannick Moy <moy@adacore.com>
13660 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13662 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13663 parameter specification does not include a subtype mark.
13664 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13665 formal mode on abstract subprogram.
13666 (Analyze_Subprogram_Specification): issue error in formal mode on
13667 user-defined operator.
13668 (Process_Formals): issue error in formal mode on access parameter and
13669 default expression.
13670 * sem_ch9.adb (Analyze_Abort_Statement,
13671 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13672 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13673 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13674 Analyze_Requeue, Analyze_Selective_Accept,
13675 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13676 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13677 issue error in formal mode on user-defined raise statement.
13679 2011-08-01 Thomas Quinot <quinot@adacore.com>
13681 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13682 declaration being hidden when overriding an implicit inherited
13684 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13685 (-gnats), do not complain about a source file that contains only a
13688 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13690 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13691 variable if already set.
13693 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13695 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13696 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13697 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13698 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13699 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13700 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13701 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13702 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13703 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13704 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13705 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13706 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13707 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13708 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13709 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13710 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13711 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13712 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13713 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13714 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13715 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13716 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13717 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13718 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13719 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13720 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13721 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13722 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13723 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13724 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13725 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13726 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13727 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13728 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13729 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13730 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13731 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13732 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13733 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13734 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13735 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13736 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13737 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13738 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13739 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13740 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13741 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13742 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13743 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13744 Use GNAT instead of GNARL.
13746 2011-08-01 Bob Duff <duff@adacore.com>
13748 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13749 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13750 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13753 2011-08-01 Yannick Moy <moy@adacore.com>
13755 * debug.adb (d.D) reverve flag for the SPARK mode
13756 (d.E) reverve flag for SPARK generation mode
13757 (d.F) reverve flag for Why generation mode
13758 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13759 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13760 functions which return True when the corresponding modes are set
13761 (Formal_Language): return "spark" or "alfa" when in formal verification
13763 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13764 Error_Msg to prefix the error message with a tag giving the formal
13766 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13767 message with a tag giving the formal language
13768 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13770 (Analyze_Case_Statement): issue error in formal mode on case statement
13771 with a single "others" case alternative
13772 (Analyze_Exit_Statement): issue errors in formal mode on exit
13773 statements which do not respect SPARK restrictions
13774 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13775 (Check_Unreachable_Code): always issue an error (not a warning) in
13776 formal mode on unreachable code (concerns both code after an infinite
13777 loop and after an unconditional jump, both not allowed in SPARK)
13778 * sem_ch6.adb (Analyze_Return_Statement): add call to
13779 Set_Return_Present for a procedure containing a return statement
13780 (already done for functions in Analyze_Function_Return)
13781 (Analyze_Function_Return): issue error in formal mode on extended
13782 return or if return is not last statement in function
13783 (Check_Missing_Return): issue error in formal mode if function does
13784 not end with return or if procedure contains a return
13785 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13786 function to detect if there is an inner scope of its parameter S which
13789 2011-08-01 Thomas Quinot <quinot@adacore.com>
13791 * sem_ch6.ads: Minor reformatting.
13793 2011-08-01 Javier Miranda <miranda@adacore.com>
13795 * sem_util.adb (Abstract_Interface_List): Complete condition when
13796 processing private type declarations to avoid reading unavailable
13798 (Is_Synchronized_Tagged_Type): Complete condition when processing
13799 private extension declaration nodes to avoid reading unavailable
13802 2011-08-01 Thomas Quinot <quinot@adacore.com>
13804 * sem_ch3.adb: Minor reformatting.
13806 2011-08-01 Thomas Quinot <quinot@adacore.com>
13808 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13809 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13810 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13811 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13812 for VMS, instead parametrize the common implementation with
13813 System.Parameters declarations.
13815 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13817 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13819 2011-08-01 Tristan Gingold <gingold@adacore.com>
13821 * seh_init.c: Fix SEH handler installation on win64.
13823 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13825 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13826 double analysis of an anonymous access to subprogram, because it can
13827 lead to improper sharing of profiles and a back-end crash.
13829 2011-08-01 Robert Dewar <dewar@adacore.com>
13831 * make.adb, sem_ch4.adb: Minor reformatting.
13832 * gcc-interface/Make-lang.in: Update dependencies.
13833 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13835 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13837 * gnat_rm.texi: Fix definition of Long_Integer.
13839 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13841 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13842 to prevent storage exhaustion.
13843 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13844 finalized is a function body, insert the cleanup code before the final
13845 return statement, to prevent spurious warnings.
13846 * s-pooglo.ads: add overriding indicator.
13848 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13850 * sem_ch4.adb (Operator_Check): improve error message when both a
13851 with_clause and a use_clause are needed to make operator usage legal.
13852 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13853 determine whether a compilation unit is visible within an other,
13854 either through a with_clause in the current unit, or a with_clause in
13855 its library unit or one one of its parents.
13857 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13859 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13860 over an arbitrary expression of an array or container type.
13861 * lib-xref.adb: clarify comment.
13863 2011-08-01 Bob Duff <duff@adacore.com>
13865 * einfo.ads: Minor reformatting.
13866 * debug.adb: Minor comment improvement.
13868 2011-08-01 Javier Miranda <miranda@adacore.com>
13870 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13871 consider hidden subprograms as valid candidates.
13873 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13875 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13877 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13879 * gnat_ugn.texi: Fix typo.
13881 2011-08-01 Robert Dewar <dewar@adacore.com>
13883 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13884 lib-xref.adb: Minor reformatting
13886 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13888 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13889 when to generate a call to Move_Final_List.
13890 (Has_Controlled_Parts): Remove this function.
13892 2011-08-01 Geert Bosch <bosch@adacore.com>
13894 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13895 "," in choice list.
13897 2011-08-01 Thomas Quinot <quinot@adacore.com>
13899 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13900 explicit raise of a predefined exception as Comes_From_Source if the
13901 original N_Raise_Statement comes from source.
13903 2011-08-01 Robert Dewar <dewar@adacore.com>
13905 * sinfo.ads: Add comment.
13906 * sem_ch6.adb: Minor reformatting.
13908 2011-08-01 Robert Dewar <dewar@adacore.com>
13910 * freeze.adb (Freeze_Entity): Refine check for bad component size
13911 clause to avoid rejecting confirming clause when atomic/aliased present.
13913 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13915 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13916 better determine whether an entity reference is a write.
13917 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13919 * lib-xref.adb (Output_References): Do no suppress a read reference at
13920 the same location as an immediately preceeding modify-reference, to
13921 handle properly in-out actuals.
13923 2011-08-01 Tristan Gingold <gingold@adacore.com>
13925 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13927 2011-08-01 Quentin Ochem <ochem@adacore.com>
13929 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13930 heap to compute the result.
13932 2011-08-01 Robert Dewar <dewar@adacore.com>
13934 * atree.ads: Minor reformatting.
13936 2011-08-01 Emmanuel Briot <briot@adacore.com>
13938 * g-expect.adb (Get_Command_Output): Fix memory leak.
13940 2011-08-01 Geert Bosch <bosch@adacore.com>
13942 * cstand.adb (P_Float_Type): New procedure to print the definition of
13943 predefined fpt types.
13944 (P_Mixed_Name): New procedure to print a name using mixed case
13945 (Print_Standard): Use P_Float_Type for printing floating point types
13946 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13947 precision IEEE float.
13949 2011-08-01 Thomas Quinot <quinot@adacore.com>
13951 * sem_ch3.adb: Minor reformatting.
13953 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13955 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13956 the completion of a generic function, insert the new body rather than
13957 rewriting the original.
13959 2011-08-01 Yannick Moy <moy@adacore.com>
13961 * sinfo.ads, errout.ads: Typos in comments.
13963 2011-08-01 Robert Dewar <dewar@adacore.com>
13965 * par-endh.adb: Minor reformatting.
13967 2011-08-01 Robert Dewar <dewar@adacore.com>
13969 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13970 (Pre_Post_Aspects): New subtype.
13971 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13972 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13973 * par-ch7.adb (P_Package): Remove Decl parameter
13974 (P_Package): Handle new syntax for aspects (before IS)
13975 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13977 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13978 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13979 (P_Package): Remove Decl parameter
13980 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13982 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13984 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13985 * sinfo.ads: Document new syntax for aspects in packages etc.
13986 * sprint.adb: Handle new syntax of aspects before IS in package
13988 2011-08-01 Thomas Quinot <quinot@adacore.com>
13990 * atree.ads: Minor reformatting.
13991 * sem_prag.adb: Minor reformatting.
13993 2011-08-01 Robert Dewar <dewar@adacore.com>
13995 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13996 case expr alternative.
13998 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14000 * sem_ch12.adb: Fix typo.
14002 2011-08-01 Geert Bosch <bosch@adacore.com>
14004 * sem_prag.adb (Check_No_Link_Name): New procedure.
14005 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14006 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14007 instead of Standard_Long_Long_Float_Size global. Preparation for
14008 eventual removal of per type constants.
14009 * exp_util.ads (Get_Stream_Size): New function returning the stream
14010 size value of subtype E.
14011 * exp_util.adb (Get_Stream_Size): Implement new function.
14012 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14014 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14016 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14018 2011-08-01 Geert Bosch <bosch@adacore.com>
14020 * cstand.adb: Fix comments.
14021 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14022 count of arguments.
14024 2011-08-01 Robert Dewar <dewar@adacore.com>
14026 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14028 2011-08-01 Geert Bosch <bosch@adacore.com>
14030 * atree.ads: Fix comment.
14032 2011-08-01 Robert Dewar <dewar@adacore.com>
14034 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14035 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14036 * par.adb: Add with for Namet.Sp.
14037 * par-tchk.adb: Minor reformatting.
14039 2011-08-01 Vincent Celier <celier@adacore.com>
14041 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14042 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14043 of the init procedure of a SAL.
14044 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14047 2011-08-01 Thomas Quinot <quinot@adacore.com>
14049 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14052 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14054 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14056 2011-08-01 Thomas Quinot <quinot@adacore.com>
14058 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14059 conformant with its spec (return True only for types that have
14060 an overriding Initialize primitive operation that prevents them from
14061 having preelaborable initialization).
14062 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14063 initialization for controlled types in Ada 2005 or later mode.
14065 2011-08-01 Robert Dewar <dewar@adacore.com>
14067 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14069 (Same_Aspect): New function.
14070 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14071 Type_Invariant, Precondition, Postcondition.
14072 * snames.ads-tmpl: Add Name_Type_Invariant.
14074 2011-08-01 Robert Dewar <dewar@adacore.com>
14076 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14078 (Freeze_All_Ent): Fix error in handling inherited aspects.
14079 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14080 already analyzed, but don't skip entire processing of a declaration,
14081 that's wrong in some cases of declarations being rewritten.
14082 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14083 Don't delay for integer, string literals
14084 Treat predicates in usual manner for delay, remove special case code,
14086 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14087 (Build_Predicate_Function): Update saved expression in aspect
14088 (Build_Invariant_Procedure): Update saved expression in aspect
14089 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14090 of replacement of discriminant references if the reference is simple.
14092 2011-08-01 Robert Dewar <dewar@adacore.com>
14094 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14095 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14096 Static_Predicate and Dynamic_Predicate.
14097 (Build_Predicate_Function): Add processing for Static_Predicate
14098 and Dynamic_Predicate.
14099 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14100 (From_Static_Predicate): New flag
14101 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14103 2011-08-01 Robert Dewar <dewar@adacore.com>
14105 * usage.adb: Documentation cleanup for Ada version modes in usage.
14106 * expander.adb: Minor reformatting.
14108 2011-08-01 Robert Dewar <dewar@adacore.com>
14110 * atree.ads: Minor comment fix.
14111 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14112 a-witeio.ads, sem_prag.adb: Minor reformatting.
14114 2011-08-01 Doug Rupp <rupp@adacore.com>
14116 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14117 pointers. Use descrip.h header file for convenience. Add some
14120 2011-08-01 Robert Dewar <dewar@adacore.com>
14122 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14123 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14124 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14126 (Check_Aspect_At_End_Of_Declarations): New procedure
14127 (Analye_Aspect_Specification): Minor changes for above procedures
14128 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14129 specification node as well.
14131 2011-08-01 Pascal Obry <obry@adacore.com>
14133 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14134 Windows files. Use GetFilesAttributes() in this case to check for file
14135 existence instead of returning with an error code.
14137 2011-08-01 Vincent Celier <celier@adacore.com>
14139 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14140 High is above Source length.
14142 2011-08-01 Robert Dewar <dewar@adacore.com>
14144 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14146 2011-08-01 Robert Dewar <dewar@adacore.com>
14148 * aspects.ads (Boolean_Aspects): New subtype.
14149 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14150 for derived types in cases where the parent type and derived type have
14152 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14153 with aspects when parent type also has aspects.
14154 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14155 boolean expression at this point).
14156 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14157 accordance with final decision on the Ada 2012 feature.
14158 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14160 2011-08-01 Matthew Heaney <heaney@adacore.com>
14162 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14164 2011-08-01 Pascal Obry <obry@adacore.com>
14166 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14167 Fix Replace_Slice when High is above current string size.
14168 (Replace_Slice): Fix DL computation when High is above current
14171 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14173 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14175 2011-08-01 Matthew Heaney <heaney@adacore.com>
14177 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14180 2011-08-01 Pascal Obry <obry@adacore.com>
14182 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14185 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14187 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14188 access to protected subprograms in generic bodies.
14189 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14190 protected type, indicate that the convention of the subprogram is
14191 Convention_Protected, because it may be used in subsequent declarations
14192 within the protected declaration.
14194 2011-08-01 Vincent Celier <celier@adacore.com>
14196 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14197 and "final" procedures when the name of the library is "ada", to avoid
14198 duplicate symbols "adainit" and "adafinal" in executables.
14200 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14202 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14203 quantified expression that appears within a postcondition and uses the
14204 Ada2012 'Result attribute.
14206 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14208 * init.c (__gnat_error_handler): Cast reason to int.
14209 (__gnat_install_handler): Explain sa_sigaction use.
14211 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14213 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14214 subprogram has copy-in copy-out parameters, try to promote the mode of
14215 the return type if it is passed in registers.
14217 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14219 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14220 left operand as addressable.
14222 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14224 * gcc-interface/gigi.h (build_function_stub): Remove.
14225 (build_return_expr): Likewise.
14226 (convert_vms_descriptor): Declare.
14227 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14228 (build_function_stub): Move to...
14229 * gcc-interface/utils2.c (build_return_expr): Move to...
14230 * gcc-interface/trans.c (build_function_stub): ...here.
14231 (build_return_expr): ...here.
14232 (Subprogram_Body_to_gnu): Add local variable for language_function.
14233 Disconnect the parameter attributes cache, if any, once done with it.
14234 Call end_subprog_body only after setting the end_locus.
14235 Build the stub associated with the function, if any, at the very end.
14236 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14237 variables and streamline control flow.
14239 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14242 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14243 g-trasym-dwarf.adb.
14245 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14248 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14249 Assign to act.sa_sigaction.
14250 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14251 current->return_address to char * before arithmetic.
14253 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14255 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14256 Correct argument types.
14257 Extract code from reason.
14258 (__gnat_install_handler): Assign to act.sa_sigaction.
14260 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14262 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14263 (GNAT1_OBJS): ...here.
14265 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14268 * g-socthi-mingw.adb (Fill): Fix formatting.
14270 * gcc-interface/gigi.h: Move around comment.
14272 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14275 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14277 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14280 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14282 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14284 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14285 range comparison if Pmode is SImode.
14287 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14288 Eric Botcazou <ebotcazou@adacore.com>
14290 * adadecode.c: Wrap up in extern "C" block.
14291 * adadecode.h: Likewise.
14292 * adaint.c: Likewise. Remove 'const' keyword.
14293 * adaint.h: Likewise.
14294 * argv.c: Likewise.
14295 * atree.h: Likewise.
14297 * cstreams.c: Likewise.
14299 * exit.c: Likewise.
14301 * final.c: Likewise.
14302 * init.c: Likewise.
14303 * initialize.c: Likewise.
14304 * link.c: Likewise.
14305 * namet.h: Likewise.
14306 * nlists.h: Likewise.
14307 * raise.c: Likewise.
14308 * raise.h: Likewise.
14309 * repinfo.h: Likewise.
14310 * seh_init.c: Likewise.
14311 * targext.c: Likewise.
14312 * tracebak.c: Likewise.
14313 * uintp.h: Likewise.
14314 * urealp.h: Likewise.
14315 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14316 * xsinfo.adb: Likewise.
14317 * xsnamest.adb: Likewise.
14318 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14319 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14320 * gcc-interface/misc.c: Likewise.
14321 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14322 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14323 ada/targext.o here...
14324 (GNAT_ADA_OBJS): ...and not here.
14325 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14326 (GNATBIND_OBJS): Reorder.
14328 2011-07-07 Richard Henderson <rth@redhat.com>
14330 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14331 dwarf2out_frame_init.
14333 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14335 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14337 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14340 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14342 2011-07-06 Richard Guenther <rguenther@suse.de>
14344 * gcc-interface/misc.c (gnat_init): Merge calls to
14345 build_common_tree_nodes and build_common_tree_nodes_2.
14346 Re-initialize boolean_false_node.
14348 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14349 Olivier Hainque <hainque@adacore.com>
14350 Nicolas Setton <setton@adacore.com>
14352 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14353 the type according to the ARTIFICIAL_P parameter.
14354 (create_type_decl): Likewise.
14355 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14357 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14359 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14360 (gnatbind): Likewise.
14362 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14364 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14366 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14368 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14369 local variable throughout. Remove useless call to Base_Type.
14370 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14371 Take it also into account for the volatileness of the field. Set the
14372 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14374 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14376 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14377 on a dereference built for a by-ref object if it has an address clause.
14379 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14381 * einfo.ads (Address_Taken): Document use for the second argument of
14382 Asm_Input and Asm_Output attributes.
14383 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14384 argument is an entity name, then set Address_Taken on it.
14385 <Attribute_Asm_Output>: Likewise.
14386 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14387 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14388 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14389 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14391 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14393 PR middle-end/46500
14394 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14396 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14398 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14399 (ada/utils.o): Update dependencies.
14400 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14401 ../../../libcpp/libcpp.a.
14402 * gcc-interface/utils.c: Include common/common-target.h.
14403 (process_attributes): Use targetm_common.have_named_sections.
14405 2011-06-07 Richard Guenther <rguenther@suse.de>
14407 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14410 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14412 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14413 TREE_THIS_NOTRAP flag.
14415 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14417 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14420 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14422 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14423 constants whose full view has discriminants specially.
14425 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14427 * gcc-interface/utils.c: Include diagnostic.h.
14428 (gnat_write_global_declarations): Output debug information for all
14429 global type declarations before finalizing the compilation unit.
14430 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14432 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14434 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14436 2011-05-25 Kai Tietz <ktietz@redhat.com>
14438 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14439 initialization instead of const/none-const pointer assignment.
14441 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14443 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14444 $(EXTRA_GNAT1_OBJS).
14445 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14446 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14447 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14448 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14449 libcommon-target.a instead of prefix.o.
14451 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14454 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14456 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14458 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14459 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14460 instead of version.o.
14462 2011-05-18 Kai Tietz <ktietz@redhat.com>
14464 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14465 boolean_false_node instead of integer_zero_node.
14466 (convert_with_check): Likewise.
14467 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14469 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14471 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14472 type of the parameter is an unconstrained array, convert the actual to
14473 the type of the formal in the In Out and Out cases as well.
14475 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14477 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14478 call build_function_type_array or build_varargs_function_type_array
14480 (create_subprog_type): Don't call build_function_type; call
14481 build_function_type_vec instead.
14483 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14485 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14486 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14487 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14489 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14491 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14493 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14494 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14496 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14498 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14500 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14502 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14503 instead of accessing TYPE_ARG_TYPES directly.
14504 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14506 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14509 * gcc-interface/gigi.h (get_variant_part): Declare.
14510 * gcc-interface/decl.c (get_variant_part): Make global.
14511 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14512 types have the same constant size, are record types and T1 has a
14513 variant part while T2 doesn't.
14515 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14517 * gcc-interface/utils.c (begin_subprog_body): Do not call
14519 (end_subprog_body): Likewise.
14521 2011-05-04 Richard Guenther <rguenther@suse.de>
14523 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14525 (pos_to_constructor): Likewise.
14527 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14528 Eric Botcazou <ebotcazou@adacore.com>
14530 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14531 of build_function_type. Adjust calls to...
14532 (build_raise_check): ...this. Do not take a void_tree parameter.
14533 Call build_function_type_list instead of build_function_type.
14534 Fix head comment and swap couple of conditional blocks.
14536 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14538 * gnatvsn.ads (Library_Version): Bump to 4.7.
14539 (Current_Year): Bump to 2011.
14541 2011-04-29 Michael Matz <matz@suse.de>
14543 * gcc-interface/misc.c (gnat_handle_option): Set
14544 warn_maybe_uninitialized.
14546 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14548 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14549 the Watson/McCabe paper.
14551 2011-04-23 Jim Meyering <meyering@redhat.com>
14553 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14555 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14557 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14560 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14562 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14564 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14565 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14566 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14567 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14568 <all>: Do not set flags on the reused DECL node coming from an alias.
14569 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14570 don't need debug info here...
14571 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14572 (gigi): Adjust calls to create_subprog_decl.
14573 (build_raise_check): Likewise.
14574 (establish_gnat_vms_condition_handler): Likewise.
14575 (Compilation_Unit_to_gnu): Likewise.
14576 (gnat_to_gnu): Likewise.
14578 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14580 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14581 (NO_REORDER_ADAFLAGS): New variable.
14582 (EXTRA_GNATTOOLS): Always define.
14583 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14584 Clean up and adjust list of files compiled with special options.
14585 * gcc-interface/Make-lang.in: Likewise.
14586 (ada/decl.o): Cosmetical change.
14587 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14589 2011-04-20 Jim Meyering <meyering@redhat.com>
14591 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14593 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14595 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14596 $(CFLAGS) on the link line.
14598 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14600 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14601 padded type built for the return type if it is unconstrained.
14603 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14605 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14607 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14609 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14610 before calling TREE_CHAIN.
14611 * gcc-interface/misc.c (gnat_init_ts): New function.
14612 (LANG_HOOKS_INIT_TS): Define.
14614 2011-04-12 Martin Jambor <mjambor@suse.cz>
14616 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14617 instead of cgraph_node.
14619 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14621 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14622 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14625 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14627 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14628 of aggregate types that contain a placeholder.
14630 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14632 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14634 (handle_type_generic_attribute): Likewise.
14636 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14639 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14641 2011-04-04 Kai Tietz <ktietz@redhat.com>
14644 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14647 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14649 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14650 type case, do not strip a padding type around the array type.
14652 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14654 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14657 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14659 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14660 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14661 code for -feliminate-unused-debug-types.
14662 (gnat_post_options): Likewise.
14664 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14666 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14667 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14670 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14672 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14673 DECL_ARTIFICIAL flag on enumeration types.
14675 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14677 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14678 fat pointer types artificial unconditionally.
14679 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14682 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14684 * gcc-interface/gigi.h (get_dummy_type): Declare.
14685 (build_dummy_unc_pointer_types): Likewise.
14686 (finish_fat_pointer_type): Likewise.
14687 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14688 fat pointer type has been built, complete it in place.
14689 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14690 and thin pointers. Remove useless variable.
14691 (finish_fat_pointer_type): Make global and move to...
14692 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14693 (get_dummy_type): New function.
14694 (build_dummy_unc_pointer_types): Likewise.
14695 (gnat_pushdecl): Propage the name to the anonymous variants only.
14696 (update_pointer_to): Only adjust the pointer types in the unconstrained
14699 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14701 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14702 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14703 if this is a Taft amendment type and the full declaration is available.
14704 * gcc-interface/trans.c (process_type): Likewise.
14705 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14706 (process_freeze_entity): Likewise.
14707 * gcc-interface/utils.c (dummy_global): New static variable.
14708 (gnat_write_global_declarations): If there are types declared as used
14709 at the global level, insert them in the global hash table.
14711 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14713 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14714 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14715 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14717 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14718 flag of the type accordingly.
14719 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14721 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14723 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14724 finalizing types when updating the pointers to the designated type.
14725 <all>: Finalize the deferred types even if we didn't defer processing
14726 of incomplete types in this invocation.
14728 2011-04-01 Olivier Hainque <hainque@adacore.com>
14729 Nicolas Setton <setton@adacore.com>
14730 Eric Botcazou <ebotcazou@adacore.com>
14732 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14733 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14735 2011-03-28 Kai Tietz <ktietz@redhat.com>
14737 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14739 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14740 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14742 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14744 2011-03-28 Tristan Gingold <gingold@adacore.com>
14747 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14748 Use ada output of gnatbind.
14749 (ada/b_gnatb.adb): Ditto.
14750 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14751 (ada.mostlyclean, ada.stage1)
14752 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14753 (ada.stagefeedback): Adjust.
14754 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14755 Use ada output of gnatbind.
14756 (b_gnatm.adb): Ditto.
14757 (b_gnatl.o, b_gnatm.o): New rules.
14759 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14761 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14762 for the padded type built to support a specified size or alignment.
14764 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14766 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14767 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14768 unconditionally to the end of the unit when the designated type is
14770 <all>: Rename local variable. Attempt to un-defer types only and do it
14771 for limited_with'ed types as well.
14772 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14773 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14774 consistently and remove redundant call to finalize_from_with_types.
14776 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14778 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14779 subprograms without a previous spec declared in the same unit.
14780 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14781 subprograms at the end of the unit instead of at the beginning.
14782 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14783 isn't public for the special handling of non-inline functions nested
14784 inside inline external functions.
14786 2011-03-25 Jeff Law <law@redhat.com>
14788 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14790 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14792 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14793 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14794 to compute Set_Size_Depends_On_Discriminant.
14795 (Layout_Type): Call it on array types in back-end layout mode.
14796 * sem_util.adb (Requires_Transient_Scope): Return true for array
14797 types only if the size depends on the value of discriminants.
14798 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14799 type if the RHS is a call to a function that returns an unconstrained
14800 type with default discriminant.
14802 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14804 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14805 non-conversion to the nominal result type at the end.
14807 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14809 * gcc-interface/trans.c (create_temporary): New function taken from...
14810 (create_init_temporary): ...here. Call it.
14811 (call_to_gnu): Create the temporary for the return value early, if any.
14812 Create it for a function with copy-in/copy-out parameters if there is
14813 no target; in other cases of copy-in/copy-out, use another temporary.
14814 Push the new binding level lazily. Add and rename local variables.
14816 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14818 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14820 (set_rm_size): Likewise.
14822 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14824 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14825 for the padded type built in order to support a specified alignment.
14826 Fix incorrect formatting.
14828 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14831 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14833 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14835 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14836 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14837 to the end of the list. Adjust recursive call. Rename local variable.
14838 If REORDER is true, reorder components of the record type.
14839 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14840 components_to_record and adjust the parameter list.
14842 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14844 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14845 disabled, use the variable for bounds of loop iteration scheme.
14847 2011-03-21 Kai Tietz <ktietz@redhat.com>
14850 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14852 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14854 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14855 out whether the expression is read-only. Short-circuit placeholder
14856 case and rename a couple of local variables.
14858 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14860 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14861 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14862 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14863 (convert): Deal with conversions from a smaller form type specially.
14865 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14867 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14868 its argument, except for the special -I- switch.
14870 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14872 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14875 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14877 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14879 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14881 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14883 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14884 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14885 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14886 Do not generate the check directly, instead instantiate the template
14887 check present in the descriptor.
14888 (make_descriptor_field): Move around.
14889 (build_vms_descriptor32): Build a template check in the POINTER field.
14890 (build_vms_descriptor): Remove useless suffixes.
14891 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14893 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14896 * targext.c: Include target files if IN_RTS is defined.
14898 2011-01-26 Richard Guenther <rguenther@suse.de>
14901 * targext.c: Include config.h.
14902 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14905 2011-01-04 Pascal Obry <obry@adacore.com>
14906 Eric Botcazou <ebotcazou@adacore.com>
14908 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14910 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14912 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14913 end-of-case on the end label and its associated gotos, if any.
14915 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14917 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14918 expressions of the parameter cache within the statement group of
14919 the CICO mechanism.
14921 2011-01-04 Olivier Hainque <hainque@adacore.com>
14922 Eric Botcazou <ebotcazou@adacore.com>
14924 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14925 (set_end_locus_from_node): New function.
14926 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14927 make and the function end_locus.
14928 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14929 for the elaboration subprogram.
14930 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14931 set the end_locus of the expression as well.
14933 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14936 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14937 variables that are referenced in exception handlers volatile.
14941 Copyright (C) 2011 Free Software Foundation, Inc.
14943 Copying and distribution of this file, with or without modification,
14944 are permitted in any medium without royalty provided the copyright
14945 notice and this notice are preserved.
14947 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14948 - fix bugs in the description of Source_Trace;
14949 - get rid of UNIT_NAME;
14951 2011-08-02 Javier Miranda <miranda@adacore.com>
14954 (Build_Dispatching_Requeue): Adding support for VM targets
14955 since we cannot directly reference the Tag entity.
14956 * exp_sel.adb (Build_K): Adding support for VM targets.
14957 (Build_S_Assignment): Adding support for VM targets.
14959 (Default_Prim_Op_Position): In VM targets do not restrict availability
14960 of predefined interface primitives to compiling in Ada 2005 mode.
14961 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14962 restricted to compiling in Ada 2005 mode.
14963 (Make_VM_TSD): Generate code that declares and initializes the OSD
14964 record. Needed to support dispatching calls through synchronized
14967 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14968 primitives associated with synchronized interfaces.
14969 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14970 primitives associated with synchronized interfaces.
14972 2011-08-02 Yannick Moy <moy@adacore.com>
14974 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14975 statements hidden in SPARK if preceded by the HIDE directive
14976 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14977 exception handlers as hidden in SPARK if preceded by the HIDE directive
14978 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14979 if starting with the HIDE directive
14980 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14981 starting with the HIDE directive; mark the declarations in a private
14982 part as hidden in SPARK if the private part starts with the HIDE
14984 * restrict.adb, restrict.ads
14985 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14986 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14987 argument node belongs to a part which is hidden in SPARK
14988 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14989 parts in SPARK; protect the possibly costly call to
14990 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14991 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14992 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14993 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14995 (Scan): recognize special comment starting with '#' and followed by
14996 SPARK keyword "hide" as a HIDE directive.
14998 2011-08-02 Yannick Moy <moy@adacore.com>
15000 * types.ads, erroutc.ads: Minor reformatting.
15002 2011-08-02 Vincent Celier <celier@adacore.com>
15004 * link.c: Add response file support for cross platforms.
15006 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15008 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
15009 in an association, set parent field of copy before partial analysis.
15010 * sem_res.adb (Resolve_Slice): create reference to itype only when
15011 expansion is enabled.
15013 2011-08-02 Yannick Moy <moy@adacore.com>
15015 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
15016 for new flag denoting which subprogram bodies are in ALFA
15017 * restrict.adb, sem_ch7.adb: Update comment
15018 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
15019 sem_ch9.adb, sem_res.adb: Add calls to
15020 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
15021 * sem_ch6.adb (Analyze_Function_Return): add calls to
15022 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
15023 middle of the body, and extended return.
15024 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
15025 False when missing return.
15026 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
15027 to True for subprograms whose spec is in ALFA. Remove later on the flag
15028 on the entity used for a subprogram body when there exists a separate
15030 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
15031 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
15032 False, otherwise do nothing.
15034 2011-08-02 Robert Dewar <dewar@adacore.com>
15036 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15038 2011-08-02 Yannick Moy <moy@adacore.com>
15040 * sem_ch4.ads: minor formatting.
15042 2011-08-02 Yannick Moy <moy@adacore.com>
15044 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
15045 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
15046 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
15047 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
15048 opt.ads: cleanup of SPARK mode
15050 2011-08-02 Yannick Moy <moy@adacore.com>
15052 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
15054 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
15055 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
15057 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
15058 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
15059 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
15060 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
15062 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
15064 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
15065 functions whose return type is not in ALFA.
15066 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
15068 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
15069 parameter's type is not in ALFA.
15070 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
15073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15075 * sem_ch6 (Analyze_Expression_Function): treat the function as
15076 Inline_Always, and introduce a subprogram declaration for it when it is
15078 * inline.adb (Add_Inlined_Body): recognize bodies that come from
15079 expression functions, so that the back-end can determine whether they
15080 can in fact be inlined.
15081 * sem_util.adb (Is_Expression_Function): predicate to determine whether
15082 a function body comes from an expression function.
15084 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15086 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
15087 null exclusions to test Can_Never_Be_Null on the anonymous access types
15088 of the formals rather than testing the formals themselves. Exclude this
15089 check in cases where the Old_Formal is marked as a controlling formal,
15090 to avoid issuing spurious errors for bodies completing dispatching
15091 operations (due to the flag not getting set on controlling access
15092 formals in body specs).
15093 (Find_Corresponding_Spec): When checking full and subtype conformance of
15094 subprogram bodies in instances, pass Designated and E in that order, for
15095 consistency with the expected order of the formals (New_Id followed by
15098 2011-08-02 Robert Dewar <dewar@adacore.com>
15100 * sem_ch8.adb: Minor reformatting.
15102 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15104 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
15105 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
15106 primitive operations of class-wide actuals.
15108 2011-08-02 Javier Miranda <miranda@adacore.com>
15110 * exp_atag.ads, exp_atag.adb
15111 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
15112 since its value is implicitly passed in argument Typ.
15113 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
15114 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
15115 Build_Common_Dispatching_Select_Statements.
15117 2011-08-02 Robert Dewar <dewar@adacore.com>
15119 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
15120 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
15121 Minor reformatting.
15123 2011-08-02 Robert Dewar <dewar@adacore.com>
15125 * sem_res.adb: Minor reformatting.
15126 * sem_prag.adb: Minor reformatting.
15128 2011-08-02 Javier Miranda <miranda@adacore.com>
15130 * exp_atag.adb, exp_atags.ads
15131 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
15132 by the tagged type Entity. Required to use this routine in the VM
15133 targets since we do not have available the Tag entity in the VM
15136 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
15137 Ada.Tags has not been previously loaded.
15139 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
15140 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
15142 (Enclosing_Dynamic_Scope): Add missing support to handle the full
15143 view of enclosing scopes. Required to handle enclosing scopes that
15144 are synchronized types whose full view is a task type.
15146 (Build_VM_TSDs): Minor code improvement to avoid generating and
15147 analyzing lists with empty nodes.
15148 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
15149 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
15150 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
15151 (Make_Disp_Timed_Select_Body): Add support for VM targets.
15152 (Make_Select_Specific_Data_Table): Add support for VM targets.
15153 (Make_VM_TSD): Generate code to initialize the SSD structure of
15156 2011-08-02 Yannick Moy <moy@adacore.com>
15158 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
15159 cross-references section in ALI.
15160 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
15161 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
15163 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
15164 subprogram or package entity of a node
15165 (Is_Local_Reference_Type): new function returns True for references
15166 selected in local cross-references.
15167 (Lt): function extracted from Lt in Output_References
15168 (Write_Entity_Name): function extracted from Output_References
15169 (Generate_Definition): generate reference with type 'D' for definition
15170 of objects (object declaration and parameter specification), with
15171 appropriate locations and units, for use in local cross-references.
15172 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
15173 references of type 'I' for initialization in object definition.
15174 (Output_References): move part of function Lt and procedure
15175 Write_Entity_Name outside of the body. Ignore references of types 'D'
15176 and 'I' introduced for local cross-references.
15177 (Output_Local_References): new procedure to output the local
15178 cross-references sections.
15179 (Lref_Entity_Status): new array defining whether an entity is a local
15180 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
15181 with 'I' type when initialization expression is present.
15182 * get_scos.adb, get_scos.ads: Correct comments and typos
15184 2011-08-02 Javier Miranda <miranda@adacore.com>
15186 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
15188 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
15190 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
15193 2011-08-02 Vincent Celier <celier@adacore.com>
15195 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
15196 (No_Space_Img): New function
15197 (Find_Excluded_Sources): When reading from a file, record the file name
15198 and the line number for each excluded source.
15199 (Mark_Excluded_Sources): When reporting an error, if the excluded
15200 sources were read from a file, include file name and line number in
15203 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15205 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
15207 2011-08-02 Robert Dewar <dewar@adacore.com>
15209 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
15211 2011-08-02 Javier Miranda <miranda@adacore.com>
15213 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
15214 generation of TSDs to the DOTNET compiler.
15215 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
15216 generation of TSDs to the DOTNET compiler.
15218 2011-08-02 Javier Miranda <miranda@adacore.com>
15220 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
15221 record of all the tagged types declared inside library level package
15222 declarations, library level package bodies or library level subprograms.
15223 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
15224 associated with a given tagged type.
15225 (Build_VM_TSDs): New subprogram.
15226 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
15227 compilation units that are subprograms.
15228 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
15229 compilation units that are package bodies.
15230 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
15231 units that are a package declaration or a package instantiation.
15232 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
15233 reorganization to improve the error generated by the frontend when the
15234 function Ada.Tags.Secondary_Tag is not available.
15235 * rtsfind.ads (RE_Register_TSD): New runtime entity.
15236 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
15238 2011-08-02 Javier Miranda <miranda@adacore.com>
15240 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
15242 2011-08-02 Robert Dewar <dewar@adacore.com>
15244 * s-imenne.ads: Minor reformatting.
15246 2011-08-02 Robert Dewar <dewar@adacore.com>
15248 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
15249 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
15250 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
15252 2011-08-02 Robert Dewar <dewar@adacore.com>
15254 * einfo.ads (Materialize_Entity): Document this is only for renamings
15255 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
15256 required debug information in the case where we transform the object
15257 declaration into a renaming declaration.
15258 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
15260 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
15261 Materialize_Entity.
15263 2011-08-02 Robert Dewar <dewar@adacore.com>
15265 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
15266 Suppress_Init_Procs.
15267 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
15268 Suppress_Initialization/Initialization_Suppressed.
15269 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
15270 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
15271 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
15272 * sem_prag.adb: New processing for pragma Suppress_Initialization.
15274 2011-08-02 Robert Dewar <dewar@adacore.com>
15276 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
15277 Minor reformatting.
15279 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15281 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
15282 only have inheritable classwide pre/postconditions.
15284 2011-08-02 Javier Miranda <miranda@adacore.com>
15286 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
15287 * rtsfind.ads (RE_Check_TSD): New runtime entity.
15288 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
15289 checks if the external tag of a type is the same as the external tag
15290 of some other declaration.
15292 2011-08-02 Thomas Quinot <quinot@adacore.com>
15294 * s-taskin.ads: Minor reformatting.
15296 2011-08-02 Emmanuel Briot <briot@adacore.com>
15298 * g-comlin.adb (Display_Help): swap the order in which it prints the
15299 short help and the general usage.
15301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15303 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
15304 the aspect declarations and attach them to the generic copy for
15305 subsequent analysis.
15306 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
15307 declarations of the generic tree to the new subprogram declarations.
15308 * sem_attr.adb (Check_Precondition_Postcondition): recognize
15309 conditions that apply to a subprogram instance.
15311 2011-08-02 Robert Dewar <dewar@adacore.com>
15313 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
15315 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15317 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
15318 private type with a tagged full view is not derived in the immediate
15319 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
15321 2011-08-02 Robert Dewar <dewar@adacore.com>
15323 * exp_ch4.adb: Minor reformatting.
15325 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15327 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
15328 Ada2012 iterator, the loop will be rewritten during expansion into a
15329 while loop with a cursor and an element declaration. Do not analyze the
15330 body in this case, because if the container is for indefinite types the
15331 actual subtype of the elements will only be determined when the cursor
15332 declaration is analyzed.
15334 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15336 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
15337 size/alignment related attributes in CodePeer_Mode.
15339 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15341 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
15342 Prepend_Element, since this can result in the operation getting the
15343 wrong slot in the full type's dispatch table if the full type has
15344 inherited operations. The incomplete type's operation will get added
15345 to the proper position in the full type's primitives
15346 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
15347 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
15348 dispatching operations, since there are cases where nonprimitive
15349 subprograms can get added to the list of incomplete dependents (such
15350 as subprograms in nested packages).
15351 * sem_ch6.adb (Process_Formals): First, remove test for being in a
15352 private part when determining whether to add a primitive with a
15353 parameter of a tagged incomplete type to the Private_Dependents list.
15354 Such primitives can also occur in the visible part, and should not have
15355 been excluded from being private dependents.
15356 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
15357 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
15358 list of a Taft-amendment incomplete type is a primitive before issuing
15359 an error that the full type must appear in the same unit. There are
15360 cases where nonprimitives can be in the list (such as subprograms in
15362 * sem_disp.adb (Derives_From): Use correct condition for checking that
15363 a formal's type is derived from the type of the corresponding formal in
15364 the parent subprogram (the condition was completely wrong). Add
15365 checking that was missing for controlling result types being derived
15366 from the result type of the parent operation.
15368 2011-08-02 Yannick Moy <moy@adacore.com>
15370 * errout.adb (First_Node): minor renaming
15371 * restrict.adb (Check_Formal_Restriction): put restriction warning on
15374 2011-08-02 Yannick Moy <moy@adacore.com>
15376 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
15377 before accessing operands.
15378 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
15379 decide whether an initialization expression respects SPARK rules, as
15380 the plain node is the expanded one. This allows for more valid warnings
15382 * gnat_rm.texi: Minor update.
15384 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15386 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
15389 2011-08-02 Robert Dewar <dewar@adacore.com>
15391 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
15393 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15395 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
15396 loop statements and the element renaming declaration with a block when
15397 the element type is controlled.
15399 2011-08-02 Yannick Moy <moy@adacore.com>
15401 * sinfo.ads: Minor formatting.
15403 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15405 * sem_aggr.adb (Add_Association): if the association has a box and no
15406 expression, use the Sloc of the aggregate itself for the new
15408 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
15411 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15413 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
15414 When a container is provided via a function call, generate a renaming
15415 of the function result. This avoids the creation of a transient scope
15416 and the premature finalization of the container.
15417 * exp_ch7.adb (Is_Container_Cursor): Removed.
15418 (Wrap_Transient_Declaration): Remove the supression of the finalization
15419 of the list controller when the declaration denotes a container cursor,
15422 2011-08-02 Yannick Moy <moy@adacore.com>
15424 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
15425 node is from source, instead of the original node being from source.
15427 (Resolve_Array_Aggregate): refine the check for a static expression, to
15428 recognize also static ranges
15429 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
15430 Array_Type_Declaration): postpone the test for the type being a subtype
15431 mark after the type has been resolved, so that component-selection and
15432 expanded-name are discriminated.
15433 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
15434 to distinguish the case of an iteration scheme, so that an error is
15435 issed on a non-static range in SPARK except in an iteration scheme.
15436 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
15437 In_Iter_Schm = True.
15438 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
15439 user-defined operators so that they are allowed in renaming
15441 (Find_Selected_Component): refine the check for prefixing of operators
15442 so that they are allowed in renaming. Move the checks for restrictions
15443 on selector name after analysis discriminated between
15444 component-selection and expanded-name.
15445 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
15446 concatenation argument of string type if it is static.
15447 * sem_util.adb, sem_util.ads
15448 (Check_Later_Vs_Basic_Declarations): add a new function
15449 Is_Later_Declarative_Item to decice which declarations are allowed as
15450 later items, in the two different modes Ada 83 and SPARK. In the SPARK
15451 mode, add that renamings are considered as later items.
15452 (Enclosing_Package): new function to return the enclosing package
15453 (Enter_Name): correct the rule for homonyms in SPARK
15454 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
15455 from source (result of expansion) to avoid issuing wrong warnings.
15457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15459 * errout.adb: On anything but an expression First_Node returns its
15462 2011-08-02 Pascal Obry <obry@adacore.com>
15464 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
15466 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15468 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
15469 Set the associated loop as the related expression of internally
15471 * exp_ch7.adb (Is_Container_Cursor): New routine.
15472 (Wrap_Transient_Declaration): Supress the finalization of the list
15473 controller when the declaration denotes a container cursor.
15475 2011-08-02 Yannick Moy <moy@adacore.com>
15477 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
15479 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
15480 expression is a simple expression. This check cannot be performed in
15481 the semantics, so just drop it.
15482 (P_Index_Or_Discriminant_Constraint): move check that the index or
15483 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
15484 semantics. Other cases were previously checked in the semantics.
15485 * par-ch4.adb (P_Name): move checks that a selector name is not
15486 character literal or an operator symbol to Find_Selected_Component in
15488 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
15489 declarations are not placed after later declarations in a separate
15490 procedure in Sem_Util (possibly not the best choice?), to be used both
15491 during parsing, for Ada 83 mode, and during semantic analysis, for
15493 * par-endh.adb (Check_End): move check that end label is not missing
15494 to Process_End_Label in the semantics
15495 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
15496 the special case for SPARK restriction
15497 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
15498 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
15499 parameter Force to issue the error message even on internal node (used
15500 for generated end label). Call Check_Restriction to check when an error
15501 must be issued. In SPARK mode, issue an error message even if the
15502 restriction is not set.
15503 (Check_Restriction): new procedure with an additional out parameter to
15504 inform the caller that a message has been issued
15505 * sem_aggr.adb: Minor modification of message
15506 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
15507 instead of issuing an error message directly
15508 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
15509 declarations are not placed after later declarations, by calling
15510 Check_Later_Vs_Basic_Declarations
15511 (Analyze_Subtype_Declaration): move here the check that an index or
15512 discriminant constraint must be a subtype mark. Change the check that
15513 a subtype of String must start at one so that it works on subtype marks.
15514 * sem_ch4.adb (Analyze_Call): move here the check that a named
15515 association cannot follow a positional one in a call
15516 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
15517 instead of issuing an error message directly
15518 * sem_ch8.adb (Find_Selected_Component): move here the check that a
15519 selector name is not a character literal or an operator symbol. Move
15520 here the check that the prefix of an expanded name cannot be a
15521 subprogram or a loop statement.
15522 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
15523 procedure called from parsing and semantics to check that basic
15524 declarations are not placed after later declarations
15525 (Process_End_Label): move here the check that end label is not missing
15527 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15529 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
15530 representation clause in codepeer mode, since it confuses CodePeer and
15531 does not bring useful info.
15533 2011-08-02 Ed Falis <falis@adacore.com>
15535 * init.c: initialize fp hw on MILS.
15537 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15539 * errout.adb (First_Node): for bodies, return the node itself (small
15540 optimization). For other nodes, do not check source_unit if the node
15541 comes from Standard.
15543 2011-08-02 Robert Dewar <dewar@adacore.com>
15545 * exp_ch3.adb: Minor comment additions.
15546 * sem_ch13.adb: Minor reformatting.
15548 2011-08-02 Pascal Obry <obry@adacore.com>
15550 * make.adb, makeutl.adb: Removes some superfluous directory separator.
15552 2011-08-02 Robert Dewar <dewar@adacore.com>
15554 * sem_attr.adb: Minor reformatting.
15556 2011-08-02 Robert Dewar <dewar@adacore.com>
15558 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15559 (Has_Default_Component_Value): Removed
15560 * einfo.ads Comment updates
15561 (Has_Default_Aspect): Replaces Has_Default_Value
15562 (Has_Default_Component_Value): Removed
15564 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15566 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15567 (Get_Simple_Init_Val): Handle Default_Value aspect
15568 (Needs_Simple_Initialization): Handle Default_Value aspect
15569 * exp_ch3.ads: Needs_Simple_Initialization
15570 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15571 * par-prag.adb (Pragma_Default[_Component]Value) Removed
15573 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15574 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15575 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15577 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15579 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15580 package containing iteration primitives.
15581 exp_ch5.adb (Expand_Iterator_Loop): ditto.
15583 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15585 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15586 "of", pre-analyze expression in case it is a function call with
15587 finalization actions that must be placed ahead of the loop.
15588 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15589 on an Ada2012 iterator, insert them ahead of the rewritten loop.
15591 2011-08-02 Geert Bosch <bosch@adacore.com>
15593 * cstand.adb (Create_Float_Types): Only consider C's long double for
15594 Long_Long_Float, in addition to double.
15596 2011-08-02 Robert Dewar <dewar@adacore.com>
15598 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15599 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15600 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15601 Minor reformatting.
15603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15605 * sem_attr.adb: handle properly 'Result when it is a prefix of an
15608 2011-08-02 Javier Miranda <miranda@adacore.com>
15610 * einfo.ads, einfo.adb
15611 (Original_Access_Type): Move this attribute to Node26 since there was
15612 an undocumented use of Node21 in E_Access_Subprogram_Type entities
15613 which causes conflicts and breaks the generation of the .NET compiler.
15614 (Interface_Name): Add missing documentation on JGNAT only uses of
15617 2011-08-02 Geert Bosch <bosch@adacore.com>
15619 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15620 (Find_Back_End_Float_Type): Likewise
15621 (Create_Back_End_Float_Types): Likewise
15622 (Create_Float_Types): Likewise
15623 (Register_Float_Type): Likewise
15624 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15625 Nlist and split out type selection in new local Find_Base_Type function.
15626 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15628 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15630 2011-08-02 Robert Dewar <dewar@adacore.com>
15632 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15634 * opt.ads: Minor comment change.
15635 * sem_ch12.adb: Minor code reorganization.
15637 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15639 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15640 subtype's list of rep items to the list on the full subtype in the case
15641 where the lists are the same.
15643 2011-08-02 Geert Bosch <bosch@adacore.com>
15645 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15646 using the one from System.Strings, which also deallocates all strings.
15648 2011-08-02 Geert Bosch <bosch@adacore.com>
15650 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15652 * gcc-interface/Make-lang.in: Update dependencies.
15654 2011-08-02 Olivier Hainque <hainque@adacore.com>
15656 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15659 2011-08-02 Javier Miranda <miranda@adacore.com>
15661 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15662 associated with anonymous access to subprograms.
15664 2011-08-02 Geert Bosch <bosch@adacore.com>
15667 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15668 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15669 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15670 (Add_Symbol_Definition): Move to switch-c.adb
15671 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15672 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15673 (Add_Symbol_Definition): Move to switch-c.adb.
15674 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15676 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15677 Move to warnsw.adb.
15678 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15679 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15680 Move to warnsw.adb.
15681 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15682 (Add_Symbol_Definition): Moved from Prepcomp.
15683 * switch-c.ads: Update copyright notice. Use String_List instead of
15684 Argument_List, removing dependency on System.OS_Lib.
15686 2011-08-02 Yannick Moy <moy@adacore.com>
15688 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15689 mode on initialization expression which does not respect SPARK
15691 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15692 if the tree referenced by its argument represents an initialization
15693 expression in SPARK, suitable for initializing an object in an object
15696 2011-08-02 Javier Miranda <miranda@adacore.com>
15698 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15699 internally generated access to subprogram with its associated protected
15701 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15703 2011-08-02 Geert Bosch <bosch@adacore.com>
15705 * cstand.adb (Register_Float_Type): Print information about type to
15706 register, if the Debug_Flag_Dot_B is set.
15707 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15708 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15709 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15710 with a requested precision of more than Max_Digits digits and no more
15711 than Max_Base_Digits digits, if a range specification is present and the
15712 Predefined_Float_Types list has a suitable type to derive from.
15713 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15714 case of type completion with pragma Import
15716 (Process_Import_Predefined_Type): Processing to complete a type
15717 with pragma Import. Currently supports floating point types only.
15718 (Set_Convention_From_Pragma): Do nothing without underlying type.
15719 (Process_Convention): Guard against absence of underlying type,
15720 which may happen when importing incomplete types.
15721 (Process_Import_Or_Interface): Handle case of importing predefined
15722 types. Tweak error message.
15724 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15726 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15727 functions to previous change. Reorganize code slightly.
15729 2011-08-02 Geert Bosch <bosch@adacore.com>
15731 * back_end.ads (Register_Type_Proc): New call back procedure type for
15732 allowing the back end to provide information about available types.
15733 (Register_Back_End_Types): New procedure to register back end types.
15734 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15736 * cstand.adb (Back_End_Float_Types): New list for floating point types
15737 supported by the back end.
15738 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15739 (Copy_Float_Type): New procedure to make new copies of predefined types.
15740 (Register_Float_Type): New call back procedure to populate the BEFT list
15741 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15742 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15743 (Create_Float_Types): New procedure to create entities for floating
15744 point types predefined in Standard, and put these and any remaining
15745 BEFTs on the Predefined_Float_Types list.
15746 * stand.ads (Predefined_Float_Types): New list for predefined floating
15747 point types that do not have declarations in package Standard.
15749 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15751 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
15752 entity node for the unit containing the parameter.
15753 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15754 (Add_Inlined_Subprogram): Likewise.
15755 * gcc-interface/Make-lang.in: Update dependencies.
15757 2011-08-02 Thomas Quinot <quinot@adacore.com>
15759 * s-stusta.adb (Print): Make sure Pos is always initialized to a
15762 2011-08-02 Geert Bosch <bosch@adacore.com>
15764 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15766 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15768 * sem_type.adb (Covers): Move trivial case to the top and reuse the
15769 computed value of Base_Type.
15771 2011-08-02 Yannick Moy <moy@adacore.com>
15773 * restrict.adb (Check_Restriction): issue an error for any use of
15774 class-wide, even if the No_Dispatch restriction is not set.
15775 * sem_aggr.adb: Correct typos in comments and messages in formal mode
15776 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15777 when completing a private extension, the type named in the private part
15778 is not the same as that named in the visible part.
15779 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15780 of an inherited primitive operations of a tagged type or type extension
15781 that returns the tagged type.
15782 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15783 function which returns True for an implicit operation inherited by the
15784 derived type declaration for the argument type.
15785 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15788 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15790 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15791 Process_Bounds, to perform analysis with expansion of a range or an
15792 expression that is the iteration scheme for a loop.
15793 (Analyze_Iterator_Specification): If domain of iteration is given by a
15794 function call with a controlled result, as is the case if call returns
15795 a predefined container, ensure that finalization actions are properly
15797 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15799 2011-08-02 Javier Miranda <miranda@adacore.com>
15801 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15802 * gcc-interface/Make-lang.in: Update dependencies.
15804 2011-08-02 Javier Miranda <miranda@adacore.com>
15806 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15807 determine if the analysis is performed using N or Original_Node (N).
15808 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15809 functionality of routine Is_Variable avoids code duplication.
15810 * checks.adb (Determine_Range): Handle temporaries generated by
15811 Remove_Side_Effects.
15813 2011-08-02 Javier Miranda <miranda@adacore.com>
15815 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15816 expansion of the condition. Required since the previous analysis was
15817 done with expansion disabled (see Resolve_Quantified_Expression) and
15818 hence checks were not inserted and record comparisons have not been
15821 2011-08-02 Ed Falis <falis@adacore.com>
15823 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15826 2011-08-02 Bob Duff <duff@adacore.com>
15828 * opt.ads: Minor comment fix.
15830 2011-08-02 Bob Duff <duff@adacore.com>
15832 * sem_ch12.adb (Analyze_Package_Instantiation,
15833 Analyze_Subprogram_Instantiation): Turn off style checking while
15834 analyzing an instance. Whatever style checks that apply to the generic
15835 unit should apply, so it makes no sense to apply them in an instance.
15836 This was causing trouble when compiling an instance of a runtime
15837 unit that violates the -gnatyO switch.
15838 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15839 one of the two case statements, causing spurious errors.
15841 2011-08-02 Robert Dewar <dewar@adacore.com>
15843 * uname.adb: Minor reformatting.
15844 * gnatcmd.adb: Minor reformatting.
15845 * exp_attr.adb: Minor reformatting.
15847 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15849 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15850 No_Dispatching_Calls, do not look for the Assign primitive, because
15851 predefined primitives are not created in this case.
15853 2011-08-02 Bob Duff <duff@adacore.com>
15855 * stylesw.ads: Minor comment fixes.
15857 2011-08-02 Robert Dewar <dewar@adacore.com>
15859 * freeze.adb (Add_To_Result): New procedure.
15861 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15863 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15864 time, if the specific run-time routines for handling streams of strings
15865 are not available, use the default mechanism.
15867 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15869 * s-regpat.ads: Fix typo.
15871 2011-08-02 Vincent Celier <celier@adacore.com>
15873 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15874 not null, call it to create the in memory config project file without
15875 parsing an existing default config project file.
15877 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15879 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15883 * sem_elim.adb: an abstract subprogram does not need an eliminate
15884 pragma for its descendant to be eliminable.
15886 2011-08-02 Ed Falis <falis@adacore.com>
15888 * init.c: revert to handling before previous checkin for VxWorks
15889 * s-intman-vxworks.adb: delete unnecessary declarations related to
15890 using Ada interrupt facilities for handling signals.
15891 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15892 * s-intman-vxworks.ads: Import __gnat_install_handler as
15893 Initialize_Interrupts.
15894 * s-taprop-vxworks.adb: Delete Signal_Mask.
15895 (Abort_Handler): change construction of mask to unblock exception
15898 2011-08-02 Jerome Guitton <guitton@adacore.com>
15900 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15901 Debug_Raise_Exception before propagation starts.
15903 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15905 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15906 to Restriction_Check_Required.
15907 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15908 * sem_res.adb (Resolve_Call): Likewise.
15909 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15911 2011-08-02 Bob Duff <duff@adacore.com>
15913 * stylesw.ads: Update comment.
15914 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15915 * errout.ads: Remove obsolete comment.
15917 2011-08-02 Javier Miranda <miranda@adacore.com>
15919 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15920 (Set_Is_Safe_To_Reevaluate): new procedure.
15921 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15922 assignment is allowed on safe-to-reevaluate variables.
15923 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15924 temporary created to remove side effects in expressions that use
15925 the secondary stack as safe-to-reevaluate.
15926 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15927 variables that are not true constants.
15929 2011-08-02 Robert Dewar <dewar@adacore.com>
15931 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15932 sem_res.adb, sem_ch6.adb: Minor reformatting.
15934 2011-08-02 Jerome Guitton <guitton@adacore.com>
15936 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15940 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15941 not set Overridden_Operation if subprogram is an initialization
15944 2011-08-02 Yannick Moy <moy@adacore.com>
15946 * par-ch6.adb: Correct obsolete name in comments
15947 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15948 which takes two message arguments (existing function takes one), with
15949 second message used for continuation.
15950 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15951 block statements that originate from a source block statement, not
15952 generated block statements
15953 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15954 symmetry with procedure case
15955 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15956 function to issue an error in formal mode if a package specification
15957 contains more than one tagged type or type extension.
15958 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15959 parameters matching formals of tagged types are objects (or ancestor
15960 type conversions of objects), not general expressions. Issue an error
15961 on view conversions that are not involving ancestor conversion of an
15963 (Resolve_Type_Conversion): in formal mode, issue an error on the
15964 operand of an ancestor type conversion which is not an object
15965 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15966 procedure so that it works also for actuals of function calls
15967 (Is_Actual_Tagged_Parameter): new function which determines if its
15968 argument is an actual parameter of a formal of tagged type in a
15970 (Is_SPARK_Object_Reference): new function which determines if the tree
15971 referenced by its argument represents an object in SPARK
15973 2011-08-02 Robert Dewar <dewar@adacore.com>
15975 * sem_ch3.adb: Minor reformatting
15976 Minor comment addition
15977 Minor error msg text change
15979 2011-08-02 Javier Miranda <miranda@adacore.com>
15981 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15982 function. Used to be more precise when we generate a variable plus one
15983 assignment to remove side effects in the evaluation of the Bound
15985 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15986 of the bound expression to force its re-analysis and thus expand the
15987 associated transient scope (if required). Code cleanup replacing the
15988 previous code that declared the constant entity by an invocation to
15989 routine Force_Evaluation which centralizes this work in the frontend.
15991 2011-08-02 Robert Dewar <dewar@adacore.com>
15993 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15994 (Base_Type): Now uses improved Is_Base_Type function
15995 * einfo.ads (Base_Type): Inline this function
15997 2011-08-02 Robert Dewar <dewar@adacore.com>
15999 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
16000 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
16002 2011-08-02 Arnaud Charlet <charlet@adacore.com>
16004 * gcc-interface/Make-lang.in: Update dependencies.
16005 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
16008 2011-08-02 Yannick Moy <moy@adacore.com>
16010 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
16011 non-simple expression used in delta constraint
16012 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
16013 index constraint which is not a subtype mark
16014 * par.adb: With and use Restrict
16015 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
16016 mode on component type which is not a subtype mark and default
16017 expression on component
16018 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
16019 of string which does not have a lower index bound equal to 1
16020 (Array_Type_Declaration): issue an error in formal mode on index or
16021 component type which is not a subtype mark, and on aliased keyword on
16023 (Derived_Type_Declaration): issue an error in formal mode on interface,
16024 limited or abstract type
16025 (Record_Type_Declaration): issue an error in formal mode on interface
16026 (Record_Type_Definition): issue an error in formal mode on tagged types
16027 and type extensions not declared in the specification of a library unit
16028 package; on null non-tagged record; on variant part
16030 2011-08-02 Vincent Celier <celier@adacore.com>
16032 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
16033 not declared for qualified library project when Library_Name is not
16034 declared, but Library_Dir is.
16036 2011-08-02 Robert Dewar <dewar@adacore.com>
16038 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
16039 pragmas (affects aspects [Component_]Default_Value
16040 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
16041 component type for the resolution
16043 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16045 * einfo.adb (Base_Type): Tune implementation for speed.
16047 2011-08-02 Robert Dewar <dewar@adacore.com>
16049 * freeze.adb: Minor reformatting.
16051 2011-08-02 Thomas Quinot <quinot@adacore.com>
16053 * scos.ads: Update comments.
16055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16057 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
16058 base type, because the parent may be a subtype of a private type whose
16059 convention is established in a private part.
16061 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
16063 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
16064 statement in a block when the expansion of the return expression has
16065 created a finalization chain.
16066 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
16067 with the parent node.
16068 Add N_Extended_Return_Statement to handle the case where a transient
16069 object declaration appears in the Return_Object_Declarations list of
16070 an extended return statement.
16072 2011-08-02 Matthew Gingell <gingell@adacore.com>
16074 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
16075 unused parameter 'name'.
16077 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16079 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
16080 inherited operation, check whether its alias, which is the source
16081 operastion that it renames, has been marked eliminated.
16083 2011-08-02 Javier Miranda <miranda@adacore.com>
16085 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
16086 in-mode parameter whose type is an access type since it can be used to
16087 modify its designated object. Enforce code that handles as safe an
16088 access type that is not access-to-constant but it is the result of a
16089 previous removal of side-effects.
16090 (Remove_Side_Effects): Minor code reorganization of cases which require
16091 no action. Done to incorporate documentation on new cases uncovered
16092 working in this ticket: no action needed if this routine was invoked
16093 too early and the nodes are not yet decorated.
16094 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
16095 to routine Remove_Side_Effects by calls to Force_Evaluation since they
16096 were issued with actuals that are implicitly provided by
16099 2011-08-02 Robert Dewar <dewar@adacore.com>
16101 * sem_ch3.adb, sem_res.adb: Minor reformatting.
16103 2011-08-02 Yannick Moy <moy@adacore.com>
16105 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
16106 to issue an error in formal mode on attribute not supported in this mode
16107 (Analyze_Attribute): issue errors on standard attributes not supported
16109 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
16110 comment, and issue error in formal mode on modulus which is not a power
16112 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
16114 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
16116 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
16117 operator on modular type (except 'not').
16119 2011-08-02 Robert Dewar <dewar@adacore.com>
16121 * gnat_rm.texi: Minor reformatting.
16123 2011-08-02 Arnaud Charlet <charlet@adacore.com>
16125 * s-osinte-linux.ads: Minor comment update and reformatting.
16126 * i-cexten.ads: Make this unit pure, as for its parent.
16127 Will allow its usage in more contexts if needed.
16129 2011-08-02 Robert Dewar <dewar@adacore.com>
16131 * s-utf_32.ads: Minor comment fix.
16133 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16135 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
16136 operation of a tagged synchronized type, handle the case where the
16137 controlling argument is overloaded.
16139 2011-08-02 Yannick Moy <moy@adacore.com>
16141 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
16142 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
16143 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
16144 SPARK mode and formal verification mode on processing SPARK restriction
16145 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
16146 requiring consistency checking.
16148 2011-08-02 Robert Dewar <dewar@adacore.com>
16150 * sem_res.adb: Minor reformatting.
16152 2011-08-02 Robert Dewar <dewar@adacore.com>
16154 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16155 a-cforse.ads: Remove unneeded with of Ada.Containers
16156 Remove commented out pragma Inline's
16157 Move specifications of new subprograms to the actual specs
16159 2011-08-02 Yannick Moy <moy@adacore.com>
16161 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16162 a-cforse.ads: Update comments.
16164 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16166 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
16168 2011-08-02 Robert Dewar <dewar@adacore.com>
16170 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16171 a-cforse.ads, a-cofove.ads: Minor reformatting.
16173 2011-08-02 Claire Dross <dross@adacore.com>
16175 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
16176 a-cofove.ads: Add comments.
16178 2011-08-02 Yannick Moy <moy@adacore.com>
16180 * gnat_rm.texi: Document formal containers.
16182 2011-08-02 Emmanuel Briot <briot@adacore.com>
16184 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
16185 are empty sections.
16187 2011-08-02 Robert Dewar <dewar@adacore.com>
16189 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
16192 2011-08-02 Robert Dewar <dewar@adacore.com>
16194 * aspects.adb: New aspects Default_Value and Default_Component_Value
16195 New format of Aspect_Names table checks for omitted entries
16196 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
16197 handling of boolean aspects for derived types.
16198 New aspects Default_Value and Default_Component_Value
16199 New format of Aspect_Names table checks for omitted entries
16200 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
16201 (Has_Default_Value): New flag
16202 (Has_Default_Component_Value): New flag
16203 (Has_Default_Value): New flag
16204 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
16206 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
16207 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
16208 Default_Value and Default_Component_Value
16209 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
16210 New aspects Default_Value and Default_Component_Value
16211 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
16212 * sprint.adb: Print N_Aspect_Specification node when called from gdb
16214 2011-08-02 Vincent Celier <celier@adacore.com>
16216 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
16217 inherit library kind.
16219 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16221 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
16222 Minor reformatting.
16224 2011-08-02 Robert Dewar <dewar@adacore.com>
16226 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
16228 2011-08-02 Yannick Moy <moy@adacore.com>
16230 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
16232 2011-08-02 Robert Dewar <dewar@adacore.com>
16234 * impunit.adb: Add comment.
16236 2011-08-02 Yannick Moy <moy@adacore.com>
16238 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
16239 qualification of aggregates in formal mode
16240 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
16242 (Resolve_Aggregate): complete the test that an aggregate is adequately
16243 qualified in formal mode
16245 2011-08-02 Pascal Obry <obry@adacore.com>
16247 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
16248 * mlib-prj.adb: Supress warning when compiling binder generated file.
16249 (Build_Library): Supress all warnings when compiling the binder
16252 2011-08-02 Yannick Moy <moy@adacore.com>
16254 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
16256 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
16257 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
16258 Add with/use clauses to make Check_Formal_Restriction visible
16260 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16262 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
16263 in-parameters when type of the generic formal is private in the generic
16264 spec and non-private in the body.
16266 2011-08-02 Claire Dross <dross@adacore.com>
16268 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
16269 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
16270 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
16271 * impunit.adb, Makefile.rtl: Take new files into account.
16273 2011-08-02 Robert Dewar <dewar@adacore.com>
16275 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
16276 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
16278 2011-08-02 Yannick Moy <moy@adacore.com>
16280 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
16282 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
16283 matching static array bounds, taking into account the special case of
16285 * sem_ch3.adb: Typo in comment.
16287 2011-08-02 Yannick Moy <moy@adacore.com>
16289 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
16290 which issues an error in formal mode if its argument node is originally
16292 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
16293 has a discriminant specification so that it does not include the case
16295 (Derived_Type_Declaration): move here the test that a derived type has a
16296 discriminant specification
16297 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
16298 first element of a component association before accessing its choices
16299 (presence of component association is not enough)
16300 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
16301 declaration is a library item before accessing the next element in a
16302 list, as library items are not member of lists
16303 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
16304 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
16305 Check_Formal_Restriction whenever possible.
16307 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16309 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
16310 reference when needed.
16312 2011-08-02 Bob Duff <duff@adacore.com>
16314 * gnat_ugn.texi: Fix typo.
16316 2011-08-02 Vincent Celier <celier@adacore.com>
16318 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
16319 archive file name. Do not use the full path name of archives for Open
16322 2011-08-02 Robert Dewar <dewar@adacore.com>
16324 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
16325 Analyze_Aspect_Specifications
16327 (Analyze_Aspect_Specifications): New handling for boolean aspects
16328 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
16329 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
16330 sequence for Analyze_Aspect_Specifications
16331 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
16332 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
16334 2011-08-02 Robert Dewar <dewar@adacore.com>
16336 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
16337 aspects, since these no longer exist.
16339 2011-08-02 Robert Dewar <dewar@adacore.com>
16341 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
16342 semicolon, do not try to see if there are aspects following it.
16343 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
16346 2011-08-02 Robert Dewar <dewar@adacore.com>
16348 * sem_ch8.adb, aspects.ads: Minor reformatting.
16350 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16352 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
16353 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
16355 (Analyze_Aspect_Specifications): ...here. Call above procedure.
16357 2011-08-02 Yannick Moy <moy@adacore.com>
16359 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
16360 mode on subprogram declaration outside of package specification, unless
16361 it is followed by a pragma Import
16362 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
16363 Access_Type_Declaration): issue error in formal mode on access type
16364 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
16366 (Analyze_Object_Declaration): issue error in formal mode on object
16367 declaration which does not respect SPARK restrictions
16368 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
16369 declaration which does not respect SPARK restrictions
16370 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
16371 error in formal mode on digits or delta constraint
16372 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
16373 decimal fixed point type
16374 (Derived_Type_Declaration): issue error in formal mode on derived type
16375 other than type extensions of tagged record types
16376 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
16377 with check on access definition
16378 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
16379 mode on protected definition.
16380 (Analyze_Task_Definition): issue error in formal mode on task definition
16382 2011-08-02 Robert Dewar <dewar@adacore.com>
16384 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
16386 2011-08-02 Javier Miranda <miranda@adacore.com>
16388 * sem_ch6.adb (Can_Override_Operator): New function.
16389 (Verify_Overriding_Indicator): Add missing code to check overriding
16390 indicator in operators. Fixes regression.
16391 (Check_Overriding_Indicator): Minor reformating after replacing the
16392 code that evaluates if the subprogram can override an operator by
16393 invocations to the above new function.
16395 (Write_Field26_Name): Add missing code to ensure that, following
16396 the documentation in einfo.ads, this field is not shown as attribute
16397 "Static_Initialization" on non-dispatching functions.
16399 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16401 * sem_res.adb (Resolve_Call): A call to
16402 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
16403 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
16404 i.e., when the second parameter is of type Time_Span.
16406 2011-08-02 Vincent Celier <celier@adacore.com>
16408 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
16409 with an archive instead of -L<library dir> -l<library name>.
16411 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16413 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
16414 mark the base types In_Use in addition to making the operations
16417 2011-08-02 Ed Falis <falis@adacore.com>
16419 * init.c: add and setup __gnat_signal_mask for the exception signals
16420 * s-inmaop-vxworks.adb: new file.
16421 * s-intman-vxworks.adb: remove unnecessary initializations and
16423 * s-intman-vxworks.ads: remove unnecessary variable
16424 * s-taprop-vxworks.adb: simplify signal initialization
16426 2011-08-02 Robert Dewar <dewar@adacore.com>
16428 * sem_ch8.adb: Minor code reorganization, comment updates.
16430 2011-08-02 Robert Dewar <dewar@adacore.com>
16432 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
16433 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
16435 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
16436 (Matching_Static_Array_Bounds): Moved here from Sem_Res
16438 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16440 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
16441 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
16442 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
16443 use_type_clauses, to handle more efficiently use_type and use_all_type
16445 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
16446 Ada2012 Use_All_Type clause.
16447 (Use_Class_Wide_Operations): new procedure.
16449 2011-08-02 Robert Dewar <dewar@adacore.com>
16451 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
16452 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
16453 expression to expression function.
16455 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16457 * sem_ch4.adb: transform simple Ada2012 membership into equality only
16458 if types are compatible.
16460 2011-08-02 Yannick Moy <moy@adacore.com>
16462 * sem_res.adb (Matching_Static_Array_Bounds): new function which
16463 returns True if its argument array types have same dimension and same
16464 static bounds at each index.
16465 (Resolve_Actuals): issue an error in formal mode on actuals passed as
16466 OUT or IN OUT paramaters which are not view conversions in SPARK.
16467 (Resolve_Arithmetic_Op): issue an error in formal mode on
16468 multiplication or division with operands of fixed point types which are
16469 not qualified or explicitly converted.
16470 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
16471 Boolean or array type (except String) operands.
16472 (Resolve_Equality_Op): issue an error in formal mode on equality
16473 operators for array types other than String with non-matching static
16475 (Resolve_Logical_Op): issue an error in formal mode on logical operators
16476 for array types with non-matching static bounds. Factorize the code in
16477 Matching_Static_Array_Bounds.
16478 (Resolve_Qualified_Expression): issue an error in formal mode on
16479 qualified expressions for array types with non-matching static bounds.
16480 (Resolve_Type_Conversion): issue an error in formal mode on type
16481 conversion for array types with non-matching static bounds
16483 2011-08-02 Robert Dewar <dewar@adacore.com>
16485 * par-ch10.adb: Minor code reorganization (use Nkind_In).
16487 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16489 * par-ch9.adb: save location of entry for proper error message.
16491 2011-08-02 Javier Miranda <miranda@adacore.com>
16493 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
16494 (Use_Full_View) which permits this routine to climb through the
16495 ancestors using the full-view of private parents.
16496 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
16497 Use_Full_View to true in calls to Is_Ancestor.
16498 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
16499 true in call to Is_Ancestor.
16500 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
16501 Use_Full_View to true in call to Is_Ancestor.
16502 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
16503 call to Is_Ancestor.
16504 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
16505 Use_Full_View to true in calls to Is_Ancestor.
16506 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
16507 Make_Select_Specific_Data_Table, Register_Primitive,
16508 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
16509 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
16510 to true in call to Is_Ancestor.
16511 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
16512 Use_Full_View to true in calls to Is_Ancestor.
16514 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
16515 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
16517 2011-08-02 Robert Dewar <dewar@adacore.com>
16519 * gnat_rm.texi: Minor reformatting.
16520 * sem_prag.adb: Minor reformatting.
16522 2011-08-02 Tristan Gingold <gingold@adacore.com>
16524 * vms_data.ads: Add VMS qualifier for -gnateP.
16526 2011-08-02 Robert Dewar <dewar@adacore.com>
16528 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
16529 * par-ch7.adb (P_Package): Proper placement of aspects for package
16530 decl/instantiation.
16531 * par-endh.adb (Check_End): Ad Is_Sloc parameter
16532 (End_Statements): Add Is_Sloc parameterr
16533 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
16534 (Check_End): Ad Is_Sloc parameter
16535 (End_Statements): Add Is_Sloc parameterr
16537 2011-08-02 Vincent Celier <celier@adacore.com>
16539 * ug_words: Add VMS qualifier equivalent to -gnateP:
16540 /SYMBOL_PREPROCESSING.
16542 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16544 * gnat-style.texi: For hexadecimal numeric literals the typical
16545 grouping of digits is 4 to represent 2 bytes.
16546 A procedure spec which is split into several lines is indented two
16549 2011-08-02 Yannick Moy <moy@adacore.com>
16551 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
16552 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
16553 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
16555 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
16556 choice in array aggregate
16557 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16559 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16560 positional and named aggregate for record, or others in record
16561 aggregate, or multiple choice in record aggregate
16562 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16563 array operands to logical operations AND, OR and XOR do not have the
16564 same static lower and higher bounds
16565 * sem_ch5.adb, sinfo.ads: Correct typos in comments
16567 2011-08-01 Robert Dewar <dewar@adacore.com>
16569 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16570 Replaces Last_Source_Node_In_Sequence.
16571 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16572 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16573 parens and blank in string (this was inconsistently implemented).
16575 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16576 blank in string (this was inconsistently implemented).
16578 (Set_Global_Switches): Set formal mode switches appropriately
16579 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16581 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16582 call Set_Error_Msg_Lang to set "spark" as language name.
16583 * par.adb: Remove unnecessary call to set formal language for errout
16584 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16585 appropriately and call Set_Error_Msg_Lang to set "spark" as language
16587 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16588 calls to it, moved after resolution so that types are known
16589 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16590 result of concatenation is not of type String
16591 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16592 concatenation is not properly restricted
16593 * gnat_rm.texi: Add doc on pragma Spark_95.
16594 * gcc-interface/Makefile.in: Remove obsolete target pairs for
16595 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16596 * gcc-interface/Make-lang.in: Update dependencies.
16598 2011-08-01 Javier Miranda <miranda@adacore.com>
16600 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16601 condition that detects if the overridden operation must replace an
16604 2011-08-01 Javier Miranda <miranda@adacore.com>
16606 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16607 code declarations inserted by Insert_Actions in each alternative of the
16608 N_Case_Expression node.
16610 2011-08-01 Robert Dewar <dewar@adacore.com>
16612 * sem_ch6.adb: Minor code reorganization.
16613 * sem_util.adb: Minor reformatting.
16615 2011-08-01 Pascal Obry <obry@adacore.com>
16617 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16618 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16620 2011-08-01 Yannick Moy <moy@adacore.com>
16622 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16623 literal or operator symbol which is prefixed
16624 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16625 mode on access attributes.
16626 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16627 that concatenation operands are properly restricted in formal mode
16628 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16629 Analyze_Concatenation_Operand. Issue an error in formal mode if the
16630 result of the concatenation has a type different from String.
16631 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16632 Analyze_Quantified_Expression, Analyze_Slice,
16633 Analyze_Null): issue an error in formal mode on unsupported constructs
16635 (Analyze_Block_Statement): only issue error on source block statement
16636 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16637 function which returns the last node in a list of nodes for which
16638 Comes_From_Source returns True, if any
16639 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16640 Last_Source_Node_In_Sequence
16641 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16642 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16643 mode on unsupported constructs
16644 * sem_ch9.adb Do not return after issuing error in formal mode, as the
16645 rest of the actions may be needed later on since the error is marked as
16647 * sinfo.ads: Typos in comments.
16649 2011-08-01 Pascal Obry <obry@adacore.com>
16651 * projects.texi: Minor editing.
16653 2011-08-01 Yannick Moy <moy@adacore.com>
16655 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16656 insertion character ~~
16657 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16658 (Set_Error_Msg_Lang): new procedure which fixes the language for use
16659 with insertion character ~~
16660 (Set_Msg_Text): treat insertion character ~~
16661 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16662 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16663 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16664 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16665 errors related to the formal language restriction not serious
16666 (insertion character |).
16667 * par.adb (Par): set formal language for error messages if needed
16668 * sem_ch6.adb (Check_Missing_Return): take into account possible
16669 generated statements at the end of the function
16670 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16671 enumeration value to define a new pragma SPARK_95
16672 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16673 SPARK_Version): new type and variables to store the SPARK version
16675 (SPARK_Mode): return True when SPARK_Version is set
16676 * par-prag.adb: Correct indentation
16677 (Prag): take Pragma_SPARK_95 into account
16678 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16681 2011-08-01 Robert Dewar <dewar@adacore.com>
16683 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16684 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16685 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16687 2011-08-01 Pascal Obry <obry@adacore.com>
16689 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16690 Target_Name to Get_Path call.
16691 (Parse_Single_Project): Likewise.
16692 (Post_Parse_Context_Clause): Likewise.
16693 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16694 Call Initialise_Project_Path with the proper Target_Name.
16695 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16697 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16698 with the proper Target_Name.
16699 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16700 Part.Parse routine.
16701 (Parse_Project_And_Apply_Config): Likewise.
16702 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16703 This is fine as this part of the code is supporting only native
16705 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16706 is fine as this part of the code is supporting only native compilation.
16708 2011-08-01 Yannick Moy <moy@adacore.com>
16710 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16711 of homonym, unless the homonym is one of the cases allowed in SPARK
16712 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16713 package declaration occurring after a body.
16715 2011-08-01 Robert Dewar <dewar@adacore.com>
16717 * checks.adb, exp_ch4.adb: Minor reformatting.
16719 2011-08-01 Javier Miranda <miranda@adacore.com>
16721 * einfo.ads (Access_Disp_Table): Fix documentation.
16722 (Dispatch_Table_Wrappers): Fix documentation.
16724 2011-08-01 Pascal Obry <obry@adacore.com>
16726 * prj-env.adb, prj-env.ads: Minor reformatting.
16728 2011-08-01 Yannick Moy <moy@adacore.com>
16730 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16731 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16732 procedures out of these packages.
16733 * errout.ads, errout.adb
16734 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16735 procedures in of this package
16736 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16737 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16738 on misplaced later vs initial declarations, like in Ada 83
16739 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16740 formal mode on attribute of private type whose full type declaration
16742 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16743 package declaration inside a package specification
16744 (Analyze_Full_Type_Declaration): issue error in formal mode on
16745 controlled type or discriminant type
16746 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16747 user-defined operator means that it should come from the source
16748 (New_Overloaded_Entity): issue error in formal mode on overloaded
16750 * sem_ch6.ads, sem_ch13.ads: typos in comments.
16752 2011-08-01 Thomas Quinot <quinot@adacore.com>
16754 * atree.adb: Minor reformatting.
16755 * checks.adb: Minor reformatting.
16757 2011-08-01 Vincent Celier <celier@adacore.com>
16759 * s-parame-vms-ia64.ads: Fix typo in comment
16761 * s-parame-vms-restrict.ads: Removed, unused.
16763 2011-08-01 Javier Miranda <miranda@adacore.com>
16766 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16768 (Constrain_Index): Remove side effects in the evaluation of the bounds.
16769 * sem_ch3.ads, sem_ch3.adb
16770 (Is_Constant_Bound): New extended version of the subprogram that was
16771 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16772 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16773 * sem_aux.ads (Constant_Value): Fix typo in comment.
16774 * checks.adb (Generate_Index_Checks): New implementation which, for
16775 array objects with constant bounds, generates the runtime check
16776 referencing the bounds of the array type. For other cases this routine
16777 provides its previous behavior obtaining such values from the array
16779 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16781 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16782 we cannot have semantic interpretations of the new node.
16784 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16786 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16789 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16791 * sem_ch8.adb: Minor code editing.
16792 * s-vxwext.adb: Remove trailing space.
16793 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16794 consistency with other files.
16796 2011-08-01 Thomas Quinot <quinot@adacore.com>
16798 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16800 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16802 * par-ch10.adb: reject parameterized expressions as compilation unit.
16803 * sem_ch4.adb: handle properly conditional expression with overloaded
16804 then_clause and no else_clause.
16806 2011-08-01 Tristan Gingold <gingold@adacore.com>
16808 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16809 like done by System.Aux_DEC.
16810 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16812 2011-08-01 Yannick Moy <moy@adacore.com>
16814 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16815 missing label at end of declaration (subprogram or package)
16816 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16817 of positional and named parameter association
16818 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16819 Error_Msg_SP which adds a prefix to the error message giving the name
16820 of the formal language analyzed
16821 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16822 access result type in subprogram, unconstrained array as result type,.
16823 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16825 * sem_ch8.adb: Code clean up.
16827 2011-08-01 Javier Miranda <miranda@adacore.com>
16829 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16830 * einfo.ads (Access_Disp_Table): Fix documentation.
16831 (Dispatch_Table_Wrappers): Fix documentation.
16832 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16833 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16834 to enforce the documentation of this attribute.
16835 (Set_Is_Interface): Cleanup the assertion.
16836 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16837 the Underlying_Type entity before reading attribute Access_Disp_Table.
16838 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16839 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16840 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16841 the Underlying_Type entity before reading attribute Access_Disp_Table.
16842 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16843 Locate the Underlying_Type entity before reading attribute
16846 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16848 * s-poosiz.ads: Additional overriding indicators.
16850 2011-08-01 Yannick Moy <moy@adacore.com>
16852 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16854 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16855 parameter specification does not include a subtype mark.
16856 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16857 formal mode on abstract subprogram.
16858 (Analyze_Subprogram_Specification): issue error in formal mode on
16859 user-defined operator.
16860 (Process_Formals): issue error in formal mode on access parameter and
16861 default expression.
16862 * sem_ch9.adb (Analyze_Abort_Statement,
16863 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16864 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16865 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16866 Analyze_Requeue, Analyze_Selective_Accept,
16867 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16868 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16869 issue error in formal mode on user-defined raise statement.
16871 2011-08-01 Thomas Quinot <quinot@adacore.com>
16873 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16874 declaration being hidden when overriding an implicit inherited
16876 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16877 (-gnats), do not complain about a source file that contains only a
16880 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16882 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16883 variable if already set.
16885 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16887 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16888 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16889 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16890 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16891 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16892 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16893 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16894 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16895 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16896 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16897 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16898 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16899 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16900 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16901 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16902 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16903 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16904 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16905 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16906 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16907 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16908 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16909 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16910 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16911 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16912 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16913 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16914 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16915 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16916 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16917 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16918 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16919 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16920 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16921 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16922 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16923 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16924 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16925 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16926 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16927 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16928 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16929 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16930 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16931 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16932 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16933 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16934 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16935 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16936 Use GNAT instead of GNARL.
16938 2011-08-01 Bob Duff <duff@adacore.com>
16940 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16941 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16942 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16945 2011-08-01 Yannick Moy <moy@adacore.com>
16947 * debug.adb (d.D) reverve flag for the SPARK mode
16948 (d.E) reverve flag for SPARK generation mode
16949 (d.F) reverve flag for Why generation mode
16950 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16951 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16952 functions which return True when the corresponding modes are set
16953 (Formal_Language): return "spark" or "alfa" when in formal verification
16955 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16956 Error_Msg to prefix the error message with a tag giving the formal
16958 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16959 message with a tag giving the formal language
16960 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16962 (Analyze_Case_Statement): issue error in formal mode on case statement
16963 with a single "others" case alternative
16964 (Analyze_Exit_Statement): issue errors in formal mode on exit
16965 statements which do not respect SPARK restrictions
16966 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16967 (Check_Unreachable_Code): always issue an error (not a warning) in
16968 formal mode on unreachable code (concerns both code after an infinite
16969 loop and after an unconditional jump, both not allowed in SPARK)
16970 * sem_ch6.adb (Analyze_Return_Statement): add call to
16971 Set_Return_Present for a procedure containing a return statement
16972 (already done for functions in Analyze_Function_Return)
16973 (Analyze_Function_Return): issue error in formal mode on extended
16974 return or if return is not last statement in function
16975 (Check_Missing_Return): issue error in formal mode if function does
16976 not end with return or if procedure contains a return
16977 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16978 function to detect if there is an inner scope of its parameter S which
16981 2011-08-01 Thomas Quinot <quinot@adacore.com>
16983 * sem_ch6.ads: Minor reformatting.
16985 2011-08-01 Javier Miranda <miranda@adacore.com>
16987 * sem_util.adb (Abstract_Interface_List): Complete condition when
16988 processing private type declarations to avoid reading unavailable
16990 (Is_Synchronized_Tagged_Type): Complete condition when processing
16991 private extension declaration nodes to avoid reading unavailable
16994 2011-08-01 Thomas Quinot <quinot@adacore.com>
16996 * sem_ch3.adb: Minor reformatting.
16998 2011-08-01 Thomas Quinot <quinot@adacore.com>
17000 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
17001 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
17002 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
17003 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
17004 for VMS, instead parametrize the common implementation with
17005 System.Parameters declarations.
17007 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
17009 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
17011 2011-08-01 Tristan Gingold <gingold@adacore.com>
17013 * seh_init.c: Fix SEH handler installation on win64.
17015 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17017 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
17018 double analysis of an anonymous access to subprogram, because it can
17019 lead to improper sharing of profiles and a back-end crash.
17021 2011-08-01 Robert Dewar <dewar@adacore.com>
17023 * make.adb, sem_ch4.adb: Minor reformatting.
17024 * gcc-interface/Make-lang.in: Update dependencies.
17025 * sem_util.adb, exp_ch5.adb: Minor reformatting.
17027 2011-08-01 Arnaud Charlet <charlet@adacore.com>
17029 * gnat_rm.texi: Fix definition of Long_Integer.
17031 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17033 * exp_aggr.adb: check limit size of static aggregate unconditionally,
17034 to prevent storage exhaustion.
17035 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
17036 finalized is a function body, insert the cleanup code before the final
17037 return statement, to prevent spurious warnings.
17038 * s-pooglo.ads: add overriding indicator.
17040 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17042 * sem_ch4.adb (Operator_Check): improve error message when both a
17043 with_clause and a use_clause are needed to make operator usage legal.
17044 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
17045 determine whether a compilation unit is visible within an other,
17046 either through a with_clause in the current unit, or a with_clause in
17047 its library unit or one one of its parents.
17049 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17051 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
17052 over an arbitrary expression of an array or container type.
17053 * lib-xref.adb: clarify comment.
17055 2011-08-01 Bob Duff <duff@adacore.com>
17057 * einfo.ads: Minor reformatting.
17058 * debug.adb: Minor comment improvement.
17060 2011-08-01 Javier Miranda <miranda@adacore.com>
17062 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
17063 consider hidden subprograms as valid candidates.
17065 2011-08-01 Arnaud Charlet <charlet@adacore.com>
17067 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
17069 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
17071 * gnat_ugn.texi: Fix typo.
17073 2011-08-01 Robert Dewar <dewar@adacore.com>
17075 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
17076 lib-xref.adb: Minor reformatting
17078 2011-08-01 Gary Dismukes <dismukes@adacore.com>
17080 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
17081 when to generate a call to Move_Final_List.
17082 (Has_Controlled_Parts): Remove this function.
17084 2011-08-01 Geert Bosch <bosch@adacore.com>
17086 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
17087 "," in choice list.
17089 2011-08-01 Thomas Quinot <quinot@adacore.com>
17091 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
17092 explicit raise of a predefined exception as Comes_From_Source if the
17093 original N_Raise_Statement comes from source.
17095 2011-08-01 Robert Dewar <dewar@adacore.com>
17097 * sinfo.ads: Add comment.
17098 * sem_ch6.adb: Minor reformatting.
17100 2011-08-01 Robert Dewar <dewar@adacore.com>
17102 * freeze.adb (Freeze_Entity): Refine check for bad component size
17103 clause to avoid rejecting confirming clause when atomic/aliased present.
17105 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17107 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
17108 better determine whether an entity reference is a write.
17109 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
17111 * lib-xref.adb (Output_References): Do no suppress a read reference at
17112 the same location as an immediately preceeding modify-reference, to
17113 handle properly in-out actuals.
17115 2011-08-01 Tristan Gingold <gingold@adacore.com>
17117 * env.c (__gnat_setenv) [VMS]: Refine previous change.
17119 2011-08-01 Quentin Ochem <ochem@adacore.com>
17121 * i-cstrin.adb (New_String): Changed implementation, now uses only the
17122 heap to compute the result.
17124 2011-08-01 Robert Dewar <dewar@adacore.com>
17126 * atree.ads: Minor reformatting.
17128 2011-08-01 Emmanuel Briot <briot@adacore.com>
17130 * g-expect.adb (Get_Command_Output): Fix memory leak.
17132 2011-08-01 Geert Bosch <bosch@adacore.com>
17134 * cstand.adb (P_Float_Type): New procedure to print the definition of
17135 predefined fpt types.
17136 (P_Mixed_Name): New procedure to print a name using mixed case
17137 (Print_Standard): Use P_Float_Type for printing floating point types
17138 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
17139 precision IEEE float.
17141 2011-08-01 Thomas Quinot <quinot@adacore.com>
17143 * sem_ch3.adb: Minor reformatting.
17145 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17147 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
17148 the completion of a generic function, insert the new body rather than
17149 rewriting the original.
17151 2011-08-01 Yannick Moy <moy@adacore.com>
17153 * sinfo.ads, errout.ads: Typos in comments.
17155 2011-08-01 Robert Dewar <dewar@adacore.com>
17157 * par-endh.adb: Minor reformatting.
17159 2011-08-01 Robert Dewar <dewar@adacore.com>
17161 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
17162 (Pre_Post_Aspects): New subtype.
17163 * par-ch12.adb (P_Generic): New syntax for aspects in packages
17164 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
17165 * par-ch7.adb (P_Package): Remove Decl parameter
17166 (P_Package): Handle new syntax for aspects (before IS)
17167 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
17169 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
17170 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
17171 (P_Package): Remove Decl parameter
17172 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
17174 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
17176 * sem_util.ads, sem_util.adb (Static_Boolean): New function
17177 * sinfo.ads: Document new syntax for aspects in packages etc.
17178 * sprint.adb: Handle new syntax of aspects before IS in package
17180 2011-08-01 Thomas Quinot <quinot@adacore.com>
17182 * atree.ads: Minor reformatting.
17183 * sem_prag.adb: Minor reformatting.
17185 2011-08-01 Robert Dewar <dewar@adacore.com>
17187 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
17188 case expr alternative.
17190 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17192 * sem_ch12.adb: Fix typo.
17194 2011-08-01 Geert Bosch <bosch@adacore.com>
17196 * sem_prag.adb (Check_No_Link_Name): New procedure.
17197 (Process_Import_Or_Interface): Use Check_No_Link_Name.
17198 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
17199 instead of Standard_Long_Long_Float_Size global. Preparation for
17200 eventual removal of per type constants.
17201 * exp_util.ads (Get_Stream_Size): New function returning the stream
17202 size value of subtype E.
17203 * exp_util.adb (Get_Stream_Size): Implement new function.
17204 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
17206 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
17208 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
17210 2011-08-01 Geert Bosch <bosch@adacore.com>
17212 * cstand.adb: Fix comments.
17213 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
17214 count of arguments.
17216 2011-08-01 Robert Dewar <dewar@adacore.com>
17218 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
17220 2011-08-01 Geert Bosch <bosch@adacore.com>
17222 * atree.ads: Fix comment.
17224 2011-08-01 Robert Dewar <dewar@adacore.com>
17226 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
17227 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
17228 * par.adb: Add with for Namet.Sp.
17229 * par-tchk.adb: Minor reformatting.
17231 2011-08-01 Vincent Celier <celier@adacore.com>
17233 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
17234 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
17235 of the init procedure of a SAL.
17236 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
17239 2011-08-01 Thomas Quinot <quinot@adacore.com>
17241 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
17244 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17246 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
17248 2011-08-01 Thomas Quinot <quinot@adacore.com>
17250 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
17251 conformant with its spec (return True only for types that have
17252 an overriding Initialize primitive operation that prevents them from
17253 having preelaborable initialization).
17254 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
17255 initialization for controlled types in Ada 2005 or later mode.
17257 2011-08-01 Robert Dewar <dewar@adacore.com>
17259 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
17261 (Same_Aspect): New function.
17262 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
17263 Type_Invariant, Precondition, Postcondition.
17264 * snames.ads-tmpl: Add Name_Type_Invariant.
17266 2011-08-01 Robert Dewar <dewar@adacore.com>
17268 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
17270 (Freeze_All_Ent): Fix error in handling inherited aspects.
17271 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
17272 already analyzed, but don't skip entire processing of a declaration,
17273 that's wrong in some cases of declarations being rewritten.
17274 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
17275 Don't delay for integer, string literals
17276 Treat predicates in usual manner for delay, remove special case code,
17278 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
17279 (Build_Predicate_Function): Update saved expression in aspect
17280 (Build_Invariant_Procedure): Update saved expression in aspect
17281 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
17282 of replacement of discriminant references if the reference is simple.
17284 2011-08-01 Robert Dewar <dewar@adacore.com>
17286 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
17287 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
17288 Static_Predicate and Dynamic_Predicate.
17289 (Build_Predicate_Function): Add processing for Static_Predicate
17290 and Dynamic_Predicate.
17291 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
17292 (From_Static_Predicate): New flag
17293 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
17295 2011-08-01 Robert Dewar <dewar@adacore.com>
17297 * usage.adb: Documentation cleanup for Ada version modes in usage.
17298 * expander.adb: Minor reformatting.
17300 2011-08-01 Robert Dewar <dewar@adacore.com>
17302 * atree.ads: Minor comment fix.
17303 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
17304 a-witeio.ads, sem_prag.adb: Minor reformatting.
17306 2011-08-01 Doug Rupp <rupp@adacore.com>
17308 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
17309 pointers. Use descrip.h header file for convenience. Add some
17312 2011-08-01 Robert Dewar <dewar@adacore.com>
17314 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
17315 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
17316 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
17318 (Check_Aspect_At_End_Of_Declarations): New procedure
17319 (Analye_Aspect_Specification): Minor changes for above procedures
17320 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
17321 specification node as well.
17323 2011-08-01 Pascal Obry <obry@adacore.com>
17325 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
17326 Windows files. Use GetFilesAttributes() in this case to check for file
17327 existence instead of returning with an error code.
17329 2011-08-01 Vincent Celier <celier@adacore.com>
17331 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
17332 High is above Source length.
17334 2011-08-01 Robert Dewar <dewar@adacore.com>
17336 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
17338 2011-08-01 Robert Dewar <dewar@adacore.com>
17340 * aspects.ads (Boolean_Aspects): New subtype.
17341 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
17342 for derived types in cases where the parent type and derived type have
17344 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
17345 with aspects when parent type also has aspects.
17346 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
17347 boolean expression at this point).
17348 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
17349 accordance with final decision on the Ada 2012 feature.
17350 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
17352 2011-08-01 Matthew Heaney <heaney@adacore.com>
17354 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
17356 2011-08-01 Pascal Obry <obry@adacore.com>
17358 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
17359 Fix Replace_Slice when High is above current string size.
17360 (Replace_Slice): Fix DL computation when High is above current
17363 2011-08-01 Gary Dismukes <dismukes@adacore.com>
17365 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
17367 2011-08-01 Matthew Heaney <heaney@adacore.com>
17369 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
17372 2011-08-01 Pascal Obry <obry@adacore.com>
17374 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
17377 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17379 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
17380 access to protected subprograms in generic bodies.
17381 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
17382 protected type, indicate that the convention of the subprogram is
17383 Convention_Protected, because it may be used in subsequent declarations
17384 within the protected declaration.
17386 2011-08-01 Vincent Celier <celier@adacore.com>
17388 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
17389 and "final" procedures when the name of the library is "ada", to avoid
17390 duplicate symbols "adainit" and "adafinal" in executables.
17392 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17394 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
17395 quantified expression that appears within a postcondition and uses the
17396 Ada2012 'Result attribute.
17398 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17400 * init.c (__gnat_error_handler): Cast reason to int.
17401 (__gnat_install_handler): Explain sa_sigaction use.
17403 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17405 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
17406 subprogram has copy-in copy-out parameters, try to promote the mode of
17407 the return type if it is passed in registers.
17409 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17411 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
17412 left operand as addressable.
17414 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17416 * gcc-interface/gigi.h (build_function_stub): Remove.
17417 (build_return_expr): Likewise.
17418 (convert_vms_descriptor): Declare.
17419 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
17420 (build_function_stub): Move to...
17421 * gcc-interface/utils2.c (build_return_expr): Move to...
17422 * gcc-interface/trans.c (build_function_stub): ...here.
17423 (build_return_expr): ...here.
17424 (Subprogram_Body_to_gnu): Add local variable for language_function.
17425 Disconnect the parameter attributes cache, if any, once done with it.
17426 Call end_subprog_body only after setting the end_locus.
17427 Build the stub associated with the function, if any, at the very end.
17428 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
17429 variables and streamline control flow.
17431 2011-07-23 Arnaud Charlet <charlet@adacore.com>
17434 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
17435 g-trasym-dwarf.adb.
17437 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17440 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
17441 Assign to act.sa_sigaction.
17442 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
17443 current->return_address to char * before arithmetic.
17445 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17447 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
17448 Correct argument types.
17449 Extract code from reason.
17450 (__gnat_install_handler): Assign to act.sa_sigaction.
17452 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
17454 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
17455 (GNAT1_OBJS): ...here.
17457 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
17460 * g-socthi-mingw.adb (Fill): Fix formatting.
17462 * gcc-interface/gigi.h: Move around comment.
17464 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
17467 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
17469 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
17472 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
17474 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
17476 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
17477 range comparison if Pmode is SImode.
17479 2011-07-12 Laurent GUERBY <laurent@guerby.net>
17480 Eric Botcazou <ebotcazou@adacore.com>
17482 * adadecode.c: Wrap up in extern "C" block.
17483 * adadecode.h: Likewise.
17484 * adaint.c: Likewise. Remove 'const' keyword.
17485 * adaint.h: Likewise.
17486 * argv.c: Likewise.
17487 * atree.h: Likewise.
17489 * cstreams.c: Likewise.
17491 * exit.c: Likewise.
17493 * final.c: Likewise.
17494 * init.c: Likewise.
17495 * initialize.c: Likewise.
17496 * link.c: Likewise.
17497 * namet.h: Likewise.
17498 * nlists.h: Likewise.
17499 * raise.c: Likewise.
17500 * raise.h: Likewise.
17501 * repinfo.h: Likewise.
17502 * seh_init.c: Likewise.
17503 * targext.c: Likewise.
17504 * tracebak.c: Likewise.
17505 * uintp.h: Likewise.
17506 * urealp.h: Likewise.
17507 * xeinfo.adb: Wrap up generated C code in extern "C" block.
17508 * xsinfo.adb: Likewise.
17509 * xsnamest.adb: Likewise.
17510 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
17511 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
17512 * gcc-interface/misc.c: Likewise.
17513 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
17514 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
17515 ada/targext.o here...
17516 (GNAT_ADA_OBJS): ...and not here.
17517 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
17518 (GNATBIND_OBJS): Reorder.
17520 2011-07-07 Richard Henderson <rth@redhat.com>
17522 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
17523 dwarf2out_frame_init.
17525 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
17527 * gcc-interface/misc.c (gnat_init): Tweak previous change.
17529 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17532 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
17534 2011-07-06 Richard Guenther <rguenther@suse.de>
17536 * gcc-interface/misc.c (gnat_init): Merge calls to
17537 build_common_tree_nodes and build_common_tree_nodes_2.
17538 Re-initialize boolean_false_node.
17540 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
17541 Olivier Hainque <hainque@adacore.com>
17542 Nicolas Setton <setton@adacore.com>
17544 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
17545 the type according to the ARTIFICIAL_P parameter.
17546 (create_type_decl): Likewise.
17547 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
17549 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
17551 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
17552 (gnatbind): Likewise.
17554 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17556 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17558 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17560 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17561 local variable throughout. Remove useless call to Base_Type.
17562 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17563 Take it also into account for the volatileness of the field. Set the
17564 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
17566 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17568 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17569 on a dereference built for a by-ref object if it has an address clause.
17571 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17573 * einfo.ads (Address_Taken): Document use for the second argument of
17574 Asm_Input and Asm_Output attributes.
17575 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17576 argument is an entity name, then set Address_Taken on it.
17577 <Attribute_Asm_Output>: Likewise.
17578 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17579 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17580 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17581 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17583 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
17585 PR middle-end/46500
17586 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17588 2011-06-14 Joseph Myers <joseph@codesourcery.com>
17590 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17591 (ada/utils.o): Update dependencies.
17592 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17593 ../../../libcpp/libcpp.a.
17594 * gcc-interface/utils.c: Include common/common-target.h.
17595 (process_attributes): Use targetm_common.have_named_sections.
17597 2011-06-07 Richard Guenther <rguenther@suse.de>
17599 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17602 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17604 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17605 TREE_THIS_NOTRAP flag.
17607 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17609 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17612 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17614 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17615 constants whose full view has discriminants specially.
17617 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17619 * gcc-interface/utils.c: Include diagnostic.h.
17620 (gnat_write_global_declarations): Output debug information for all
17621 global type declarations before finalizing the compilation unit.
17622 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17624 2011-05-25 Jakub Jelinek <jakub@redhat.com>
17626 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17628 2011-05-25 Kai Tietz <ktietz@redhat.com>
17630 * adaint.c (__gnat_to_canonical_file_list_next): Use array
17631 initialization instead of const/none-const pointer assignment.
17633 2011-05-24 Joseph Myers <joseph@codesourcery.com>
17635 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17636 $(EXTRA_GNAT1_OBJS).
17637 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17638 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17639 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17640 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17641 libcommon-target.a instead of prefix.o.
17643 2011-05-21 Joseph Myers <joseph@codesourcery.com>
17646 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17648 2011-05-20 Joseph Myers <joseph@codesourcery.com>
17650 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17651 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17652 instead of version.o.
17654 2011-05-18 Kai Tietz <ktietz@redhat.com>
17656 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17657 boolean_false_node instead of integer_zero_node.
17658 (convert_with_check): Likewise.
17659 * gcc-interface/decl.c (choices_to_gnu): Likewise.
17661 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
17663 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17664 type of the parameter is an unconstrained array, convert the actual to
17665 the type of the formal in the In Out and Out cases as well.
17667 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17669 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17670 call build_function_type_array or build_varargs_function_type_array
17672 (create_subprog_type): Don't call build_function_type; call
17673 build_function_type_vec instead.
17675 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17677 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17678 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17679 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17681 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
17683 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17685 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17686 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17688 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17690 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17692 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17694 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17695 instead of accessing TYPE_ARG_TYPES directly.
17696 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17698 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17701 * gcc-interface/gigi.h (get_variant_part): Declare.
17702 * gcc-interface/decl.c (get_variant_part): Make global.
17703 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17704 types have the same constant size, are record types and T1 has a
17705 variant part while T2 doesn't.
17707 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17709 * gcc-interface/utils.c (begin_subprog_body): Do not call
17711 (end_subprog_body): Likewise.
17713 2011-05-04 Richard Guenther <rguenther@suse.de>
17715 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17717 (pos_to_constructor): Likewise.
17719 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
17720 Eric Botcazou <ebotcazou@adacore.com>
17722 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17723 of build_function_type. Adjust calls to...
17724 (build_raise_check): ...this. Do not take a void_tree parameter.
17725 Call build_function_type_list instead of build_function_type.
17726 Fix head comment and swap couple of conditional blocks.
17728 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
17730 * gnatvsn.ads (Library_Version): Bump to 4.7.
17731 (Current_Year): Bump to 2011.
17733 2011-04-29 Michael Matz <matz@suse.de>
17735 * gcc-interface/misc.c (gnat_handle_option): Set
17736 warn_maybe_uninitialized.
17738 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
17740 * gnat_ugn.texi (Complexity Metrics Control): Update link to
17741 the Watson/McCabe paper.
17743 2011-04-23 Jim Meyering <meyering@redhat.com>
17745 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17747 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17749 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17752 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17754 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17756 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
17757 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17758 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17759 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17760 <all>: Do not set flags on the reused DECL node coming from an alias.
17761 Set DECL_IGNORED_P on the DECL node built for subprograms if they
17762 don't need debug info here...
17763 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17764 (gigi): Adjust calls to create_subprog_decl.
17765 (build_raise_check): Likewise.
17766 (establish_gnat_vms_condition_handler): Likewise.
17767 (Compilation_Unit_to_gnu): Likewise.
17768 (gnat_to_gnu): Likewise.
17770 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
17772 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17773 (NO_REORDER_ADAFLAGS): New variable.
17774 (EXTRA_GNATTOOLS): Always define.
17775 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17776 Clean up and adjust list of files compiled with special options.
17777 * gcc-interface/Make-lang.in: Likewise.
17778 (ada/decl.o): Cosmetical change.
17779 (ada/misc.o): Remove dependency on $(PLUGIN_H).
17781 2011-04-20 Jim Meyering <meyering@redhat.com>
17783 * initialize.c (__gnat_initialize): Remove useless if-before-free.
17785 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17787 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17788 $(CFLAGS) on the link line.
17790 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17792 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17793 padded type built for the return type if it is unconstrained.
17795 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
17797 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17799 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
17801 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17802 before calling TREE_CHAIN.
17803 * gcc-interface/misc.c (gnat_init_ts): New function.
17804 (LANG_HOOKS_INIT_TS): Define.
17806 2011-04-12 Martin Jambor <mjambor@suse.cz>
17808 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17809 instead of cgraph_node.
17811 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17813 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17814 alignment on fields of the RETURN type built for the Copy-In Copy-Out
17817 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17819 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17820 of aggregate types that contain a placeholder.
17822 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
17824 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17826 (handle_type_generic_attribute): Likewise.
17828 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17831 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17833 2011-04-04 Kai Tietz <ktietz@redhat.com>
17836 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17839 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17841 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17842 type case, do not strip a padding type around the array type.
17844 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17846 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17849 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17851 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17852 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17853 code for -feliminate-unused-debug-types.
17854 (gnat_post_options): Likewise.
17856 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17858 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17859 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17862 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17864 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17865 DECL_ARTIFICIAL flag on enumeration types.
17867 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17869 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17870 fat pointer types artificial unconditionally.
17871 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17874 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17876 * gcc-interface/gigi.h (get_dummy_type): Declare.
17877 (build_dummy_unc_pointer_types): Likewise.
17878 (finish_fat_pointer_type): Likewise.
17879 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17880 fat pointer type has been built, complete it in place.
17881 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17882 and thin pointers. Remove useless variable.
17883 (finish_fat_pointer_type): Make global and move to...
17884 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17885 (get_dummy_type): New function.
17886 (build_dummy_unc_pointer_types): Likewise.
17887 (gnat_pushdecl): Propage the name to the anonymous variants only.
17888 (update_pointer_to): Only adjust the pointer types in the unconstrained
17891 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17893 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17894 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17895 if this is a Taft amendment type and the full declaration is available.
17896 * gcc-interface/trans.c (process_type): Likewise.
17897 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17898 (process_freeze_entity): Likewise.
17899 * gcc-interface/utils.c (dummy_global): New static variable.
17900 (gnat_write_global_declarations): If there are types declared as used
17901 at the global level, insert them in the global hash table.
17903 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17905 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17906 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17907 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17909 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17910 flag of the type accordingly.
17911 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17913 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17915 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17916 finalizing types when updating the pointers to the designated type.
17917 <all>: Finalize the deferred types even if we didn't defer processing
17918 of incomplete types in this invocation.
17920 2011-04-01 Olivier Hainque <hainque@adacore.com>
17921 Nicolas Setton <setton@adacore.com>
17922 Eric Botcazou <ebotcazou@adacore.com>
17924 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17925 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17927 2011-03-28 Kai Tietz <ktietz@redhat.com>
17929 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17931 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17932 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17934 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17936 2011-03-28 Tristan Gingold <gingold@adacore.com>
17939 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17940 Use ada output of gnatbind.
17941 (ada/b_gnatb.adb): Ditto.
17942 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17943 (ada.mostlyclean, ada.stage1)
17944 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17945 (ada.stagefeedback): Adjust.
17946 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17947 Use ada output of gnatbind.
17948 (b_gnatm.adb): Ditto.
17949 (b_gnatl.o, b_gnatm.o): New rules.
17951 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17953 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17954 for the padded type built to support a specified size or alignment.
17956 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17958 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17959 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17960 unconditionally to the end of the unit when the designated type is
17962 <all>: Rename local variable. Attempt to un-defer types only and do it
17963 for limited_with'ed types as well.
17964 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17965 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17966 consistently and remove redundant call to finalize_from_with_types.
17968 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17970 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17971 subprograms without a previous spec declared in the same unit.
17972 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17973 subprograms at the end of the unit instead of at the beginning.
17974 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17975 isn't public for the special handling of non-inline functions nested
17976 inside inline external functions.
17978 2011-03-25 Jeff Law <law@redhat.com>
17980 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17982 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17984 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17985 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17986 to compute Set_Size_Depends_On_Discriminant.
17987 (Layout_Type): Call it on array types in back-end layout mode.
17988 * sem_util.adb (Requires_Transient_Scope): Return true for array
17989 types only if the size depends on the value of discriminants.
17990 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17991 type if the RHS is a call to a function that returns an unconstrained
17992 type with default discriminant.
17994 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17996 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17997 non-conversion to the nominal result type at the end.
17999 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
18001 * gcc-interface/trans.c (create_temporary): New function taken from...
18002 (create_init_temporary): ...here. Call it.
18003 (call_to_gnu): Create the temporary for the return value early, if any.
18004 Create it for a function with copy-in/copy-out parameters if there is
18005 no target; in other cases of copy-in/copy-out, use another temporary.
18006 Push the new binding level lazily. Add and rename local variables.
18008 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
18010 * gcc-interface/decl.c (validate_size): Improve comments and tweak
18012 (set_rm_size): Likewise.
18014 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
18016 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
18017 for the padded type built in order to support a specified alignment.
18018 Fix incorrect formatting.
18020 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
18023 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
18025 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
18027 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
18028 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
18029 to the end of the list. Adjust recursive call. Rename local variable.
18030 If REORDER is true, reorder components of the record type.
18031 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
18032 components_to_record and adjust the parameter list.
18034 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
18036 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
18037 disabled, use the variable for bounds of loop iteration scheme.
18039 2011-03-21 Kai Tietz <ktietz@redhat.com>
18042 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
18044 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
18046 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
18047 out whether the expression is read-only. Short-circuit placeholder
18048 case and rename a couple of local variables.
18050 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
18052 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
18053 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
18054 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
18055 (convert): Deal with conversions from a smaller form type specially.
18057 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
18059 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
18060 its argument, except for the special -I- switch.
18062 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
18064 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
18067 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
18069 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
18071 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
18073 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
18075 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
18076 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
18077 instead of GNAT_FORMAL. Protect the expression against multiple uses.
18078 Do not generate the check directly, instead instantiate the template
18079 check present in the descriptor.
18080 (make_descriptor_field): Move around.
18081 (build_vms_descriptor32): Build a template check in the POINTER field.
18082 (build_vms_descriptor): Remove useless suffixes.
18083 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
18085 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
18088 * targext.c: Include target files if IN_RTS is defined.
18090 2011-01-26 Richard Guenther <rguenther@suse.de>
18093 * targext.c: Include config.h.
18094 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
18097 2011-01-04 Pascal Obry <obry@adacore.com>
18098 Eric Botcazou <ebotcazou@adacore.com>
18100 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
18102 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
18104 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
18105 end-of-case on the end label and its associated gotos, if any.
18107 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
18109 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
18110 expressions of the parameter cache within the statement group of
18111 the CICO mechanism.
18113 2011-01-04 Olivier Hainque <hainque@adacore.com>
18114 Eric Botcazou <ebotcazou@adacore.com>
18116 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
18117 (set_end_locus_from_node): New function.
18118 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
18119 make and the function end_locus.
18120 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
18121 for the elaboration subprogram.
18122 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
18123 set the end_locus of the expression as well.
18125 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
18128 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
18129 variables that are referenced in exception handlers volatile.
18133 Copyright (C) 2011 Free Software Foundation, Inc.
18135 Copying and distribution of this file, with or without modification,
18136 are permitted in any medium without royalty provided the copyright
18137 notice and this notice are preserved.