1 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
3 * gnatvsn.ads (Current_Year): Bump to 2012.
5 2011-12-23 Pascal Obry <obry@adacore.com>
7 * prj.ads (For_Every_Project_Imported): Add In_Aggregate_Lib
8 parameter to generic formal procedure.
9 * prj.adb (For_Every_Project_Imported): Update accordingly.
10 (Recursive_Check): Likewise. Do not parse imported project for
11 aggregate library. This is needed as the imported projects are
12 there just to handle dependencies.
13 (Look_For_Sources): Likewise.
14 (Recursive_Add): Likewise.
15 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb:
16 Add In_Aggregate_Lib parameter to routines used with
17 For_Every_Project_Imported generic procedure.
18 * prj-nmsc.adb (Tree_Processing_Data): Add In_Aggregate_Lib field.
19 (Check): Move where it is used. Fix implementation
20 to not check libraries that are inside aggregate libraries.
21 (Recursive_Check): Add In_Aggregate_Lib parameter.
23 2011-12-23 Ed Schonberg <schonberg@adacore.com>
25 * sem_ch7.adb (Analyze_Package_Body, Has_Referencer): A generic
26 package is a referencer regardless of whether there is a
27 subsequent subprogram with an Inline pragma.
29 2011-12-23 Geert Bosch <bosch@adacore.com>
31 * sem_ch3.adb (Can_Derive_From): Check matching Float_Rep on VMS.
33 2011-12-23 Pascal Obry <obry@adacore.com>
35 * gnatcmd.adb, prj.adb, prj-nmsc.adb: Minor reformatting.
37 2011-12-22 Hristian Kirtchev <kirtchev@adacore.com>
39 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Create the objects
40 associated with exception handling unconditionally.
41 (Build_Adjust_Statements): Create the objects associated with
42 exception handling unconditionally.
43 (Build_Components): Create the objects associated with exception
44 handling unconditionally.
45 (Build_Finalize_Statements): Create the objects associated with
46 exception handling unconditionally.
47 (Build_Initialize_Statements): Create the objects associated with
48 exception handling unconditionally.
49 (Build_Object_Declarations): Set the proper location of the data
50 record when exception propagation is forbidden.
52 2011-12-22 Gary Dismukes <dismukes@adacore.com>
54 * a-tienio.adb (Put): Test validity of Item parameters before
55 applying Image, and raise Constraint_Error for invalid values.
57 2011-12-22 Bob Duff <duff@adacore.com>
59 * a-stwima.ads (Initialize,Adjust,Finalize): Add overriding indicators.
60 * a-ststio.ads (AFCB_Allocate,AFCB_Close,AFCB_Free,Read,Write): Add
61 overriding indicators.
63 2011-12-22 Arnaud Charlet <charlet@adacore.com>
65 * s-osinte-hpux-dce.ads: Update header to GPLv3
67 2011-12-22 Ed Schonberg <schonberg@adacore.com>
69 * a-cohase.ads, a-cohase.adb: Update to latest RM version. Add
70 aspect Constant_Reference to set type, and corresponding
72 * a-cihama.ads, a-cihama.adb: Update to latest RM version. Add
73 function Reference to provide a proper element iterator construct
76 2011-12-22 Ed Schonberg <schonberg@adacore.com>
78 * exp_attr.adb (Expand_N_Attribute, case 'Access): Do not insert
79 implicit conversion on prefix of Unrestricted_Access when prefix
80 is an explicit dereference.
82 2011-12-22 Vincent Pucci <pucci@adacore.com>
84 * sem_dim.adb: Addressed all ??? comments. Replacement of warnings by
85 errors using continuation marks.
86 (Error_Dim_Msg_For_?): Renaming of Error_Dim_For_?.
88 2011-12-22 Robert Dewar <dewar@adacore.com>
90 * sem_ch3.adb, sem_ch3.ads, sem_prag.adb: Minor code clean up.
92 2011-12-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
94 * s-oscons-tmplt.c [__alpha__ && __osf__] (_XOPEN_SOURCE): Define.
96 2011-12-21 Javier Miranda <miranda@adacore.com>
98 * sem_ch3.ads, sem_ch3.adb (Check_CPP_Type): New subprogram.
99 (Process_Full_View): Invoke Check_CPP_Type if processing the
100 full-view of a CPP type.
101 * sem_prag.adb (Process_Import_Or_Interface): Add missing support
102 for importing a CPP type that has an incomplete declaration. Move
103 to new routine Check_CPP_Type the code that verifies that
104 components of imported CPP types do not have default expressions.
106 2011-12-21 Vincent Celier <celier@adacore.com>
108 * prj-nmsc.adb (Report_No_Sources): Remove argument Lang. Report
109 no sources even for languages that are not allowed.
110 (Add_Source): Get the source even when the language is not allowed.
112 2011-12-21 Robert Dewar <dewar@adacore.com>
114 * sem_ch6.adb (Process_Formals): Add defensive code.
116 2011-12-21 Ed Schonberg <schonberg@adacore.com>
118 * sem_ch7.adb, sem_ch13.adb (Analyze_Package_Specification): Build the
119 invariant procedure of a type declaration that is a completion and has
120 aspect specifications.
121 (Build_Invariant_Procedure): If the procedure is built for a
122 type declaration that is a completion, analyze body expliitly
123 because all private declarations have been already analyzed.
125 2011-12-21 Claire Dross <dross@adacore.com>
127 * a-cfdlli.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
128 a-cofove.adb: Minor reformating on formal containers
130 2011-12-21 Vincent Celier <celier@adacore.com>
132 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Remove
133 any main that is not in the list of restricted languages.
134 (Insert_Project_Sources.Do_Insert): Only add sources of languages
135 in the list of restricted languages.
137 2011-12-21 Ed Schonberg <schonberg@adacore.com>
139 * sem_res.adb (Valid_Conversion): A type conversion is valid when
140 the target type is an anonymous access type and the operand is a
141 rewriting of an allocator. The conversion is typically inserted
142 when the designated type is an interface.
144 2011-12-21 Ed Schonberg <schonberg@adacore.com>
146 * exp_ch9.adb (Establish_Task_Master): If the enclosing block
147 has no declarations, create new declarative list for it.
149 2011-12-21 Matthew Heaney <heaney@adacore.com>
151 * a-rbtgbk.adb (Generic_Conditional_Insert): Fixed incorrect comment.
153 2011-12-21 Yannick Moy <moy@adacore.com>
155 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
156 ignore representation attributes in Alfa mode, since formal
157 verification backend does not depend on actual physical
158 representation, but code may still refer to attribute values.
160 2011-12-21 Yannick Moy <moy@adacore.com>
162 * par-ch13.adb (P_Aspect_Specifications): Recognize the cases
163 where a comma between two aspects is missing, or erroneously
164 replaced by a semicolon, issue an error and proceed with next
166 * par.adb, sinfo.ads: Fix typos.
168 2011-12-21 Ed Schonberg <schonberg@adacore.com>
170 * sem_util.adb (Mark_Coextensions): A coextension for an
171 object that is part of the expression in a return statement,
172 or part of the return object in an extended return statement,
173 must be allocated dynamically.
175 2011-12-21 Matthew Heaney <heaney@adacore.com>
177 * a-crbtgk.adb (Generic_Conditional_Insert): Fixed incorrect comment.
179 2011-12-21 Ed Schonberg <schonberg@adacore.com>
181 * sem_ch5.adb (Analyze_Iterator_Specification): If the name
182 of an element iterator is not an entity name we introduce a
183 local renaming declaration for it. To prevent spurious warnings
184 on parameterless function calls that return a container, when
185 expansion is disabled (either explicitly or because of a previous
186 errors) the name must be marked as not coming from source.
188 2011-12-21 Arnaud Charlet <charlet@adacore.com>
190 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Separate
191 handling in CodePeer mode and only ignore Component_Size
194 2011-12-21 Robert Dewar <dewar@adacore.com>
196 * sem_ch6.adb (Process_Formals): Set proper mechanism for
197 formals whose types have conventions Ada_Pass_By_Copy or
198 Ada_Pass_By_Reference.
200 2011-12-21 Arnaud Charlet <charlet@adacore.com>
202 * gnat1drv.adb (Gnat1Drv): Always delete old scil files in
205 2011-12-21 Robert Dewar <dewar@adacore.com>
207 * comperr.adb: Minor reformatting.
209 2011-12-21 Ed Schonberg <schonberg@adacore.com>
211 * aspects.ads: New table Base_Aspect, to indicate that an aspect
212 is defined on a base type.
213 * aspects.adb (Find_Aspect): If the aspect is a Base_Aspect,
214 examine the representation items of the base type.
216 2011-12-21 Pascal Obry <obry@adacore.com>
218 * gnat_ugn.texi, prj.ads, prj-nmsc.adb, prj-attr.adb, projects.texi,
219 snames.ads-tmpl: Use Encapsulated instead of Fully Standalone library.
221 2011-12-21 Pascal Obry <obry@adacore.com>
223 * adaint.c (__gnat_is_executable_file_attr) [_WIN32]: Add parentheses
226 2011-12-21 Arnaud Charlet <charlet@adacore.com>
228 * comperr.adb (Delete_SCIL_Files): Also delete .scilx files.
229 Fix implementation for child packages and package specs.
230 (Delete_SCIL_Files.Decode_Name_Buffer): New function.
232 2011-12-21 Robert Dewar <dewar@adacore.com>
234 * err_vars.ads, a-cdlili.adb, a-cfdlli.ads, prj.adb, prj-nmsc.adb,
235 a-cbdlli.adb, a-cbdlli.ads, a-cfdlli.adb: Minor reformatting.
237 2011-12-21 Vincent Pucci <pucci@adacore.com>
239 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads,
240 s-llflex.ads: Fix header.
242 2011-12-21 Thomas Quinot <quinot@adacore.com>
244 * thread.c, s-oscons-tmplt.c, init.c (pthread_condattr_setclock): For
245 AIX 5.2, define as a dummy weak symbol in init.c.
246 (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC on all versions of AIX.
248 2011-12-21 Thomas Quinot <quinot@adacore.com>
250 * snames.ads-tmpl, sem_ch8.adb: Minor reformatting.
251 * sem_prag.adb: Minor comment clarification.
253 2011-12-21 Vincent Celier <celier@adacore.com>
255 * prj-nmsc.adb (Report_No_Sources): New argument Lang for the
256 language name as a Name_Id. Do not report no sources if language
258 (Add_Source): Do not add source if language is not allowed.
259 * prj.adb (Add_Restricted_Language): New procedure
260 (Is_Allowed_Language): New function
261 * prj.ads (Add_Restricted_Language): New procedure
262 (Is_Allowed_Language): New function
264 2011-12-21 Robert Dewar <dewar@adacore.com>
266 * exp_ch5.adb, sem_dim.adb, sem_dim.ads, sem_ch12.adb, prj-conf.adb:
269 2011-12-21 Claire Dross <dross@adacore.com>
271 * a-cfdlli.ads (Constant_Indexing, Default_Iterator,
272 Iterator_Element): Added to type List.
273 (Not_No_Element, List_Iterator_Interfaces, Iterate,
274 Constant_Reference_Type, Constant_Reference): New.
275 * a-cfdlli.adb (type Iterator, Finalize, First, Last, Next,
276 Previous, Iterate, Not_No_Element, Constant_Reference): New.
278 2011-12-21 Gary Dismukes <dismukes@adacore.com>
280 * gnat_ugn.texi: Minor reformatting.
282 2011-12-21 Ed Schonberg <schonberg@adacore.com>
284 * exp_ch5.adb (Expand_Iterator_Loop): The cursor operation
285 Has_Element is the formal of Iterator_Interfaces, and within
286 the instantion of this package it is a renaming of some local
287 function with an unrelated name. Retrieve the operation from
288 the instance itself, not from the container package.
290 2011-12-21 Vincent Pucci <pucci@adacore.com>
292 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
293 replaced by Expand_Put_Call_With_Dimension_Symbol
294 * sem_ch12.adb (Analyze_Package_Instantiation): New check for
295 System.Dim_Float_IO and System.Dim_Integer_IO instantiation.
296 * sem_ch3.adb (Analyze_Declarations): Removed
297 Remove_Dimension_In_Declaration call.
298 * sem_dim.adb: Update comments. Redefine the
299 representation of a Rational. Propagate all changes involving
300 data structures and types throughout the pakage. Output the
301 dimension aggregates for each error messages.
302 ("/"): Rational constructor "/" removed for Whole operands.
303 ("/"): New rational operation "/" for Rational operands.
304 ("*"): Operation "*" between Rational and Int removed.
305 ("abs"): New unary operator "abs" for Rational.
306 (Analyze_Aspect_Dimension_System): Reorganized.
307 (Analyze_Dimension_Identifier): Removed.
308 (Copy_Dimensions): Removed.
309 (Create_Rational_From_Expr): New Boolean parameter.
310 (Dimensions_Msg_Of): New routine. Return
311 a string with the dimensions of the parameter.
312 (From_Dimension_To_String_Of_Symbols): Renaming of
313 From_Dimension_To_String_Id.
314 * sem_dim.ads: Update comments.
315 (Is_Dim_IO_Package_Instantiation): New routine.
316 (Remove_Dimension_In_Declaration): Removed.
317 * sem_res.adb (Resolve_Op_Expon): Reorganized calls of
318 Eval_Op_Expon_For_Dimensioned_Type and Eval_Op_Expon.
319 * s-diflio.ads, s-diinio.ads: Update comments.
321 2011-12-21 Pascal Obry <obry@adacore.com>
323 * prj-attr.adb, snames.ads-tmpl: Add Library_Standalone,
324 Library_Fully_Standalone_Options and
325 Library_Fully_Standalone_Supported attributes.
326 * prj-nmsc.adb (Check_Library): Update check to take into
327 account fully standalone libraries. Such shared libraries can
328 only depend on static libraries.
329 (Check_Stand_Alone_Library): Add support for fully standalone libraries.
330 (Process_Project_Level_Simple_Attributes): Store value for
331 configuration attribute Library_Fully_Standalone_Supported.
332 * prj.ads, makeutl.adb (Standalone): New enumeration type.
333 (Project_Data): Standalone_Library now of type Standlone.
334 (Project_Configuration): Add Lib_Fully_Standalone_Supported
336 (Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported
338 * clean.adb (Clean_Project): Adjust to new type for Standalone.
339 * make.adb (Library_Phase): Adjust to new type for Standalone.
340 (Gnatmake): Likewise.
341 * mlib-prj.adb (Build_Library): Adjust to new type for
344 2011-12-21 Thomas Quinot <quinot@adacore.com>
346 * gnatls.adb (Gnatls): Call Set_Standard_Error at startup, and then
347 Set_Standard_Output just before producing normal (non-diagnostic)
349 * gnatcmd.adb (Gnatcmd): Call Set_Standard_Error at initialization
350 (and again after parsing project files).
352 2011-12-21 Vincent Celier <celier@adacore.com>
354 * prj-conf.adb (Do_Autoconf): When the object directory does
355 not exist, create auto.cgpr in the directory where temporary
358 2011-12-20 Ed Schonberg <schonberg@adacore.com>
360 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Further
361 refinements on the placement of a freeze node for a package
362 instantiation, when the generic appears within a previous
363 instantiation in the same unit.If the current instance is within
364 the one that contains the generic, the freeze node for the
365 current one must appear in the current declarative part. Ditto
366 if the current instance is within another package instance. In
367 these cases the freeze node of the previous instance is is not
368 relevant. New predicate Enclosing_Body simplifies the process.
369 (Freeze_Subprogram_Body): Rename Enclosing_Body to
370 Enclosing_Package_Body, to prevent confusion with subprogram of
372 (Install_Body): Recognize enclosing subprogram bodies to determine
373 whether freeze_node belongs in current declarative list.
375 2011-12-20 Robert Dewar <dewar@adacore.com>
377 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Allow
378 attribute definition clause for renaming if generated internally
379 and generate duplicate clause to apply to renamed object.
380 (Rep_Item_Too_Late): Only diagnose source level entities
381 * prj-nmsc.adb: Minor reformatting.
382 * gcc-interface/Make-lang.in: Update dependencies.
384 2011-12-20 Bob Duff <duff@adacore.com>
386 * opt.ads (List_Inherited_Aspects): Default to False
387 (i.e. -gnatw.L is the default).
388 * usage.adb: Document new default for -gnatw.L.
389 * gnat_ugn.texi: Document -gnatw.l and -gnatw.L switches.
390 * warnsw.adb (Set_Warning_Switch): Do not include
391 List_Inherited_Aspects in -gnatwa.
393 2011-12-20 Ed Schonberg <schonberg@adacore.com>
395 * checks.adb (Apply_Type_Conversion_Checks): For a discrete type
396 with predicates, indicate unconditionally that a range check
398 * exp_ch4.adb (Expand_N_In): When the membership test is rewritten
399 to incorporate a call to a predicate function, analyze expression
400 with checks suppressed, to prevent infinite recursion.
402 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
404 * exp_ch11.adb (Find_Local_Handler): Guard the
405 search over individual exception choices in case the list of
406 handlers contains other (possibly illegal) constructs.
408 2011-12-20 Gary Dismukes <dismukes@adacore.com>
410 * sem_ch8.adb (Find_Type): Test taggedness
411 of the Available_Type when checking for an illegal use of an
412 incomplete type, when the incomplete view is a limited view of
413 a type. Remove redundant Is_Tagged test.
415 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
417 * exp_util.adb: Add with and use clause for Aspects.
418 (Is_Finalizable_Transient): Objects which denote Ada containers
419 in the context of iterators are not considered transients. Such
420 object must live for as long as the loop is around.
421 (Is_Iterated_Container): New routine.
423 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
425 * exp_imgv.adb (Expand_Width_Attribute): Add a
426 type conversion from the enumeration subtype to its base subtype.
428 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
430 * sem_ch4.adb (Operator_Check): Update the call to
432 * sem_dim.adb: Remove with and use clause for Namet.Sp. Reorganize
433 all type declarations and datastructures involved. Propagate
434 all changes involving data structures and types throughout
435 the pakage. Alphabetize all subprograms. Add ??? comments.
437 (Analyze_Aspect_Dimension): Rewritten. This
438 routine now does all its checks in one pass rather than
439 two. Refactor code. The error message are now in a more GNAT-ish style.
440 (Create_Rational_From_Expr): This is now a function.
441 (Get_Dimensions): Removed.
442 (Get_Dimensions_String_Id): Removed.
443 (Dimensions_Of): New rouitne.
444 (Exists): New routines.
445 (Is_Invalid): New routine.
446 (Permits_Dimensions): Removed.
448 (Set_Symbol): New routine.
449 (System_Of): New routine.
450 * sem_dim.ads: Rewrite the top level description of the
451 package. Alphabetize subprograms. Add various comments on
452 subprogram usage. Add ??? comments.
453 (Is_Dimensioned_Type):
454 Renamed to Has_Dimension_System.
455 * sem_res.adb (Resolve_Op_Expon): Update the call to Is_Dimensioned_Type
457 2011-12-20 Ed Schonberg <schonberg@adacore.com>
459 * sem_ch13.adb (Check_Indexing_Functions): The return type of an
460 indexing function can be the default element type, and does not
461 need to be a reference type.
462 * sem_ch4.adb (Try_Container_Indexing): Ditto.
464 2011-12-20 Robert Dewar <dewar@adacore.com>
466 * a-cdlili.ads, sem_cat.adb, sem_ch10.adb: Minor reformatting.
468 2011-12-20 Bob Duff <duff@adacore.com>
470 * s-taprop-mingw.adb (Yield): Do_Yield is no longer Unreferenced.
472 2011-12-20 Vincent Pucci <pucci@adacore.com>
474 * impunit.adb: s-dimkio, s-dimmks and s-dmotpr defined as GNAT
475 Defined Additions to System.
476 * Makefile.rtl: s-dimkio, s-dimmks and s-dmotpr added.
477 * s-dimkio.ads, s-dimmks.ads, s-dmotpr.ads: New files.
479 2011-12-20 Gary Dismukes <dismukes@adacore.com>
481 * sem_ch4.adb (Traverse_Homonyms): Allow a homonym to match when
482 within an instance, even if the homonym is marked Is_Hidden at
485 2011-12-20 Robert Dewar <dewar@adacore.com>
487 * sem_ch3.adb, sem_ch5.adb, s-diinio.adb, s-diinio.ads, sem_dim.adb,
488 sem_dim.ads, sem_res.adb, s-stposu.adb, s-stposu.ads, sem_ch4.adb,
489 s-diflio.adb, s-diflio.ads, exp_disp.adb, s-llflex.ads: Minor
491 * aspects.ads: Dimension[_Aspects] are GNAT defined.
493 2011-12-20 Robert Dewar <dewar@adacore.com>
495 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
498 2011-12-20 Thomas Quinot <quinot@adacore.com>
500 * sem_cat.adb, sem_ch10.adb (Analyze_With_Clause): For a WITH clause on
501 a child unit that is an illegal instantiation, mark the WITH clause in
503 (Install_Siblings, Validate_Categorization_Dependency): Guard
504 against WITH clause marked as in error.
506 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
508 * sem_res.adb (Resolve_Allocator): Warning on allocation
509 of tasks on a subpool and rewrite the allocator into a raise
510 Program_Error statement.
511 * s-stposu.ads, s-stposu.adb: Code reformatting.
512 (Create_Subpool): Remove formal parameter Storage_Size.
513 (Default_Subpool_For_Pool): Add the default implementation of this
515 (Set_Pool_Of_Subpool): Rename formal parameter Pool to To. Update
516 all the uses of the parameter.
518 2011-12-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
520 * gcc-interface/Makefile.in (%86 linux%):
521 (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS.
522 (LIBGNAT_TARGET_PAIRS_64): New.
523 (LIBGNAT_TARGET_PAIRS): Add either depending on multilib.
525 2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
527 * gcc-interface/decl.c (gnat_to_gnu_param): Add comment about double
528 reference and DECL_POINTS_TO_READONLY_P.
529 * gcc-interface/trans.c (Identifier_to_gnu) <by_ref>: Always set the
530 TREE_READONLY flag on the first dereference of a double dereference.
532 2011-12-15 Arnaud Charlet <charlet@adacore.com>
534 * a-numaux-vms.ads, s-asthan-vms-ia64.adb, s-auxdec-vms-ia64.adb,
535 s-memory-vms_64.adb, s-memory-vms_64.ads, s-osinte-vms-ia64.adb,
536 s-osinte-vms-ia64.ads, s-tasdeb-vms.adb: New files.
538 2011-12-15 Vincent Pucci <pucci@adacore.com>
540 * aspects.adb, aspects.ads Aspect_Dimension and
541 Aspect_Dimension_System added
542 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
544 * gcc-interface/Make-lang.in: s-llflex, sem_dim added.
545 * impunit.adb :s-diflio and s-diinio defined as GNAT Defined
547 * Makefile.rtl: s-diflio, s-diinio and s-llflex added
548 * par-prag.adb, sem_prag.adb: Pragma_Dimension removed
549 * rtsfind.ads: Expon_LLF added
550 * sem_aggr.adb (Resolve_Aggregate): handles aggregate for
551 Aspect_Dimension case
552 * sem_attr.adb (Resolve_Attribute): analyze dimension for
554 * sem_ch10.adb (Analyze_With_Clause): Avoid the warning messages
555 due to the use of a GNAT library for Dimension packages
556 * sem_ch13.adb (Analyze_Aspect_Specifications):
557 Aspect_Dimension and Aspect_Dimension_System cases added
558 (Check_Aspect_At_Freeze_Point): Aspect_Dimension and
559 Aspect_Dimension_System cases added
560 * sem_ch2.adb (Analyze_Identifier): analyze dimension for
562 * sem_ch3.adb (Analyze_Component_Declaration): analyze dimension
563 for component declaration (Analyze_Object_Declaration): analyze
564 dimension for object declaration (Analyze_Subtype_Declaration):
565 analyze dimension for subtype declaration
566 * sem_ch4.adb (Operator_Check): checks exponent is a rational
567 for dimensioned operand for a N_Op_Expon
568 * sem_ch5.adb (Analyze_Assignment): analyze dimension for
569 assignment (Analyze_Statements): removal of dimensions in all
571 * sem_ch6.adb (Analyze_Return_Statement): analyze dimension for
573 * sem_ch8.adb (Analyze_Object_Renaming): analyze dimension for
575 * sem_dim.adb, sem_dim.ads (Analyze_Aspect_Dimension):
576 analyze the expression for aspect dimension and store the
578 (Analyze_Aspect_Dimension_System): analyze
579 the expression for aspect dimension system and store the new
581 (Analyze_Dimension): propagates dimension
582 (Expand_Put_Call_With_Dimension_String): add the dimension
583 string as a suffix of the numeric value in the output
584 (Has_Dimension): return True if the node has a dimension
585 (Remove_Dimension_In_Declaration): removal of dimension in the
586 expression of the declaration.
587 (Remove_Dimension_In_Statement): removal of dimension in statement
588 * sem_res.adb (Resolve): analyze dimension if the node
589 has already been analyzed.
590 (Resolve_Arithmetic_Op): analyze
591 dimension for arithmetic op.
592 (Resolve_Call): analyze dimension for function call.
593 (Resolve_Comparison_Op): analyze dimension for comparison op.
594 (Resolve_Equality_Op): analyze dimension for equality op.
595 (Resolve_Indexed_Component): analyze dimension for indexed component.
596 (Resolve_Op_Expon): analyze dimension for op expon.
597 (Resolve_Selected_Component): analyze dimension
598 for selected component.
599 (Resolve_Slice): analyze dimension for slice.
600 (Resolve_Unary_Op): analyze dimension for unary op
601 (Resolve_Type_Conversion): analyze dimension for type conversion
602 (Resolve_Unchecked_Type_Conversion): analyze dimension for
603 unchecked type conversion
604 * snames.ads-tmpl Name_Dimension, Name_Dimension_System,
605 Name_Dim_Float_IO, Name_Dim_Integer_IO,
606 Name_Generic_Elementary_Functions, Name_Sqrt added.
607 Pragma_Dimension removed
608 * s-diflio.adb, s-diflio.ads New GNAT library generic package
609 for dimensioned float type IO
610 * s-diinio.adb, s-diinio.ads New GNAT library generic package
611 for dimensioned integer type IO
612 * s-llflex.ads (Expon_LLF): exponentiation routine for long long
613 floats operand and exponent
615 2011-12-15 Robert Dewar <dewar@adacore.com>
617 * sem_aggr.adb: Minor comment addition.
619 2011-12-15 Bob Duff <duff@adacore.com>
621 * s-tasren.adb (Task_Count): Do not call Yield; E'Count is not a
622 task dispatching point.
623 * s-taprop-mingw.adb (Yield): Do not yield if Do_Yield is False.
625 2011-12-15 Robert Dewar <dewar@adacore.com>
627 * sigtramp-ppcvxw.c, sigtramp.h: Fix header.
629 2011-12-15 Javier Miranda <miranda@adacore.com>
631 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
632 applied to a class-wide type under VM targets generate code which
633 invokes the function Get_Alignment to retrieve the value of the
634 alignment from the TSD.
635 * rtsfind.ads (RE_Get_Alignment): New entity.
637 2011-12-15 Robert Dewar <dewar@adacore.com>
639 * g-comlin.adb: Fix header.
641 2011-12-15 Tristan Gingold <gingold@adacore.com>
643 * gnatls.adb: Fix typo.
645 2011-12-15 Ed Falis <falis@adacore.com>
647 * s-tpopsp-vxworks.adb: Update comment.
649 2011-12-15 Ed Schonberg <schonberg@adacore.com>
651 * sem_aggr.adb (Resolve_Array_Aggregate, Resolve_Aggr_Expr); If
652 the component type has predicates, generate corresponding check.
653 (Resolve_Record_Aggregate, Resolve_Aggr_Expr): Ditto.
655 2011-12-13 Cesar Strauss <cestrauss@gmail.com>
656 Eric Botcazou <ebotcazou@adacore.com>
659 * types.h (Byte): Change typedef to 'unsigned char'.
660 * atree.h (struct Flag_Word): Use Byte for 'convention' field.
662 2011-12-12 Robert Dewar <dewar@adacore.com>
664 * s-taprop-mingw.adb: Minor reformatting.
666 2011-12-12 Nicolas Roche <roche@adacore.com>
668 * gcc-interface/Make-lang.in: Update dependencies.
669 Add gnattools4 target when building tools in canadian mode
671 2011-12-12 Javier Miranda <miranda@adacore.com>
673 * exp_disp.adb (Make_VM_TSD): Complete previous patch.
675 2011-12-12 Bob Duff <duff@adacore.com>
677 * s-tpobop.adb: Use named notation.
678 * g-bytswa.ads, s-taprop.ads: Minor comment fix.
680 2011-12-12 Arnaud Charlet <charlet@adacore.com>
682 * make.adb: Minor comment update.
684 2011-12-12 Robert Dewar <dewar@adacore.com>
686 * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor
689 2011-12-12 Robert Dewar <dewar@adacore.com>
691 * sem_ch6.adb, gnatls.adb: Minor reformatting.
693 2011-12-12 Ed Schonberg <schonberg@adacore.com>
695 * freeze.adb (Freeze_Entity): If a type declared in a generic
696 context has predicates, generate a freeze node for it.
697 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
698 has not been analyzed yet, entity has not been frozen, so analyze
701 2011-12-12 Javier Miranda <miranda@adacore.com>
703 * exp_disp.adb (Make_VM_TSD): Generate code to store the value of
704 'alignment in the TSD.
706 2011-12-12 Bob Duff <duff@adacore.com>
708 * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
711 2011-12-12 Hristian Kirtchev <kirtchev@adacore.com>
713 * exp_ch4.adb (Expand_N_Allocator): Update the master of an
714 anonymous access-to-controlled type to utilize the heterogeneous
715 master associated with the current unit.
717 2011-12-12 Ed Schonberg <schonberg@adacore.com>
719 * sem_ch6.adb (Analyze_Expression_Function): If the function
720 is not a completion, pre-analyze the expression now to prevent
721 spurious visibility on later entities. The body is inserted at
722 the end of the current declaration list or package to prevent
723 early freezing, but the visibility is established at the point
726 2011-12-12 Bob Duff <duff@adacore.com>
728 * sem.adb, sem.ads: Add debugging routines.
730 2011-12-12 Tristan Gingold <gingold@adacore.com>
732 * gnatls.adb: (gnatls): Also add the objects dir in search list.
734 2011-12-12 Robert Dewar <dewar@adacore.com>
736 * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
737 sem_ch13.adb: Minor reformatting.
739 2011-12-12 Gary Dismukes <dismukes@adacore.com>
741 * sem_ch7.adb (Uninstall_Declarations): Don't
742 apply check for incomplete types used as a result type for an
743 access-to-function type when compiling for Ada 2012 or later.
744 * sem_ch6.adb (Analyze_Subprogram_Declaration):
745 Specialize error message for interface subprograms that are
746 not declared abstract nor null (functions can't be declared as
747 null). Also, remove "(Ada 2005)" from message.
749 2011-12-12 Robert Dewar <dewar@adacore.com>
751 * sem_prag.adb (GNAT_Pragma): Check comes from source.
753 2011-12-12 Robert Dewar <dewar@adacore.com>
755 * gnatls.adb: Minor reformatting.
757 2011-12-12 Javier Miranda <miranda@adacore.com>
759 * a-tags.ads (Alignment): New TSD field.
760 (Max_Predef_Prims): Value lowered to 15 (or 9 in case of
761 configurable runtime) Update documentation of predefined
762 primitives since Alignment has been removed.
763 * exp_disp.ads Update documentation of slots of dispatching
765 * exp_disp.adb (Default_Prim_Op_Position): Update slot
766 values since alignment is no longer a predefined primitive.
767 (Is_Predefined_Dispatch_Operation): Remove _alignment.
768 (Is_Predefined_Internal_Operation): Remove _alignment.
769 (Make_DT): Update static test on the value stored in a-tags.ads
770 for Max_Predef_Prims; store the value of 'alignment in the TSD.
771 * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram
772 that retrieves the alignment from the TSD
773 * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation
774 of class-wide types obtain the value of alignment from the TSD.
775 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
776 applied to a class-wide type invoke Build_Get_Alignment to
777 generate code which retrieves the value of the alignment from
779 * rtsfind.ads (RE_Alignment): New Ada.Tags entity
780 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged
781 types if the value of the alignment is bigger than the Maximum
782 alignment then set the value of the alignment to the Maximum
783 alignment and report a warning.
784 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate
786 (Predefined_Primitive_Bodies): Do not generate body of _alignment.
788 2011-12-12 Gary Dismukes <dismukes@adacore.com>
790 * freeze.adb (Freeze_Expression): Allow freezing of static
791 scalar subtypes that are prefixes of an attribute, even if not
792 yet marked static. Such attributes will get marked as static
793 later in Eval_Attribute (as called from Resolve_Attribute).
794 * sem_attr.adb (Eval_Attribute): Remove wrong code that does an
795 early return for attribute prefixes that are unfrozen source-level
796 types. This code was incorrectly bypassing folding of unfrozen
797 static subtype attributes in default expressions (the executable
798 example in the now-deleted comment was in fact illegal).
800 2011-12-12 Robert Dewar <dewar@adacore.com>
802 * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
803 gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
805 2011-12-12 Tristan Gingold <gingold@adacore.com>
807 * gsocket.h: Adjust previous patch.
809 2011-12-12 Thomas Quinot <quinot@adacore.com>
811 * exp_disp.adb: Minor reformatting.
813 2011-12-12 Tristan Gingold <gingold@adacore.com>
815 * gnatls.adb (Search_RTS): New procedure.
816 (Scan_Ls_Arg): Move code that search the RTS.
817 (Gnatls): search the RTS later.
818 * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function.
820 2011-12-12 Ed Falis <falis@adacore.com>
822 * sysdep.c: Fix treatment of VxWorks task options so that run-times
823 built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK.
825 2011-12-12 Bob Duff <duff@adacore.com>
827 * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads:
828 Minor cleanup and fiddling with debug printouts.
830 2011-12-12 Vincent Celier <celier@adacore.com>
832 * prj-nmsc.adb (Get_Directories): For a non extending project,
833 always get a declared object and/or exec directory if it already
834 exists, even when there are no sources, but do not create them.
836 2011-12-12 Bob Duff <duff@adacore.com>
838 * sem_res.adb (Resolve): Deal with the case where an abstract
839 operator is called with operands of type universal_integer.
841 2011-12-12 Thomas Quinot <quinot@adacore.com>
843 * par_sco.adb: Minor fix to dominance marker referencing WHILE
846 2011-12-12 Tristan Gingold <gingold@adacore.com>
848 * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code.
850 2011-12-12 Thomas Quinot <quinot@adacore.com>
852 * par_sco.adb: Adjust dominant marker for branches of CASE
855 2011-12-12 Thomas Quinot <quinot@adacore.com>
857 * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system
858 header file prior to redefining FD_SETSIZE.
860 2011-12-12 Ed Schonberg <schonberg@adacore.com>
862 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In
863 a generic context the aspect expressions may not have been
864 preanalyzed if there was no previous freeze point, so the
865 expressions must be preanalyzed now, and there is no conformance
866 to check for visibility changes.
868 2011-12-12 Matthew Heaney <heaney@adacore.com>
870 * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use
871 subtype Index_Type'Base for Index component (Finalize): Remove
872 unnecessary access check (First, Last): Cursor return value
873 depends on iterator index value (Iterate): Use start position as
874 iterator index value (Next, Previous): Forward to corresponding
875 cursor-based operation.
876 * a-cborma.adb (Iterate): Properly initialize iterator object (with 0
879 2011-12-12 Robert Dewar <dewar@adacore.com>
881 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
883 2011-12-12 Steve Baird <baird@adacore.com>
885 * sem_ch3.adb (Check_Completion): Improve a comment.
887 2011-12-12 Tristan Gingold <gingold@adacore.com>
889 * cstand.adb: Minor comment fix.
891 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
893 * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
894 flag of elements to compute that of the constructor.
896 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
898 * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
899 on references built for parameters which aren't specifically by-ref.
901 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
903 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
904 alignment set on a renaming, assert that the renamed object is aligned
905 enough as to make it possible to honor it.
907 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
909 * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
911 2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
913 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
914 Correctly detect cygwin, which no longer has the '32' suffix, and use
915 appropriate implementations of the sockets and memory packages.
916 * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
917 setmode/_setmode for MinGW and Cygwin, respectively.
918 (__gnat_set_binary_mode [windows targets]): Use the above, and enable
919 the windows version for Cygwin as well as MinGW.
920 (__gnat_set_text_mode [windows targets]): Likewise.
921 (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
922 in addition to the MinGW version.
923 (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
924 (__gnat_get_stack_bounds): Likewise.
926 2011-12-05 Bob Duff <duff@adacore.com>
928 * sem_ch4.adb: Minor comment fix.
930 2011-12-05 Robert Dewar <dewar@adacore.com>
932 * gnat_ugn.texi: Add documentation for -gnatw.e.
934 2011-12-05 Bob Duff <duff@adacore.com>
936 * treepr.adb (pn): Print something useful for
937 Elmt_Ids. Add Write_Eol to 'when others' case, so the output
938 will be seen immediately in gdb.
940 2011-12-05 Ed Schonberg <schonberg@adacore.com>
942 * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
943 is never a main program.
945 2011-12-05 Thomas Quinot <quinot@adacore.com>
947 * par_sco.adb: Various minor adjustments to dominance markers
950 2011-12-05 Ed Schonberg <schonberg@adacore.com>
952 * sem_ch6.adb (Analyze_Expression_Function): If the function is
953 a completion, generate a body reference for its defining entity,
954 before rewriting the node as a body.
955 * sem_util.adb (Defining_Entity): Add entry for expression
958 2011-12-05 Bob Duff <duff@adacore.com>
960 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
961 to the Comes_From_Source check, to deal properly with the case
962 of indirect inheritance of "=".
964 2011-12-05 Thomas Quinot <quinot@adacore.com>
967 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
970 2011-12-05 Thomas Quinot <quinot@adacore.com>
972 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
975 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
976 Thomas Quinot <quinot@adacore.com>
978 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
979 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
980 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
981 which allows the file to be installed in adainclude.
982 * gcc-interface/Make-lang.in: Update dependencies.
984 2011-12-02 Javier Miranda <miranda@adacore.com>
986 * sem_ch3.adb (Constrain_Access): Undo previous
987 patch for this routine. Required since the RM rule 3.7.1(7/3)
988 applies to all access types.
990 2011-12-02 Bob Duff <duff@adacore.com>
992 * sem_ch6.adb: Minor comment fix.
994 2011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com>
996 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
997 for consistency with other ports.
998 * s-osinte-rtems.adb: Add body for dummy implementation of
999 pthread_rwlockattr_setkind_np().
1000 * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
1001 * terminals.c: Add __rtems__ conditionals to account for differences
1002 in termios implementation.
1004 2011-12-02 Robert Dewar <dewar@adacore.com>
1006 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
1007 a-cbmutr.ads: Minor reformatting.
1009 2011-12-02 Hristian Kirtchev <kirtchev@adacore.com>
1011 * exp_dbug.adb: Comment reformatting.
1012 (Get_External_Name): Use Reset_Buffers to reset the contents of
1013 Name_Buffer and Homonym_Numbers.
1014 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
1015 Homonym_Numbers before creating a new qualified name for a particular
1017 (Reset_Buffers): New routine.
1019 2011-12-02 Matthew Heaney <heaney@adacore.com>
1021 * a-cbmutr.ads (No_Node): Moved declaration from body to spec
1022 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
1024 (Child_Iterator): Derives from Root_Iterator.
1025 (Finalize): Implemented as an override operation for Root_Iterator.
1026 (First): Return value depends on Subtree component.
1027 (Last): Component was renamed from Parent to Subtree.
1028 (Next): Checks parameter value, and uses simplified loop.
1029 (Iterate): Forwards to Iterate_Subtree.
1030 (Iterate_Children): Component was renamed from Parent to Subtree.
1031 (Iterate_Subtree): Checks parameter value
1033 2011-12-02 Robert Dewar <dewar@adacore.com>
1035 * usage.adb: Add lines for -gnatw.n and -gnatw.N
1036 (atomic sync info msgs).
1038 2011-12-02 Steve Baird <baird@adacore.com>
1040 * sem_ch3.adb (Check_Completion): An Ada 2012
1041 generic formal type doesn't require a completion.
1043 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
1045 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
1046 packed array type if it is to be set on the array type used to
1049 2011-12-02 Robert Dewar <dewar@adacore.com>
1051 * gnat_rm.texi: Eliminate confusing use of type name.
1053 2011-12-02 Thomas Quinot <quinot@adacore.com>
1055 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
1056 body that acts as spec, do not create a shallow copy of the context
1057 clause for the synthetized spec (instead, use the same list as
1060 2011-12-02 Bob Duff <duff@adacore.com>
1062 * gnat_ugn.texi: Clarify usage of -p binder switch.
1064 2011-12-02 Javier Miranda <miranda@adacore.com>
1066 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
1067 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
1068 (In_Generic_Body): Moved to sem_aux.
1069 (Unit_Declaration_Node): Moved to sem_aux.
1070 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
1072 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
1073 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
1074 exp_ch13.adb: Add with-clause on Sem_Aux.
1076 2011-12-02 Yannick Moy <moy@adacore.com>
1078 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
1079 get the name of the entity.
1080 (Unique_Entity): Correct case for subprogram stubs.
1082 2011-12-02 Yannick Moy <moy@adacore.com>
1084 * sem_ch3.adb (Check_Initialization): Do not emit warning on
1085 initialization of limited type object in Alfa mode.
1087 2011-12-02 Robert Dewar <dewar@adacore.com>
1089 * sinfo.ads: Minor reformatting.
1090 * gnat_ugn.texi: Fix confusion in use of term "type name".
1092 2011-12-02 Robert Dewar <dewar@adacore.com>
1094 * sem_ch6.adb: Minor change in error message.
1096 2011-12-02 Robert Dewar <dewar@adacore.com>
1098 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
1101 2011-12-02 Javier Miranda <miranda@adacore.com>
1103 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
1104 static check of the rule of general access types whose designated
1105 type has discriminants.
1106 * sem_util.ads, sem_util.adb
1107 (Effectively_Has_Constrained_Partial_View): New subprogram.
1108 (In_Generic_Body): New subprogram.
1109 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
1110 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
1111 subprogram In_Generic_Body.
1112 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
1113 sem_ch4.adb: In addition, this patch replaces the occurrences of
1114 Has_Constrained_Partial_View by
1115 Effectively_Has_Constrained_Partial_View.
1117 2011-12-02 Matthew Heaney <heaney@adacore.com>
1119 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
1121 (Finalize): Remove unnecessary access check.
1122 (First): Forward to First_Child.
1123 (Last): Forward to Last_Child.
1124 (Iterate): Check preconditions for parent node parameter.
1125 (Next): Forward to Next_Sibling.
1126 (Previous): Forward to Previous_Sibling.
1128 2011-12-02 Robert Dewar <dewar@adacore.com>
1130 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
1131 a-coormu.adb, a-convec.adb: Minor reformatting.
1133 2011-12-02 Matthew Heaney <heaney@adacore.com>
1135 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
1136 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
1138 (Finalize): Decrement busy counter.
1139 (First, Last): Cursor return value depends on iterator node value.
1140 (Iterate): Use start position as iterator node value.
1141 (Next, Previous): Forward to corresponding cursor-based operation.
1143 2011-12-02 Robert Dewar <dewar@adacore.com>
1145 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
1146 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
1147 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
1148 a-ciorma.adb, a-cobove.adb: Minor reformatting.
1150 2011-12-01 Jakub Jelinek <jakub@redhat.com>
1153 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
1155 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1157 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
1159 2011-11-23 Thomas Quinot <quinot@adacore.com>
1161 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
1162 only on platforms where this is required, as determined by
1165 2011-11-23 Ed Schonberg <schonberg@adacore.com>
1167 * sem_ch9.adb: No check on entry index if error on index.
1169 2011-11-23 Gary Dismukes <dismukes@adacore.com>
1171 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
1172 return statements nested inside an extended_return_statement.
1173 * gcc-interface/Make-lang.in: Update dependencies.
1174 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
1176 2011-11-23 Ed Schonberg <schonberg@adacore.com>
1178 * freeze.adb (Freeze_All_Ent): An incomplete type is not
1179 frozen by a subprogram body that does not come from source.
1181 2011-11-23 Pascal Obry <obry@adacore.com>
1183 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
1184 the library for pseudo terminal support.
1185 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
1188 2011-11-23 Ed Schonberg <schonberg@adacore.com>
1190 * sem_ch9.adb: No check on entry family index if generic.
1192 2011-11-23 Thomas Quinot <quinot@adacore.com>
1194 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
1195 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
1196 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
1197 System.OS_Constants from shared spec of
1198 System.Tasking.Primitive_Operations to the specific body variants
1199 that really require this dependency.
1201 2011-11-23 Ed Schonberg <schonberg@adacore.com>
1203 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
1204 If the declaration has aspects, analyze them so they can be
1207 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
1209 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
1210 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
1211 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
1212 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
1213 Add with and use clause for Ada.Finalization. Type
1214 Iterator and Child_Iterator are now derived from Limited_Controlled.
1215 (Finalize): New routine.
1216 (Iterate): Add a renaming of counter Busy and
1217 increment it. Update the return aggregate.
1218 (Iterate_Children): Add a renaming of
1219 counter Busy and increment it. Update the return aggregate.
1220 (Iterate_Subtree): Add a renaming of counter Busy and increment
1221 it. Update the return aggregate.
1222 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
1224 * a-cihama.ads: Type Map_Access is now a general access type.
1225 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
1226 associated with the tree.
1227 * a-cohama.ads: Type Map_Access is now a general access type.
1228 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
1230 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
1231 to wrap the loop as this is done at an earlier step, during
1232 analysis. The declarations of the iterator and the cursor use
1233 the usual Insert_Action mechanism when added into the tree.
1234 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
1235 Loop_Statement and replace all respective uses by N. Add local
1236 constant Loc. Preanalyze the loop iterator to discover whether
1237 it is a container iterator and if it is, wrap the loop in a
1238 block. This ensures that any controlled temporaries produced
1239 by the iteration scheme share the same lifetime of the loop.
1240 (Is_Container_Iterator): New routine.
1241 (Is_Wrapped_In_Block): New routine.
1242 (Pre_Analyze_Range): Move spec and body to the library level.
1244 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
1246 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
1247 that controls casing of type and subtype names.
1249 2011-11-23 Yannick Moy <moy@adacore.com>
1251 * sem_ch3.adb: Minor addition of comments.
1253 2011-11-23 Thomas Quinot <quinot@adacore.com>
1255 * prj-part.adb (Extension_Withs): New global variable,
1256 contains the head of the list of WITH clauses from the EXTENDS
1257 ALL projects for which virtual packages are being created.
1258 (Look_For_Virtual_Projects_For): When recursing through
1259 an EXTENDS ALL, add the WITH clauses of the extending
1260 project to Extension_Withs. When adding a project to the
1261 Virtual_Hash, record the associated Extension_Withs list.
1262 (Create_Virtual_Extending_Project): Add a copy of the appropriate
1263 Extension_Withs to the virtual project.
1265 2011-11-23 Thomas Quinot <quinot@adacore.com>
1267 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
1269 2011-11-23 Thomas Quinot <quinot@adacore.com>
1271 * Make-generated.in (Sdefault.Target_Name): Set to
1272 $(target_noncanonical) instead of $(target) for consistency.
1274 2011-11-23 Matthew Heaney <heaney@adacore.com>
1276 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
1277 Iterator type as limited (First, Last): Cursor return value
1278 depends on iterator node value (Iterate): Use start position as
1279 iterator node value (Next, Previous): Forward to corresponding
1280 cursor-based operation.
1282 2011-11-23 Matthew Heaney <heaney@adacore.com>
1284 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
1285 Renamed from Ordered_Set_Iterator_Interfaces.
1286 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
1287 Iterator type as limited (First, Last): Cursor return value
1288 depends on iterator node value (Iterate): Use start position as
1289 iterator node value (Next, Previous): Forward to corresponding
1290 cursor-based operation.
1291 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
1292 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
1293 node component (First, Next): Forward call to corresponding
1294 cursor-based operation (Iterate): Representation of iterator no
1295 longer has node component
1297 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
1299 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
1300 dereference has a proper type before the side effect removal
1302 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
1303 where the base type of the subtype is a private itype created
1304 to act as the partial view of a constrained record type. This
1305 scenario manifests with equivalent class-wide types for records
1306 with unknown discriminants.
1308 2011-11-23 Jerome Guitton <guitton@adacore.com>
1310 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
1312 2011-11-23 Thomas Quinot <quinot@adacore.com>
1314 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
1315 reformatting/reorganization.
1317 2011-11-23 Thomas Quinot <quinot@adacore.com>
1319 * g-htable.ads: Remove old comments.
1321 2011-11-23 Thomas Quinot <quinot@adacore.com>
1323 * exp_imgv.adb: Minor reformatting.
1325 2011-11-23 Robert Dewar <dewar@adacore.com>
1327 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
1328 family bounds out of range.
1330 2011-11-23 Matthew Heaney <heaney@adacore.com>
1332 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
1333 type as limited, and remove node component.
1334 (First, Next): Forward call to corresponding cursor-based operation.
1335 (Iterate): Representation of iterator no longer has node component.
1337 2011-11-23 Yannick Moy <moy@adacore.com>
1339 * exp_util.adb: Revert previous change to remove side-effects in Alfa
1340 mode, which is not the correct thing to do for renamings.
1342 2011-11-23 Thomas Quinot <quinot@adacore.com>
1344 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
1345 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
1346 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
1347 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
1348 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
1349 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
1350 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
1351 s-taprop-posix.adb: Remove hard-coded clock ids;
1352 instead, generate them in System.OS_Constants.
1353 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
1354 id of the clock providing Ada.Real_Time.Monotonic_Clock.
1355 * thread.c: New file.
1356 (__gnat_pthread_condattr_setup): New function. For platforms where
1357 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
1360 2011-11-23 Yannick Moy <moy@adacore.com>
1362 * sem_ch3.adb: Restore the use of Expander_Active instead of
1363 Full_Expander_Active, so that the evaluation is forced in Alfa
1364 mode too. Otherwise, we end up with an unexpected insertion in a
1365 place where it is not supposed to happen, on default parameters
1368 2011-11-23 Thomas Quinot <quinot@adacore.com>
1370 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
1371 for Pretty_Print, for use from within gdb.
1373 2011-11-23 Ed Schonberg <schonberg@adacore.com>
1375 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
1376 and the cursor declarations in a block, so that the loop variable
1377 is local to the construct.
1379 2011-11-23 Matthew Heaney <heaney@adacore.com>
1381 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
1382 type Reversible_Iterator'Class.
1383 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
1384 Declare type as limited.
1385 (First, Last): Return value depends on iterator's start node value.
1386 (Next, Previous): Call corresponding Cursor-based operation.
1387 (Iterate): Indicate whether complete or partial iteration
1389 2011-11-23 Robert Dewar <dewar@adacore.com>
1391 * errout.adb: Minor reformattin (Finalize): Take templates into
1392 account for warning suppression.
1393 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
1394 * erroutc.adb: Minor reformatting (Finalize): Take generic
1395 templates into account for warning suppress.
1396 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
1397 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
1398 case Warnings): Provide Used parameter in call to
1399 Set_Specific_Warnings_Off (to deal with generic template case).
1401 2011-11-23 Pascal Obry <obry@adacore.com>
1403 * sem_prag.adb (Process_Convention): Better error message for
1404 stdcall convention on dispatching calls.
1406 2011-11-23 Gary Dismukes <dismukes@adacore.com>
1408 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
1410 2011-11-23 Javier Miranda <miranda@adacore.com>
1412 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
1413 implicit type conversion when the returned object is allocated
1414 in the secondary stack and the type of the returned object is
1415 an interface. Done to force generation of displacement of the
1418 2011-11-23 Pascal Obry <obry@adacore.com>
1420 * impunit.adb: Add g-exptty and g-tty units.
1422 2011-11-23 Robert Dewar <dewar@adacore.com>
1424 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
1426 2011-11-23 Robert Dewar <dewar@adacore.com>
1428 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
1431 2011-11-23 Yannick Moy <moy@adacore.com>
1433 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
1434 line of precondition/ postcondition/invariant.
1436 2011-11-23 Pascal Obry <obry@adacore.com>
1438 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
1439 terminals.c: New files.
1440 Makefile.rtl: Add these new files.
1441 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
1442 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
1443 * gcc-interface/Make-lang.in: Update dependencies.
1445 2011-11-21 Robert Dewar <dewar@adacore.com>
1447 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
1448 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
1450 2011-11-21 Thomas Quinot <quinot@adacore.com>
1452 * sinfo.ads: Minor reformatting.
1454 2011-11-21 Yannick Moy <moy@adacore.com>
1456 * exp_util.adb: Minor reformatting. Update comments.
1458 2011-11-21 Robert Dewar <dewar@adacore.com>
1460 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
1461 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
1462 sem_ch6.adb: Minor reformatting.
1464 2011-11-21 Arnaud Charlet <charlet@adacore.com>
1466 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
1467 Unrestricted_Access to deal with fact that we properly detect the
1468 error if Access is used.
1469 * gcc-interface/Make-lang.in: Update dependencies.
1471 2011-11-21 Yannick Moy <moy@adacore.com>
1473 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
1475 * sem_res.adb (Resolve_Short_Circuit): Place error on first
1476 character of expression.
1478 2011-11-21 Yannick Moy <moy@adacore.com>
1480 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
1482 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1484 * exp_attr.adb (Expand_N_Attribute_Reference, case
1485 Max_Size_In_Storage_Elements): Account for the size of the
1486 hidden list header which precedes controlled objects allocated
1488 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
1490 * sinfo.adb (Header_Size_Added): New routine.
1491 (Set_Header_Size_Added): New routine.
1492 * sinfo.ads: Add flag Controlled_Header_Added along with
1494 (Header_Size_Added): New inlined routine.
1495 (Set_Header_Size_Added): New inlined routine.
1496 * s-stposu.adb (Allocate_Any_Controlled): Use
1497 Header_Size_With_Padding to calculate the proper
1499 (Deallocate_Any_Controlled): Use
1500 Header_Size_With_Padding to calculate the proper size
1501 of the header. (Header_Size_With_Padding): New routine.
1502 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
1503 * s-stposu.ads (Header_Size_With_Padding): New routine.
1505 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1507 * aspects.adb: Aspect specifications are allowed on renaming
1509 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
1510 subprogram renaming declaration
1512 2011-11-21 Tristan Gingold <gingold@adacore.com>
1514 * env.c: Remove unused declaration.
1516 2011-11-21 Pascal Obry <obry@adacore.com>
1518 * s-os_lib.ads: Minor style fix.
1520 2011-11-21 Pascal Obry <obry@adacore.com>
1522 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
1523 identical, do nothing on Windows XP.
1525 2011-11-21 Yannick Moy <moy@adacore.com>
1527 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1528 Use Full_Expander_Active instead of Expander_Active to control
1529 the forced evaluation of expressions for the sake of generating
1532 2011-11-21 Thomas Quinot <quinot@adacore.com>
1534 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
1536 2011-11-21 Tristan Gingold <gingold@adacore.com>
1538 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
1539 mode_read_binary, mode_write_binary, mode_append_binary,
1540 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
1541 mode_read_binary_plus, mode_write_binary_plus,
1542 mode_append_binary_plus): Remove unused declarations.
1544 2011-11-21 Yannick Moy <moy@adacore.com>
1546 * gnat_rm.texi: Minor rewording.
1548 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1550 * exp_imgv.adb (Expand_Width_Attribute): Emit
1551 an error message rather than a warning when pragma Discard_Names
1552 prevents the computation of 'Width. Do not emit an error through
1555 2011-11-21 Javier Miranda <miranda@adacore.com>
1557 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
1558 implicit type conversion when the type of the allocator is an
1559 interface. Done to force generation of displacement of the "this"
1560 pointer when required.
1562 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1564 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
1565 functions, and is set when the expression is a completion of a
1566 previous declaration.
1567 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
1568 whether an expression function completes a previous declaration,
1569 use Find_Corresponding_Spec, as when analyzing a subprogram body.
1571 2011-11-21 Steve Baird <baird@adacore.com>
1573 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
1574 (Type_Access_Level): Improve comment.
1576 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
1578 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
1579 means of -iquote unconditionally.
1581 2011-11-21 Robert Dewar <dewar@adacore.com>
1583 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1586 2011-11-21 Arnaud Charlet <charlet@adacore.com>
1588 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
1589 to deal with fact that we properly detect the error if Access
1592 2011-11-21 Steve Baird <baird@adacore.com>
1594 * sem_util.ads: Update comment describing function
1595 Deepest_Access_Level.
1596 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
1597 generic formal type.
1598 (Type_Access_Level): Return library level
1599 for a generic formal type.
1600 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
1601 calls with calls to Deepest_Type_Access_Level.
1602 * sem_ch3.adb (Analyze_Component_Declaration): replace a
1603 Type_Access_Level call with a call to Deepest_Type_Access_Level.
1604 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
1605 Replace three Type_Access_Level calls with calls to
1606 Deepest_Type_Access_Level.
1607 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
1608 Deepest_Type_Access_Level.
1609 (Valid_Conversion.Valid_Array_Conversion): Replace a
1610 Type_Access_Level call with a call to Deepest_Type_Access_Level.
1612 2011-11-21 Robert Dewar <dewar@adacore.com>
1614 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
1616 2011-11-21 Robert Dewar <dewar@adacore.com>
1618 * sinput.ads: Minor comment fix.
1620 2011-11-21 Robert Dewar <dewar@adacore.com>
1622 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
1623 Last_Bit, Position): Handle 2005 case.
1625 2011-11-21 Robert Dewar <dewar@adacore.com>
1627 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
1628 to deal with fact that we properly detect the error if Access
1630 (Increment): Same fix.
1631 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
1632 to deal with fact that we properly detect the error if Access
1634 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
1635 volatile if the B component is volatile. This affects the check
1636 for passing such a by reference volatile actual to a non-volatile
1637 formal (which should be illegal)
1639 2011-11-21 Robert Dewar <dewar@adacore.com>
1641 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
1642 size and alignment for foreign convention enumeration types.
1643 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
1646 2011-11-21 Yannick Moy <moy@adacore.com>
1648 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
1649 Apply_Discriminant_Check, Apply_Divide_Check,
1650 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
1651 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
1652 Selected_Range_Checks): Replace reference to Expander_Active
1653 with reference to Full_Expander_Active, so that expansion of
1654 checks is not performed in Alfa mode
1656 2011-11-21 Tristan Gingold <gingold@adacore.com>
1658 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
1659 fact that we properly detect the error if Access is used.
1661 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1663 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
1665 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1667 * exp_imgv.adb: Add with and use clause for Errout.
1668 (Expand_Width_Attribute): Emit a warning when in
1669 configurable run-time mode to provide a better diagnostic message.
1671 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1673 * s-finmas.adb (Finalize): Add comment concerning double finalization.
1675 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1677 * sem_ch3.adb (Access_Definition): If the access definition
1678 is itself the return type of an access to function definition
1679 which is ultimately the return type of an access to subprogram
1680 declaration, its scope is the enclosing scope of the ultimate
1681 access to subprogram.
1683 2011-11-21 Steve Baird <baird@adacore.com>
1685 * sem_res.adb (Valid_Conversion): If a conversion was legal
1686 in the body of a generic, then the corresponding conversion is
1687 legal in the expanded body of an instance of the generic.
1689 2011-11-21 Robert Dewar <dewar@adacore.com>
1691 * sem_ch3.adb: Minor reformatting.
1693 2011-11-21 Robert Dewar <dewar@adacore.com>
1695 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
1697 * sinput.ads: Add section on Handling of Source Line Terminators.
1698 * types.ads (Line_Terminator): Adjust comments.
1700 2011-11-21 Robert Dewar <dewar@adacore.com>
1702 * frontend.adb (Frontend): Capture restrictions from config files
1703 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
1705 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
1706 references. This was noticed during debugging, but it is not
1707 known if it causes real bugs.
1708 * restrict.ads, restrict.adb: New routines to save/set/restore
1709 non-partition-wide restrictions.
1710 * s-rident.ads: Comment changes for new handling of
1712 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
1713 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
1714 attempt to save/restore non-partition-wide restrictions (now
1715 this work is all done in Sem).
1716 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1717 Special handling for restriction No_Elaboration_Code.
1719 2011-11-21 Robert Dewar <dewar@adacore.com>
1721 * gnat_ugn.texi: Document new handling of restrictions pragmas.
1723 2011-11-21 Pascal Obry <obry@adacore.com>
1725 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
1726 attribute as not needed.
1728 2011-11-21 Robert Dewar <dewar@adacore.com>
1730 * sem_prag.adb: Minor reformatting.
1732 2011-11-21 Pascal Obry <obry@adacore.com>
1734 * gnat_rm.texi: Document restriction for stdcall convention on
1737 2011-11-21 Pascal Obry <obry@adacore.com>
1739 * sem_prag.adb (Process_Convention): A dispatching call cannot
1740 have a stdcall calling convention.
1742 2011-11-21 Pascal Obry <obry@adacore.com>
1744 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
1745 mutex attribute as not needed.
1746 (Initialize_TCB): Likewise.
1747 (Initialize): Likewise.
1749 2011-11-21 Robert Dewar <dewar@adacore.com>
1751 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
1752 (Process_PPCs): Invariants only apply to public subprograms.
1754 2011-11-21 Robert Dewar <dewar@adacore.com>
1756 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
1757 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
1759 2011-11-21 Robert Dewar <dewar@adacore.com>
1761 * a-finali.ads: Use pragma Pure_12 for this unit
1762 * aspects.adb: Add aspect Pure_12
1763 * aspects.ads: Add aspect Pure_12
1764 * opt.ads: Add note on Pure_12
1765 * par-prag.adb: Add dummy entry for Pure_12
1766 * sem_prag.adb: Implement Pure_12 pragma
1767 * snames.ads-tmpl: Add Entry for Pure_12
1769 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
1771 * vms_data.ads: Add qualifiers for new gnatpp options
1772 '--call_threshold' and '--par_threshold".
1773 * gnat_ugn.texi: Add description for new gnatpp options
1774 '--call_threshold' and '--par_threshold".
1776 2011-11-21 Robert Dewar <dewar@adacore.com>
1778 * lib.ads: Minor reformatting.
1780 2011-11-21 Robert Dewar <dewar@adacore.com>
1782 * lib-load.ads: Add comment.
1784 2011-11-21 Gary Dismukes <dismukes@adacore.com>
1786 * sem_elab.adb: Minor reformatting
1788 2011-11-21 Robert Dewar <dewar@adacore.com>
1790 * exp_ch6.adb: Minor reformatting.
1792 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1794 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
1795 subprogram of the formal package is covered by an others
1796 association with a box initialization, no check is needed
1797 against the actual in the instantiation of the formal package.
1799 2011-11-21 Robert Dewar <dewar@adacore.com>
1801 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
1802 elab warning from within precondition/postcondition etc.
1804 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1806 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
1807 with out parameters may generate assignments to force constraint
1808 checks. These checks must be properly placed in the code after the
1809 declaration or statement that contains the call.
1811 2011-11-21 Fedor Rybin <frybin@adacore.com>
1813 * gnat_ugn.texi: Adding info on current gnattest limitations an
1814 support of -X option.
1816 2011-11-21 Robert Dewar <dewar@adacore.com>
1818 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
1820 2011-11-20 Robert Dewar <dewar@adacore.com>
1822 * exp_ch6.adb, exp_util.adb: Minor reformatting
1824 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1826 * sinfo.ads (Reference): Document that it is OK to set
1827 Is_Known_Non_Null on a temporary initialized to a N_Reference
1830 2011-11-20 Matthew Heaney <heaney@adacore.com>
1832 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
1835 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1837 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
1838 Declare NEW_EXPR local variable and attach the
1839 temporary to it. Set Is_Known_Non_Null on the temporary.
1840 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
1841 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
1842 the temporary created to hold the 'Reference of the expression,
1844 * checks.adb (Install_Null_Excluding_Check): Bail out for the
1845 Get_Current_Excep.all.all idiom generated by the expander.
1847 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1849 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
1850 (f_gnat_ret): New macro.
1851 (struct nrv_data): Add GNAT_RET.
1852 (finalize_nrv_unc_r): New helper function.
1853 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
1854 function returns unconstrained, use finalize_nrv_unc_r as callback.
1855 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
1856 RET_OBJ is non-null.
1857 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
1858 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
1859 if optimization is enabled, record candidates for the Named Return
1862 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1864 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
1865 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
1866 test. Tweak default case.
1867 <N_Goto_Statement>: Use better formatting.
1868 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
1869 MODIFY_EXPR to initialize the storage.
1870 (build_allocator): Likewise.
1872 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1874 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
1875 call to components_to_record.
1876 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
1877 part, reuse enclosing union even if there is a representation clause
1878 on the Unchecked_Union. If there is a variant part, compute the new
1879 first free position, if any. Adjust call to self. Use a single field
1880 directly only if it hasn't got a representation clause or is placed at
1881 offset zero. Create the variant part at offset 0 if all the fields
1882 down to this level have a rep clause. Do not chain the variant part
1883 immediately and adjust downstream.
1884 Do not test ALL_REP before moving the fields without rep clause to the
1885 previous level. Call create_rep_part to create the REP part and force
1886 a minimum size on it if necessary. Do not chain it immediately.
1887 Create a fake REP part if there are fields without rep clause that need
1888 to be laid out starting from FIRST_FREE_POS.
1889 At the end, chain the REP part and then the variant part.
1890 (create_rep_part): New function.
1891 (get_rep_part): Minor tweak.
1892 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1894 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
1897 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1898 bug filed as radar #10302855 from __gnat_error_handler to...
1899 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
1900 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1902 2011-11-18 Tristan Gingold <gingold@adacore.com>
1903 Iain Sandoe <iains@gcc.gnu.org>
1906 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1907 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1909 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
1911 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1913 (OSCONS_CPP, OSCONS_EXTRACT): New.
1914 (./bldtools/oscons/xoscons): New target.
1915 ($(RTSDIR)/s-oscons.ads): Likewise.
1916 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1917 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1918 * Make-generated.in: Remove machinery to generate xoscons and
1921 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
1923 * fe.h (Serious_Errors_Detected): New macro.
1924 * gcc-interface/gigi.h (build_atomic_load): Declare.
1925 (build_atomic_store): Likewise.
1926 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1927 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
1928 Build an atomic load for an In or In Out parameter if needed.
1929 Build an atomic store for the assignment of an Out parameter if needed.
1930 Build an atomic store to the target if ATOMIC_SYNC is true.
1931 (present_in_lhs_or_actual_p): New predicate.
1932 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1933 <N_Explicit_Dereference>: Likewise.
1934 <N_Indexed_Component>: Likewise.
1935 <N_Selected_Component>: Likewise.
1936 <N_Assignment_Statement>: Adjust call to call_to_gnu.
1937 Build an atomic store to the LHS if needed.
1938 <N_Function_Call>: Adjust call to call_to_gnu.
1939 * gcc-interface/utils2.c: Include toplev.h.
1940 (resolve_atomic_size): New static function.
1941 (build_atomic_load): New function.
1942 (build_atomic_store): Likewise.
1943 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1945 2011-11-07 Olivier Hainque <hainque@adacore.com>
1947 * sigtramp-ppcvxw.c: Add general comments.
1948 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1949 rules for r2 to r13, plus CTR and XER.
1950 (CFA_REG): New, register number used to hold the local CFA.
1951 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1952 Make that 15, not 14, with documentation.
1953 (TCR): Undef before definition, preventing conflict with reg number in
1956 2011-11-07 Robert Dewar <dewar@adacore.com>
1958 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1959 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1960 * gcc-interface/Make-lang.in: Update dependencies.
1962 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1964 * exp_ch6.adb: A tagged type is a legal actual for an aliased
1967 2011-11-07 Pascal Obry <obry@adacore.com>
1969 * g-socket.adb, g-socket.ads: Minor reformatting.
1971 2011-11-07 Robert Dewar <dewar@adacore.com>
1973 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1975 2011-11-07 Robert Dewar <dewar@adacore.com>
1977 * gnat_ugn.texi: Add discussion of default mode handling of
1978 source representation with no -gnatW option given, in particular
1979 noting that NEL (next line) is not recognized in this context.
1981 2011-11-07 Yannick Moy <moy@adacore.com>
1983 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1984 generate a reference for a modification even when the modification
1985 does not come from source.
1987 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1989 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1990 use the indexing attributes rather than the Element function,
1991 to obtain variable references.
1992 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1993 Find_Aspect rather than iterating over representation
1994 items. Improve error message.
1995 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1996 of Reference functions.
1998 2011-11-07 Yannick Moy <moy@adacore.com>
2000 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
2001 body that has a corresponding parameter on the subprogram
2002 declaration, define the unique entity as being the declaration
2005 2011-11-07 Ed Schonberg <schonberg@adacore.com>
2007 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
2008 return type of a function is the class-wide type of an incomplete
2009 type T, T can be a Taft-amendment type and does not have to be
2010 completed in the current private part.
2012 2011-11-07 Ed Schonberg <schonberg@adacore.com>
2014 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
2015 that are inherited by default, and apply to the class-wide type
2017 * aspects.adb (Find_Aspect): If the entity is class-wide and the
2018 aspect is inherited, use the aspect of the specific type.
2020 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
2022 * exp_alfa.adb: Remove with and use clause for
2023 Exp_Ch8. Add with and use clause for Exp_Util.
2024 Remove local constant Disable_Processing_Of_Renamings.
2025 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
2026 object renamings has been reenabled.
2027 (Expand_Possible_Renaming):
2028 The expansion of identifier and expanded names has been
2029 reenabled. Perform the substitutions only for entities that
2031 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
2032 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
2033 (Remove_Side_Effects): Alphabetize local variables. Add a guard
2034 to avoid the infinite expansion of an expression in Alfa mode. Add
2035 processing for function calls in Alfa mode.
2036 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
2038 2011-11-07 Ed Schonberg <schonberg@adacore.com>
2040 * freeze.adb (Freeze_Entity): If the entity is an access to
2041 subprogram whose designated type is itself a subprogram type,
2042 its own return type must be decorated with size information.
2044 2011-11-04 Arnaud Charlet <charlet@adacore.com>
2046 * gcc-interface/Make-lang.in: Update dependencies.
2048 2011-11-04 Robert Dewar <dewar@adacore.com>
2050 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
2051 Avoid junk semicolon after argument of machine code Asm operand.
2053 2011-11-04 Robert Dewar <dewar@adacore.com>
2055 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
2056 CodePeer mode or if restriction No_Exception_Handlers is present.
2057 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
2058 nodes in CodePeer mode or if restriction No_Exception_Handlers
2061 2011-11-04 Robert Dewar <dewar@adacore.com>
2063 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
2065 2011-11-04 Ed Schonberg <schonberg@adacore.com>
2067 * sem_ch6.adb (Analyze_Subprogram_Specification): The
2068 specification is legal if it is a function that returns an
2069 abstract type, if it comes from an attribute renaming of a stream
2070 attribute of an abstract type.
2072 2011-11-04 Gary Dismukes <dismukes@adacore.com>
2074 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
2075 components, check whether recursively check whether the prefix
2076 denotes an unaligned object.
2078 2011-11-04 Ed Schonberg <schonberg@adacore.com>
2080 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
2081 the pragma is legal if it is an expanded name that denotes a
2082 procedure that be can called without parameters.
2084 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
2086 * gnat_ugn.texi (Performance Considerations) <Vectorization
2087 of loops>: New sub-section. <Other Optimization Switches>:
2090 2011-11-04 Robert Dewar <dewar@adacore.com>
2092 * gnat_rm.texi: Minor reformatting.
2094 2011-11-04 Matthew Heaney <heaney@adacore.com>
2096 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
2097 when Target and Source denote same non-empty object
2098 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
2100 2011-11-04 Robert Dewar <dewar@adacore.com>
2102 * exp_attr.adb: Minor reformatting.
2104 2011-11-04 Ed Schonberg <schonberg@adacore.com>
2106 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
2107 discriminant assignment within an initialization proc if the
2108 record is an unchecked union, as it can only come from the
2109 initialization of an unchecked union component.
2111 2011-11-04 Robert Dewar <dewar@adacore.com>
2113 * gnat_ugn.texi: Minor reformatting.
2115 2011-11-04 Robert Dewar <dewar@adacore.com>
2117 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
2120 2011-11-04 Robert Dewar <dewar@adacore.com>
2122 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
2125 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
2127 * exp_alfa.adb: Add local constant
2128 Disable_Processing_Of_Renamings;
2129 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
2130 the name evaluation of object renamings for now.
2131 (Expand_Potential_Renaming): Do not perform the substitution
2133 * exp_util.adb (Remove_Side_Effects): Remove processing for
2134 functions with side effects in Alfa mode.
2136 2011-11-04 Gary Dismukes <dismukes@adacore.com>
2138 * bindgen.adb (Gen_Elab_Calls): In the case
2139 of the AAMP target, set elaboration entities to 1 rather than
2142 2011-11-04 Ed Schonberg <schonberg@adacore.com>
2144 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
2145 proper entities on the ancestors of a child unit that appear
2146 in a limited_with clause, follow the unit links because the
2147 units are not analyzed and scope information is incomplete.
2149 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
2151 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
2152 setting the Atomic_Sync_Required flag to detect one more case.
2153 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
2154 setting the Atomic_Sync_Required flag to exclude more cases,
2155 depending on the parent of the node to be examined.
2157 2011-11-04 Bob Duff <duff@adacore.com>
2159 * g-excact.adb: Minor: use named notation.
2161 2011-11-04 Ed Schonberg <schonberg@adacore.com>
2163 * sem_ch5.adb: Improve error messages for illegal iterators.
2165 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
2167 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
2169 (Expand_Alfa): Alphabetize cases on first choice. Add
2170 processing for object renaming declarations, identifiers and
2172 (Expand_Alfa_N_In): Remove useless return.
2173 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
2174 (Expand_Potential_Renaming): New routine.
2175 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
2176 (Expand_N_Object_Declaration): Alphabetize local variables. Move
2177 Evaluate_Name out to the top level.
2178 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
2179 * exp_util.adb (Remove_Side_Effects): Add processing for
2180 functions with side effects in Alfa mode.
2182 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
2184 * gnat_rm.texi: Add entries for
2185 restrictions No_Relative_Delay, No_Requeue_Statements and
2186 No_Stream_Optimizations.
2188 2011-11-04 Ed Schonberg <schonberg@adacore.com>
2190 * sem_ch4.adb: Set type of entity in prefixed call, for
2191 completeness in a generic context.
2193 2011-11-04 Yannick Moy <moy@adacore.com>
2195 * sem_prag.adb: Minor refactoring (renaming of a parameter).
2197 2011-11-04 Robert Dewar <dewar@adacore.com>
2199 * atree.ads: Minor reformatting.
2201 2011-11-04 Robert Dewar <dewar@adacore.com>
2203 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
2205 * exp_ch2.adb (Expand_Entity_Reference): Use
2206 Activate_Atomic_Synchronization
2207 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
2208 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
2209 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
2210 Use Activate_Atomic_Synchronization
2211 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
2213 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
2214 N_Selected_Component node
2216 2011-11-04 Robert Dewar <dewar@adacore.com>
2218 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
2220 2011-11-04 Yannick Moy <moy@adacore.com>
2222 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
2223 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
2224 In ASIS mode, no splitting of aspects between conjuncts.
2225 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
2226 expressions refer to the original aspect expressions through
2227 the Original_Node link. This is used in semantic analysis for
2228 ASIS mode, so that the original expression also gets analyzed.
2229 * sem_prag.adb (Preanalyze_TC_Args,
2230 Check_Precondition_Postcondition,
2231 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
2232 generated from a source aspect, also analyze the original aspect
2234 (Check_Expr_Is_Static_Expression): New procedure
2235 similar to existing procedure Check_Arg_Is_Static_Expression,
2236 except called on expression inside pragma.
2238 2011-11-04 Tristan Gingold <gingold@adacore.com>
2240 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
2241 Find_Project.Try_Path_Name.
2242 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
2244 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
2246 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
2248 2011-11-04 Pascal Obry <obry@adacore.com>
2250 * projects.texi: Add short description for qualifiers aggregate
2251 and aggregate library.
2253 2011-11-04 Matthew Heaney <heaney@adacore.com>
2255 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
2256 * a-cgaaso.adb: Replaced implementation with instantiation
2258 * a-cogeso.ad[sb] This is the new Ada 2012 unit
2259 Ada.Containers.Generic_Sort
2261 2011-11-04 Robert Dewar <dewar@adacore.com>
2263 * exp_ch2.adb (Expand_Entity_Reference): Do not set
2264 Atomic_Sync_Required for the case of a prefix of an attribute.
2265 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
2266 atomic synchronization
2267 (Expand_N_Indexed_Component): Ditto.
2268 (Expand_B_Selected_Component): Ditto.
2269 * sem_prag.adb (Process_Suppress_Unsuppress):
2270 Disable/Enable_Atomic_Synchronization can now occur for array
2271 types with pragma Atomic_Components.
2272 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
2273 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
2275 2011-11-04 Gary Dismukes <dismukes@adacore.com>
2277 * gnat_ugn.texi: Editorial corrections for gnattest section.
2279 2011-11-04 Robert Dewar <dewar@adacore.com>
2281 * sem_prag.adb: Minor reformatting.
2282 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
2284 * exp_ch2.adb (Expand_Entity_Reference): Only set
2285 Atomic_Sync_Required on entities that are variables. Doesn't
2286 make any sense on anything else.
2288 2011-11-04 Robert Dewar <dewar@adacore.com>
2290 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
2291 atomic sync to type case.
2292 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
2295 2011-11-04 Robert Dewar <dewar@adacore.com>
2297 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
2299 * gcc-interface/Make-lang.in: Update dependencies.
2301 2011-11-04 Robert Dewar <dewar@adacore.com>
2303 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
2306 2011-11-04 Matthew Heaney <heaney@adacore.com>
2308 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
2309 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
2310 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
2311 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
2312 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
2313 a-sulcin.ad[sb]: New files.
2315 2011-11-04 Geert Bosch <bosch@adacore.com>
2317 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
2318 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
2319 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
2320 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
2321 * gcc-interface/Makefile.in: Remove libgnala and related objects.
2323 2011-11-04 Matthew Heaney <heaney@adacore.com>
2325 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
2326 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
2327 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
2328 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
2331 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
2333 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
2334 that the type of the parameters isn't dummy in type_annotate_only mode.
2336 2011-11-04 Robert Dewar <dewar@adacore.com>
2338 * sem_ch12.adb: Minor reformatting
2340 2011-11-04 Gary Dismukes <dismukes@adacore.com>
2342 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
2343 initialize elaboration entities to zero when specs are processed.
2345 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
2346 Eric Botcazou <ebotcazou@adacore.com>
2349 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
2350 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
2352 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
2355 * gcc-interface/Makefile.in (SYMDEPS): Delete.
2356 (LIBICONV): New variable.
2357 (LIBICONV_DEP): Likewise.
2358 (LIBS): Add $(LIBICONV).
2359 (LIBDEPS): Add $(LIBICONV_DEP).
2360 (EXTRA_GNATTOOLS_OBJS): Merge into...
2361 (TOOLS_LIBS): ...this. Add $(LIBICONV).
2363 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
2365 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
2366 variable. Always create the elaboration variable, if any, as constant.
2368 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
2370 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
2371 make a packable type for fields of union types as well.
2372 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
2373 (gnat_to_gnu_component_type): Try to make a packable type for fields
2374 of union types as well.
2375 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
2376 (maybe_pad_type): Try to make a packable type for fields of union types
2378 (gnat_to_gnu_field): Likewise.
2379 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
2380 (set_rm_size): Likewise.
2381 (rm_size): Likewise.
2382 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
2383 * gcc-interface/trans.c (add_decl_expr): Likewise.
2384 * gcc-interface/utils.c (finish_record_type): Likewise.
2385 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
2387 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
2389 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
2390 declared as atomic. Move around conditionally executed code.
2392 2011-10-24 Robert Dewar <dewar@adacore.com>
2394 * sem.adb (Initialize): Fix bug that blew up if called a second time.
2396 2011-10-24 Robert Dewar <dewar@adacore.com>
2398 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
2399 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
2401 2011-10-24 Robert Dewar <dewar@adacore.com>
2403 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
2406 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2408 * gnat_rm.texi: Add an entry for restriction No_Finalization.
2410 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2412 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
2413 current instance is within the one that contains the generic,
2414 the freeze node for the current one must appear in the current
2415 declarative part. Ditto if the current instance is within another
2416 package instance. In both of these cases the freeze node of the
2417 previous instance is not relevant.
2419 2011-10-24 Gary Dismukes <dismukes@adacore.com>
2421 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
2422 of AAMP-specific switches -univ and -aamp_target.
2424 2011-10-24 Robert Dewar <dewar@adacore.com>
2426 * a-tienau.adb (Put): Deal properly with limited line length.
2428 2011-10-24 Robert Dewar <dewar@adacore.com>
2430 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
2432 2011-10-24 Tristan Gingold <gingold@adacore.com>
2434 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
2437 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2439 * sem_ch12.adb (Earlier): make available globally. If both
2440 nodes have the same sloc, the freeze node that does not come
2441 from source is the later one.
2442 (True_Parent): Make available globally.
2443 (Previous_Instance): Subsidiary of
2444 Insert_Freeze_Node_For_Instance, to check whether the generic
2445 parent of the current instance is declared within a previous
2446 instance in the same unit or declarative part, in which case the
2447 freeze nodes of both instances must appear in order to prevent
2448 elaboration problems in gigi.
2449 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
2450 freeze point, and the freeze node of a preceding instantiation
2451 must be inserted before it.
2453 2011-10-24 Robert Dewar <dewar@adacore.com>
2455 * checks.ads, checks.adb: Add handling of Synchronization_Check
2456 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
2458 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
2459 flag Minor code reorganization.
2460 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
2461 * par-prag.adb: Add dummy entries for pragma
2462 Disable/Enable_Atomic_Synchronization.
2463 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
2464 case of Atomic_Synchronization specially (not suppressed
2465 by All_Checks, cannot be set from Source).
2466 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
2467 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
2468 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
2469 entry for pragma Disable/Enable_Atomic_Synchronization
2470 * switch-c.adb: The -gnatp switch does not disable
2471 Atomic_Synchronization Add -gnatep switch to disable
2472 Atomic_Synchronization.
2473 * types.ads: Add entry for Synchronization_Check
2474 * usage.adb: Add line for -gnated switch
2475 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
2477 2011-10-24 Geert Bosch <bosch@adacore.com>
2479 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
2482 2011-10-24 Robert Dewar <dewar@adacore.com>
2484 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
2486 2011-10-24 Robert Dewar <dewar@adacore.com>
2488 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
2489 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
2491 2011-10-24 Emmanuel Briot <briot@adacore.com>
2493 * prj-proc.adb (Process_Expression_Variable_Decl): No special
2494 handling for Project_Path unless it is an attribute.
2496 2011-10-24 Javier Miranda <miranda@adacore.com>
2498 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
2499 (Install_Hidden_Primitives): New subprogram.
2500 (Restore_Hidden_Primitives): New subprogram.
2501 (Analyze_Formal_Package_Declaration,
2502 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
2503 Invoke Check_Hidden_Primitives after every call to
2504 Analyze_Associations, and invoke Restore_Hidden_Primitives to
2505 restore their visibility after processing the instantiation.
2506 (Instantiate_Package_Body): Install visible primitives before
2507 analyzing the instantiation and uninstall them to restore their
2508 visibility when the instantiation has been analyzed.
2509 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
2510 (Remove_Suffix): New subprogram
2511 * sem_ch3.adb (Derive_Subprogram): When handling
2512 a derived subprogram for the instantiation of a formal derived
2513 tagged type, inherit the dispatching attributes from the actual
2514 subprogram (not from the parent type).
2516 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
2518 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
2520 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2522 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
2524 (Build_Discriminant_Assignments): Add local variable D_Loc and update
2526 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
2527 Var_Loc and update their uses.
2528 (Build_Record_Init_Proc): Code reformatting.
2529 (Increment_Counter): Add formal parameter Loc.
2530 (Make_Counter): Add formal parameter Loc.
2532 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
2534 * sem_disp.adb (Covers_Some_Interface): Fix typo.
2536 2011-10-24 Matthew Heaney <heaney@adacore.com>
2538 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
2541 2011-10-24 Yannick Moy <moy@adacore.com>
2543 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
2544 Translate arguments in positional notation into pragma argument
2545 association arguments for the generated pragma.
2547 2011-10-24 Arnaud Charlet <charlet@adacore.com>
2549 * exp_ch5.adb: Fix minor typo.
2551 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2553 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
2554 the case of a component reference in an instance body, when the
2555 enclosing type is private.
2557 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
2559 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
2560 driver for getting the project support into gnatelim section.
2562 2011-10-24 Robert Dewar <dewar@adacore.com>
2564 * gnat_rm.texi: Minor correction to documentation on address clause.
2566 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2568 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
2569 (Attach_Unprotected): New routine.
2570 (Delete_Finalize_Address): Removed.
2571 (Delete_Finalize_Address_Unprotected): New routine.
2572 (Detach): Synchronize and call the unprotected version.
2573 (Detach_Unprotected): Remove locking.
2574 (Finalize): Add various comment on synchronization. Lock the critical
2575 region and call the unprotected versions of routines.
2576 (Finalize_Address): Removed.
2577 (Finalize_Address_Unprotected): New routine.
2578 (Set_Finalize_Address): Synchronize and call
2579 the unprotected version.
2580 (Set_Finalize_Address_Unprotected): New routine.
2581 (Set_Heterogeneous_Finalize_Address): Removed.
2582 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
2583 (Set_Is_Heterogeneous): Add comment on synchronization and
2585 * s-finmas.ads: Flag Finalization_Started is no longer atomic
2586 because synchronization uses task locking / unlocking.
2587 (Attach): Add comment on usage.
2588 (Attach_Unprotected): New routine.
2589 (Delete_Finalize_Address): Renamed to
2590 Delete_Finalize_Address_Unprotected.
2591 (Detach): Add comment on usage.
2592 (Detach_Unprotected): New routine.
2593 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
2594 (Set_Finalize_Address): Add comment on usage.
2595 (Set_Finalize_Address_Unprotected): New routine.
2596 (Set_Heterogeneous_Finalize_Address): Renamed to
2597 Set_Heterogeneous_Finalize_Address_Unprotected.
2598 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
2599 Allocation_Locked. Add various comments on synchronization. Lock
2600 the critical region and call the unprotected version of
2602 (Deallocate_Any_Controlled): Add various comments on
2603 synchronization. Lock the critical region and call the unprotected
2604 version of routines.
2606 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2608 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
2609 are universal and must carry the corresponding type.
2610 * sem_eval.adb (Check_Non_Static_Context): If the type of the
2611 expression is universal real, as may be the case for a fixed point
2612 expression with constant operands in the context of a conversion,
2613 there is nothing to check.
2614 * s-finmas.adb: Minor reformatting
2616 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
2618 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
2620 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2622 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
2623 TRACE): Reintroduce.
2624 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
2625 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
2627 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2629 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
2630 (unchecked_conversion_nop): Use it.
2631 (gnat_to_gnu): Likewise.
2633 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2635 * back_end.adb (Call_Back_End): Pass the maximum logical line number
2636 instead of the maximum physical line number to gigi.
2637 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
2639 2011-10-16 Tom Tromey <tromey@redhat.com>
2640 Dodji Seketeli <dodji@redhat.com>
2642 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
2643 public ordinary map interface.
2645 2011-10-16 Tristan Gingold <gingold@adacore.com>
2647 * link.c (_AIX): Add support for GNU ld.
2649 2011-10-16 Fedor Rybin <frybin@adacore.com>
2651 * gnat_ugn.texi: Fixing gnattest example names in the doc.
2652 Adding explanation to additional tests usage.
2654 2011-10-16 Robert Dewar <dewar@adacore.com>
2656 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
2658 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
2660 * a-convec.adb: Fix minor inconsistencies.
2662 2011-10-16 Matthew Heaney <heaney@adacore.com>
2664 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
2665 Implementation): Specify pragma Implementation_Defined.
2667 2011-10-15 Nicolas Roche <roche@adacore.com>
2669 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
2670 either rtp-smp or ravenscar-cert-rtp runtimes.
2672 2011-10-15 Bob Duff <duff@adacore.com>
2674 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2675 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
2677 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
2678 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
2680 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
2681 pool only if RE_Root_Storage_Pool_Ptr is available.
2682 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
2683 pool actual unless RE_Root_Storage_Pool_Ptr is available.
2684 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
2685 formal only if RE_Root_Storage_Pool_Ptr is available.
2687 2011-10-15 Matthew Heaney <heaney@adacore.com>
2689 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
2690 type): Specify Priority aspect for protected type.
2692 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2694 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
2695 is a generic actual, it is a subtype of a type that was frozen
2696 by the instantiation, and even if not marked frozen it does not
2697 affect the construction of the dispatch table.
2699 2011-10-14 Robert Dewar <dewar@adacore.com>
2701 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
2703 * s-rident.ads: Add missing Compiler_Unit pragma.
2705 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2707 * sem_res.adb: Minor reformatting.
2709 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2711 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2712 Code and comment reformatting. Use BIP_Task_Master
2713 when creating a _master.
2714 (BIP_Formal_Suffix): Code reformatting. Correct the case for
2716 (Make_Build_In_Place_Call_In_Object_Declaration): Use
2717 BIP_Task_Master when creating a reference to the enclosing
2718 function's _master formal.
2719 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
2721 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
2722 (Needs_BIP_Finalization_Master): Alphabetized.
2723 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
2726 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2728 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
2729 reject an aliased keyword on the object declaration of an extended
2730 return statement. In older versions of the language indicate
2731 that this is illegal in the standard.
2733 2011-10-14 Pascal Obry <obry@adacore.com>
2735 * sem_util.adb, sem_ch4.adb: Minor reformatting.
2737 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2739 * sem_ch13.adb: Recognize properly procedure calls that are
2740 transformed into code statements.
2742 2011-10-14 Vincent Celier <celier@adacore.com>
2744 * projects.texi: Minor fix in project example.
2746 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2748 * sem_util.adb: Return objects are aliased if their type is
2749 immutably limited as per AI05-0053.
2751 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2753 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
2754 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
2755 Short_Circuit_And_Or expansion code (moved to sem_res).
2756 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
2757 "and" and "or" operators as short-circuit "and then" and "or
2758 else", when pragma Short_Circuit_And_Or is active.
2760 2011-10-13 Robert Dewar <dewar@adacore.com>
2762 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
2763 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2765 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2767 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
2769 2011-10-13 Jerome Guitton <guitton@adacore.com>
2771 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
2773 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2775 * a-convec.ads (Cursor): Minor reformatting.
2776 * a-convec.adb (Next): Fix minor inconsistencies.
2777 (Previous): Likewise.
2779 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2781 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
2782 New predicate to determine whether some operations on an array
2783 type are available when the full view of its component may differ
2784 from the view of the point of the array declaration.
2785 * sem_ch4.adb (Find_Equality_Types): Use
2786 Available_Full_View_Of_Component.
2787 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2789 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2791 * sem_ch9.adb: Analyze aspects while discriminants of protected
2794 2011-10-13 Geert Bosch <bosch@adacore.com>
2796 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
2797 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
2798 longer depend on an external library.
2799 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
2800 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
2801 Update dependencies.
2802 * gcc-interface/Make-lang.in: Update dependencies.
2804 2011-10-13 Cyrille Comar <comar@adacore.com>
2806 * gnat_ugn.texi: Minor editing.
2808 2011-10-13 Vincent Celier <celier@adacore.com>
2810 * projects.texi: Add documentation on packages and attributes
2811 that are inherited from a project being extended into the
2814 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2816 * exp_ch3.adb (Build_Master): Rewritten.
2817 (Expand_N_Full_Type_Declaration): Reformat the declarative
2818 region. Update the call to Build_Master_Renaming.
2819 (Expand_Previous_Access_Type): Rewritten.
2820 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2821 Add local constant Result_Subt and update related usage.
2822 (Expand_N_Extended_Return_Statement): Add local constant
2823 Result_Subt and update related usage.
2824 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
2825 new context detection mechanism.
2826 (Build_Class_Wide_Master):
2827 Use Insert_Action to add the renaming into the tree.
2828 (Build_Master_Entity): Rewritten to use the new context detection
2830 (Build_Master_Renaming): Add formal parameter Ins_Nod
2831 and related usage. Use Insert_Action to add the renaming into the
2833 (Find_Enclosing_Context): New subsidiary routine. Rather
2834 than relying on enclosing scopes, this routine looks at the
2835 tree structure to figure out the proper context for a _master
2836 or a _chain. This approach eliminates the issues with transient
2837 scopes which have not been converted into blocks.
2838 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
2839 to better reflect the new usage. Update the related comment.
2840 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
2841 the comment on usage.
2842 * sem_ch3.adb (Access_Definition): Update the calls to
2843 Build_Master_Entity and Build_Master_Renaming.
2844 * sem_ch6.adb (Create_Extra_Formals): Add local variable
2845 Full_Subt. Code reformatting.
2846 * sem_util.adb (Is_Iterator): Alphabetized.
2847 (Is_LHS): Alphabetized.
2848 (Is_Limited_Class_Wide_Type): New routine.
2849 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
2851 2011-10-13 Geert Bosch <bosch@adacore.com>
2853 * a-ngrear.adb (Solve): Make generic and move to
2854 System.Generic_Array_Operations.
2855 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2856 New generic solvers to compute a vector resp. matrix Y such
2857 that A * Y = X, approximately.
2858 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2859 Implement using Forward_Eliminate and Back_Substitute
2860 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
2862 * a-ngcoar.ads ("abs"): Fix return type to be real.
2864 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2867 * s-linux-alpha.ads: Do not "with" Interfaces.C.
2868 * s-linux-sparc.ads: Likewise.
2870 2011-10-13 Geert Bosch <bosch@adacore.com>
2872 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
2874 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
2876 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2879 2011-10-13 Geert Bosch <bosch@adacore.com>
2881 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2882 move to System.Generic_Array_Operations.
2884 2011-10-13 Geert Bosch <bosch@adacore.com>
2886 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2887 * s-gearop.ads (L2_Norm): Change profile to be suitable for
2889 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2892 2011-10-13 Robert Dewar <dewar@adacore.com>
2894 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2895 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2896 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2897 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2898 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2899 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2901 2011-10-13 Geert Bosch <bosch@adacore.com>
2903 * s-gearop.adb: Minor comment additions.
2905 2011-10-13 Fedor Rybin <frybin@adacore.com>
2907 * gnat_ugn.texi: Add gnattest section.
2909 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2911 * freeze.adb: Do not create body of renaming if declaration has
2914 2011-10-13 Olivier Hainque <hainque@adacore.com>
2916 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2917 further, to the ppc+kernel case only.
2919 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2921 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2922 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2923 Do not create a pool formal on .NET/JVM.
2924 (Expand_N_Extended_Return_Statement): Alphabetize local
2925 variables. Do not create a renaming of the build-in-place pool
2926 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
2927 Add the user-defined pool only on non-VM targets.
2928 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2929 local variables. Do not add a pool actual on .NET/JVM.
2930 * sem_ch6.adb: Add with and use clause for Targparm.
2931 (Create_Extra_Formals): Add build-in-place pool formal only on
2933 * rtsfind.ads: Alphabetize entries.
2935 2011-10-13 Sergey Rybin <rybin@adacore.com>
2937 * gnat_ugn.texi: Minor correction.
2939 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2941 * sem_ch8.adb: Minor error message improvement.
2943 2011-10-13 Robert Dewar <dewar@adacore.com>
2945 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2947 2011-10-13 Gary Dismukes <dismukes@adacore.com>
2949 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2950 of a for loop for an enumeration type with an enumeration rep
2951 clause, which involves moving the original loop parameter into
2952 a nested block, the loop parameter's entity must be removed from
2953 the entity list of the loop scope.
2955 2011-10-13 Bob Duff <duff@adacore.com>
2957 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2958 that gets passed in the same cases where BIP_Alloc_Form is passed
2959 (caller-unknown-size results). BIP_Storage_Pool is used when
2960 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
2961 to the user-defined storage pool is passed at the call site,
2962 and this pool is used in callee to allocate the result.
2963 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2964 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2965 the additional BIP_Storage_Pool actual.
2966 (Expand_N_Extended_Return_Statement): Allocate the function
2967 result using the user-defined storage pool, if BIP_Alloc_Form =
2969 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2970 * exp_ch4.adb: Don't overwrite storage pool set by
2971 Expand_N_Extended_Return_Statement.
2972 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2973 for use in build-in-place function calls within allocators
2974 where the access type has a user-defined storage pool.
2976 2011-10-13 Sergey Rybin <rybin@adacore.com>
2978 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2981 2011-10-13 Nicolas Roche <roche@adacore.com>
2983 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2986 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2988 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2989 account that an unchecked union type can be limited.
2991 2011-10-13 Olivier Hainque <hainque@adacore.com>
2993 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2994 the use of the signal trampoline for PPC in the sjlj case as well.
2995 Add legitimate casts, preventing compile time warnings on the
2996 (sighandler *) profile.
2998 2011-10-13 Yannick Moy <moy@adacore.com>
3000 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
3003 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3005 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
3006 expressions are legal limited return values if each one of their
3007 dependent expressions are legal.
3009 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3011 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
3012 if the prefix of the call is a qualified expression, rewrite as
3014 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
3015 code statement is legal if it is a rewriting of a procedure call.
3017 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3019 * exp_aggr.adb (Flatten): If a component association has a box,
3020 assume that aggregate is not static.
3021 (Safe_Aggregate): If a component association in a non-limited
3022 aggregate has a box, assume that it cannot be expanded in place.
3024 2011-10-13 Vincent Celier <celier@adacore.com>
3026 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
3027 Process_Project_Tree_Phase_1 with Packages_To_Check.
3028 (Process_Project_And_Apply_Config): Ditto
3029 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
3030 Remove default for argument Packages_To_Check.
3031 * prj-proc.adb (Recursive_Process): New argument
3034 (Process_Project_Tree_Phase_1): Ditto.
3035 (Recursive_Project.Process_Aggregated_Projects): Call
3036 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
3038 * prj-proc.ads (Process): New argument Packages_To_Check
3039 (Process_Project_Tree_Phase_1): Ditto
3041 2011-10-13 Arnaud Charlet <charlet@adacore.com>
3043 * gcc-interface/Makefile.in: Fix typo.
3045 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3047 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
3048 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
3049 Use sloc of defining identifier of farmal type declaration,
3050 as sloc of generated internal entity, to prevent misplaced
3053 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3055 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
3056 is fully defined before checking that it is a numeric type.
3058 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3060 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
3061 association for component X has a box, then X is covered in the
3062 aggregate even if there is not default value for X in the type
3063 declaration, and X has to be default-initialized.
3065 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3067 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
3068 literals as referenced only if reference is in current source unit.
3070 2011-10-13 Matthew Heaney <heaney@adacore.com>
3072 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
3074 2011-10-13 Olivier Hainque <hainque@adacore.com>
3076 * sigtramp.h: New file. Prototype and spec of the signal
3077 trampoline to be called by an established handler to provide
3078 dwarf call frame info before the real signal processing code.
3079 * sigtramp-ppcvxw.c: New file. Implementation of the signal
3080 trampoline for ppc-vxworks.
3081 * init.c (vxworks section): Use it for ppc.
3083 2011-10-13 Thomas Quinot <quinot@adacore.com>
3085 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
3086 (Check_Future_Identifier): New subprogram,
3087 factors duplicated code from Par.Ch2.P_Identifier and
3088 Par.Ch3.P_Defining_Identifier.
3090 2011-10-13 Thomas Quinot <quinot@adacore.com>
3092 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
3093 if we fail to initialize CV attributes or CV.
3095 2011-10-13 Thomas Quinot <quinot@adacore.com>
3097 * s-tasren.adb (Timed_Selective_Wait, case
3098 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
3099 we know abortion is already deferred.
3101 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
3103 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
3104 (Build_Master_Renaming (function)): Removed.
3105 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
3106 (Expand_Full_Type_Declaration): Alphabetize
3107 variables. Reformatting of code and comments. Rewrite the
3108 section on processing of anonymous access-to-task types in
3110 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
3111 (Build_Master_Renaming): Moved to exp_ch9.
3112 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
3113 (Build_Master_Entity): Add formal parameter
3114 Use_Current. Reformatting of code and comments.
3115 (Build_Master_Renaming): Moved from exp_ch3.
3116 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
3117 exp_ch3. Update comment on usage.
3118 (Build_Master_Entity):
3119 Add formal parameter Use_Current. Update comment on usage.
3120 (Build_Master_Renaming): Moved from exp_ch3.
3121 * sem_ch3.adb (Access_Definition): Remove redundant code to
3122 create a _master and a renaming.
3124 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3126 * lib-xref.adb: Do no emit reference to overridden operation,
3127 if it is internally generated.
3129 2011-10-13 Vincent Celier <celier@adacore.com>
3131 * bindgen.adb: Remove any processing related to g-trasym
3132 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
3133 * mlib-prj.adb: Remove any processing related to g-trasym.
3135 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
3137 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
3138 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
3139 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
3140 (ADA_FLAGS_TO_PASS): Likewise.
3141 (COMMON_FLAGS_TO_PASS): New.
3142 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
3143 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
3144 (gnatlib): Use COMMON_FLAGS_TO_PASS.
3145 (ada.install-common): Likewise.
3146 (install-gnatlib): Likewise.
3147 (install-gnatlib-obj): Likewise.
3148 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
3149 (gnat-cross): Delete.
3150 (gnatboot): Likewise.
3151 (gnatboot2): Likewise.
3152 (gnatboot3): Likewise.
3153 (gnatstage1): Likewise.
3154 (gnatstage2): Likewise.
3155 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
3156 (MOST_ADAFLAGS): Likewise.
3157 (LOOSE_CFLAGS): Likewise.
3158 (gnat-cross): Likewise.
3159 (GNATLIBFLAGS): Add -W -Wall.
3160 (GNATLIBCFLAGS_FOR_C): Likewise.
3161 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
3162 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
3164 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
3166 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
3167 (push_range_check_info): Likewise.
3168 (gnat_to_gnu) <N_Code_Statement>: Likewise.
3169 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
3170 (gnat_invariant_expr): Likewise.
3171 * gcc-interface/utils.c (compute_related_constant): Likewise.
3172 (max_size): Fix handling of SAVE_EXPR.
3173 (remove_conversions): Fix formatting.
3175 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
3177 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
3178 (DECL_INDUCTION_VAR): New macro.
3179 (SET_DECL_INDUCTION_VAR): Likewise.
3180 * gcc-interface/gigi.h (convert_to_index_type): Declare.
3181 (gnat_invariant_expr): Likewise.
3182 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
3183 parameter, set DECL_LOOP_PARM_P on it.
3184 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
3185 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
3186 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
3187 (struct range_check_info_d): New type.
3188 (struct loop_info_d): Likewise.
3189 (gnu_loop_stack): New stack.
3190 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
3191 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
3192 is set, do not test DECL_RENAMED_OBJECT.
3193 (push_range_check_info): New function.
3194 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
3195 the label. Reference the label and the iteration variable from it.
3196 Build the special induction variable in the unsigned version of the
3197 size type, if it is larger than the base type. And attach it to the
3198 iteration variable if the latter isn't by-ref. In the iteration scheme
3199 case, initialize the invariant conditions in front of the loop if
3200 deemed profitable. Use gnu_loop_stack.
3201 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
3202 <N_Raise_Constraint_Error>: Always process the reason. In the range
3203 check and related cases, and if loop unswitching is enabled, compute
3204 invariant conditions and push this information onto the stack.
3205 Do not translate again the condition if it has been already translated.
3206 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
3207 DECL_LOOP_PARM_P isn't set.
3208 (convert_to_index_type): New function.
3209 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
3210 to convert the index from the base index type to sizetype.
3211 (gnat_invariant_expr): New function.
3213 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3215 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
3216 two parallel arrays to hold standard builtin declarations, and
3217 replace it with a function based interface that can support
3218 creating builtins on the fly in the future.
3219 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
3220 (gnat_to_gnu): Ditto.
3222 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
3225 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
3226 * gcc-interface/utils.c (global_context): New variable.
3227 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
3228 that are either public external or at top level. Use "No" macro.
3229 (end_subprog_body): Call decl_function_context.
3230 (rest_of_subprog_body_compilation): Likewise.
3232 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
3234 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
3235 (rest_of_subprog_body_compilation): Likewise.
3236 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
3237 test for useless conversions by means of gnat_useless_type_conversion.
3238 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
3239 (language_function): Add named_ret_val and other_ret_val.
3240 (f_named_ret_val): New macro.
3241 (f_other_ret_val): Likewise.
3242 (gigi): Call rest_of_subprog_body_compilation.
3243 (struct nrv_data): New structure.
3244 (is_nrv_p): New predicate.
3245 (prune_nrv_r): New helper function.
3246 (prune_nrv_in_block): New function.
3247 (finalize_nrv_r): New helper function.
3248 (finalize_nrv): New function.
3249 (return_value_ok_for_nrv_p): New predicate.
3250 (build_return_expr): If optimization is enabled, record candidates for
3251 the Named Return Value optimization.
3252 (build_function_stub): Call rest_of_subprog_body_compilation.
3253 (Subprogram_Body_to_gnu): If optimization is enabled and there are
3254 candidates, finalize the Named Return Value optimization.
3255 Call rest_of_subprog_body_compilation.
3256 (call_to_gnu): At the end, if a return value is needed, simplify the
3257 result before wrapping it up in a COMPOUND_EXPR.
3258 * gcc-interface/utils.c (end_subprog_body): Split into...
3259 (rest_of_subprog_body_compilation): ...this. New function.
3260 (gnat_useless_type_conversion): Likewise.
3262 2011-10-06 Thomas Quinot <quinot@adacore.com>
3264 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
3265 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
3266 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
3267 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
3268 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3269 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
3270 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
3271 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
3273 2011-10-06 Ed Schonberg <schonberg@adacore.com>
3275 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
3278 2011-10-06 Matthew Heaney <heaney@adacore.com>
3280 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
3281 (Dequeue_Only_High_Priority): Protected procedure now implemented.
3283 2011-10-06 Vincent Celier <celier@adacore.com>
3285 * g-trasym.adb: Replace old implementation with the default
3286 implementation that returns list of addresses as "0x...".
3287 * g-trasym.ads: Update the list of platforms with the full
3288 capability. Indicate that there is a default implementation
3289 for other platforms.
3290 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
3291 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
3292 is now a default implementation for all platforms without the full
3295 2011-10-06 Robert Dewar <dewar@adacore.com>
3297 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
3298 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
3299 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
3300 reorganization (use conditional expressions).
3302 2011-10-06 Robert Dewar <dewar@adacore.com>
3304 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
3305 floating divide by zero.
3307 2011-10-06 Ed Schonberg <schonberg@adacore.com>
3309 * sem_ch6.adb: Limited interfaces that are not immutably limited
3310 are OK in return statements.
3312 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
3314 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
3315 change to powerpc section.
3317 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
3319 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
3322 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3324 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
3325 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
3326 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
3328 * a-coorma.ads: Minor reformmating.
3329 * einfo.ads: Improve the comment describing the
3330 Directly_Designated_Type function.
3331 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
3333 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3336 2011-09-27 Robert Dewar <dewar@adacore.com>
3338 * a-comutr.ads: Minor reformatting.
3340 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3342 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
3343 iterators to multiway trees.
3345 2011-09-27 Yannick Moy <moy@adacore.com>
3347 * debug.adb (d.D): New option for strict Alfa mode.
3348 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
3349 permissions as strictly as possible.
3350 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
3351 Alfa mode, now, interpret ranges of base types like GNAT does; in
3352 strict mode, simply change the range of the implicit base Itype.
3353 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
3355 2011-09-27 Robert Dewar <dewar@adacore.com>
3357 * exp_ch9.adb: Minor comment fixes.
3359 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3361 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
3364 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
3366 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
3367 instead of Directly_Designated_Type in the indirect array case.
3369 2011-09-27 Robert Dewar <dewar@adacore.com>
3371 * exp_util.adb, exp_aggr.adb: Minor reformatting.
3373 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3375 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
3376 on subtype declarations.
3377 * exp_aggr.adb: Minor comment update.
3379 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
3381 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
3382 test in the N_Explicit_Dereference case. Fold double logical
3383 negation in the special loop case and conditionalize it on
3384 Variable_Ref being true.
3386 2011-09-27 Ed Schonberg <schonberg@adacore.com>
3388 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
3389 single protected object and the selector is a discriminant or an
3390 entry family, this is a non-overloaded candidate interpretation,
3391 and possible primitive operations of the type must not be
3394 2011-09-27 Arnaud Charlet <charlet@adacore.com>
3396 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
3398 2011-09-27 Pascal Obry <obry@adacore.com>
3400 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
3401 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
3402 Add dummy definitions for pthread_rwlock_t
3403 and pthread_rwlockattr_t on all POSIX platforms.
3404 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
3406 (Finalize_Lock): Likewise.
3407 (Write_Lock): Likewise.
3410 2011-09-27 Tristan Gingold <gingold@adacore.com>
3412 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
3415 2011-09-27 Pascal Obry <obry@adacore.com>
3417 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
3418 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
3419 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
3420 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
3421 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
3422 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
3423 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
3424 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
3425 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
3426 s-taprop-posix.adb: Revert previous changes.
3427 (Lock): Now a record containing the two possible lock
3428 (mutex and read/write) defined in OS_Interface.
3429 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
3431 (Initialize_Protection): Likewise.
3433 (Lock_Read_Only): Likewise.
3436 2011-09-27 Pascal Obry <obry@adacore.com>
3438 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
3439 OS_Interface.pthread_rwlock_t.
3441 2011-09-27 Robert Dewar <dewar@adacore.com>
3443 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
3444 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
3445 sem_ch5.adb, sem_util.adb: Minor reformatting.
3447 2011-09-27 Pascal Obry <obry@adacore.com>
3449 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
3450 (Finalize_Lock)[RW_Lock]: Likewise.
3451 (Write_Lock)[RW_Lock]: Likewise.
3452 (Unlock)[RW_Lock]: Likewise.
3453 (Read_Lock): Define L as RW_Lock (instead of Lock).
3454 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
3455 routine for r/w lock.
3456 (Finalize_Lock)[RW_Lock]: Likewise.
3457 (Write_Lock)[RW_Lock]: Likewise.
3458 (Unlock)[RW_Lock]: Likewise.
3459 (Read_Lock): Define L as RW_Lock (instead of Lock).
3461 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3462 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
3463 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3464 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
3465 routine for standard lock.
3466 (Finalize_Lock)[RW_Lock]: Likewise.
3467 (Write_Lock)[RW_Lock]: Likewise.
3468 (Unlock)[RW_Lock]: Likewise.
3469 (Read_Lock): Define L as RW_Lock (instead of Lock).
3470 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
3471 in the record definition.
3472 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
3473 lock for 'R' locking policy.
3474 (Initialize_Protection): Likewise.
3476 (Lock_Read_Only): Likewise.
3478 * s-taspri-posix.ads (RW_Lock): New type defined as
3479 OS_Interface.pthread_rwlock_t.
3481 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
3482 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
3483 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
3484 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
3486 2011-09-27 Pascal Obry <obry@adacore.com>
3488 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
3490 2011-09-27 Pascal Obry <obry@adacore.com>
3492 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3493 s-osinte-hpux.ads, s-osinte-irix.ads,
3494 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
3496 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
3497 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
3498 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
3499 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
3500 pthread_rwlock_destroy, pthread_rwlock_rdlock,
3501 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
3503 2011-09-27 Pascal Obry <obry@adacore.com>
3505 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
3506 (RE_Id): Add RE_Lock_Read_Only.
3507 (RE_Unit_Table): Likewise.
3508 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
3509 to lift restriction on first character. Handle now the
3510 Name_Concurrent_Readers_Locking where policy character is set to
3512 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
3514 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
3515 read only lock for function in protected object.
3516 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
3517 this routine is now used.
3519 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3521 * s-atocou-x86.adb (Decrement): Use %;.
3522 (Increment): Likewise.
3524 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3526 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
3527 dereference of the pointer to the storage area. Remove useless type
3528 conversions and factor out common code.
3530 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3532 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
3533 variable and use it throughout.
3534 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
3535 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
3536 first step. Also convert to the unpadded type as a last step.
3538 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3540 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
3541 DECL_CHAIN in comment.
3542 * gcc-interface/trans.c (gigi): Likewise.
3543 (Attribute_to_gnu): Likewise.
3544 (build_function_stub): Likewise.
3545 (gnat_to_gnu): Likewise.
3546 * gcc-interface/utils.c (create_subprog_decl): Likewise.
3547 (convert_vms_descriptor64): Likewise.
3548 (convert_vms_descriptor32): Likewise.
3550 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3552 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
3553 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
3554 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
3555 the type of the record is TYPE_READONLY.
3557 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3558 Robert Dewar <dewar@adacore.com>
3560 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
3561 OUT formal parameter which is of an null-exclusion access subtype.
3563 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3565 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
3566 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
3567 (gnat_to_gnu_param): Likewise.
3568 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
3569 maybe_unconstrained_array instead of doing the work manually.
3570 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
3571 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
3572 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
3573 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
3574 (gnat_stabilize_reference): Likewise.
3576 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3578 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
3579 (SET_TYPE_NULL_BOUNDS): Likewise.
3580 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
3581 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
3582 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
3584 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
3585 check that the initializer is a valid constant expression for use in
3586 initializing a static variable. Add missing guard.
3587 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
3588 (convert_to_fat_pointer): In the null fat pointer case, build a valid
3589 pointer for the bounds.
3590 * gcc-interface/utils2.c (compare_fat_pointers): New function.
3591 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
3593 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3595 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
3596 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
3597 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
3598 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
3599 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
3600 to the indirect case.
3601 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
3602 the TREE_THIS_NOTRAP flag.
3604 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3606 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
3607 iteration scheme, always generate the do-while form if optimization
3608 is enabled. Use more straightforward test at the end.
3610 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3612 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
3613 XNEW instead of xmalloc. Do not build useless pointer type.
3614 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
3615 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
3616 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
3618 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3620 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3621 the alignment if this doesn't prevent BLKmode access to the object.
3623 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
3625 * gcc-interface/Makefile.in (darwin): Do not issue the
3626 '-flat_namespace' linker flag during Ada build.
3627 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
3628 default shared library options.
3630 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
3632 * gcc-interface/decl.c (annotate_value): Look up expression for
3633 insertion in the cache at the end.
3635 2011-09-19 Arnaud Charlet <charlet@adacore.com>
3637 * gcc-interface/Make-lang.in: Update dependencies.
3639 2011-09-19 Steve Baird <baird@adacore.com>
3641 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
3642 configuration pragma names so that Is_Configuration_Pragma_Name
3643 will return True for Name_Annotate. Make corresponding change in
3644 Pragma_Id enumeration type. This is needed to allow an Annotate
3645 pragma to occur in a configuration pragma file (typically,
3647 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
3648 * gnat_rm.texi: Note that pragma Annotate may be used as a
3649 configuration pragma.
3651 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3653 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
3654 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
3656 2011-09-19 Yannick Moy <moy@adacore.com>
3658 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
3659 for expansion of set membership.
3660 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
3661 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
3662 visible for use in Alfa expansion.
3663 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
3664 variable in Alfa mode.
3666 2011-09-19 Thomas Quinot <quinot@adacore.com>
3668 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
3670 2011-09-19 Thomas Quinot <quinot@adacore.com>
3672 * exp_ch9.adb: Minor reformatting.
3674 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
3676 * freeze.adb (Build_Renamed_Body): Generic subprograms
3677 instantiations cannot be poperly inlined by the compiler, do
3678 not set the Body_To_Inline attribute in such cases.
3679 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
3680 inlining-related flags from the generic subprogram declaration.
3682 2011-09-19 Thomas Quinot <quinot@adacore.com>
3684 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
3685 (Build_Stub_Type): Remove, instead copy components from
3686 System.Partition_Interface.RACW_Stub_Type.
3687 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
3688 (Copy_Component_List): New subprogram.
3690 2011-09-19 Yannick Moy <moy@adacore.com>
3692 * lib-xref.adb (Generate_Reference): Ignore references to
3693 constants in Standard.
3695 2011-09-19 Robert Dewar <dewar@adacore.com>
3697 * err_vars.ads, errout.ads: Minor reformatting.
3699 2011-09-19 Robert Dewar <dewar@adacore.com>
3701 * aspects.ads (Impl_Defined_Aspects): New array
3702 * lib-writ.adb (No_Dependences): New name for No_Dependence
3703 * restrict.adb (No_Dependences): New name for No_Dependence
3704 (Check_Restriction_No_Specification_Of_Aspect): New
3706 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3707 (Restricted_Profile_Result): New variable
3708 (No_Specification_Of_Aspects): New variable
3709 (No_Specification_Of_Aspect_Warning): New variable
3710 * restrict.ads (No_Dependences): New name for No_Dependence
3711 (Check_Restriction_No_Specification_Of_Aspect): New procedure
3712 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3713 * s-rident.ads: Add restriction
3714 No_Implementation_Aspect_Specifications, this is also added to
3715 the No_Implementation_Extensions profile.
3716 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
3717 No_Implementation_Defined_Aspects
3718 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3719 * sem_prag.adb (Analyze_Aspect_Specifications): Check
3720 No_Implementation_Aspects
3721 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3722 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
3724 2011-09-19 Yannick Moy <moy@adacore.com>
3726 * lib-xref.adb (Generate_Reference): Take into account multiple
3727 renamings for Alfa refs.
3729 2011-09-19 Thomas Quinot <quinot@adacore.com>
3731 * g-socthi-mingw.adb: Minor reformatting.
3733 2011-09-19 Yannick Moy <moy@adacore.com>
3735 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
3736 expansion to False in mode Alfa
3738 2011-09-19 Pascal Obry <obry@adacore.com>
3740 * mingw32.h: Remove obsolete code needed for old versions
3743 2011-09-19 Robert Dewar <dewar@adacore.com>
3745 * errout.ads: Minor reformatting.
3747 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3749 * sem_ch6.adb (Analyze_Expression_Function): When the expression
3750 function is transformed into a declaration and a body, insert
3751 body at the end of the declarative part, to prevent premature
3752 freeze actions, and preserve original specification in the
3753 subprogram declaration.
3755 2011-09-19 Vincent Celier <celier@adacore.com>
3757 * projects.texi: Minor editing.
3759 2011-09-19 Robert Dewar <dewar@adacore.com>
3761 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
3762 exp_aggr.adb: Minor reformatting.
3764 2011-09-19 Yannick Moy <moy@adacore.com>
3766 * lib-xref.adb (Generate_Reference): Change entity referenced
3767 to underlying object if any, or else reference to the HEAP.
3769 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3771 * gcc-interface/Make-lang.in: Update dependencies.
3773 2011-09-15 Robert Dewar <dewar@adacore.com>
3775 * tree_io.ads: Minor reformatting.
3776 * a-intnam.ads: Fix bad header.
3778 2011-09-15 Thomas Quinot <quinot@adacore.com>
3780 * a-exexpr-gcc.adb: Minor reformatting.
3782 2011-09-15 Yannick Moy <moy@adacore.com>
3784 * sem_ch6.adb: Propagate information that an expression function comes
3785 from source (otherwise references to this entity are not stored).
3787 2011-09-15 Robert Dewar <dewar@adacore.com>
3789 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
3790 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
3791 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
3793 2011-09-15 Ed Schonberg <schonberg@adacore.com>
3795 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
3796 if the expression function is not a completion, create a
3797 new specification for the generated declaration, and keep the
3798 original specification in the generated body. Shorter code also
3799 ensures that proper warnings are generated for unused formals
3802 2011-09-15 Sergey Rybin <rybin@adacore.com>
3804 * tree_io.ads: Update ASIS_Version_Number because of the changes
3805 in the tree structures for expression functions.
3807 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3809 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3810 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
3811 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
3812 (CLOCK_REALTIME): Fix wrong value on some OSes.
3813 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
3815 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3817 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
3818 to unconstrained array case, deal with each branch of a COND_EXPR.
3819 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
3820 a COND_EXPR in the initializer, if present.
3822 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3824 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
3825 of an addressable type.
3826 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
3827 Deal with those cases for which creating a temporary is mandatory.
3829 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3831 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
3832 this is a real formal parameter before testing whether it is by ref.
3834 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3836 * gcc-interface/gigi.h (build_call_0_expr): Delete.
3837 (build_call_1_expr): Likewise.
3838 (build_call_2_expr): Likewise.
3839 (build_call_n_expr): New prototype.
3840 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
3841 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
3842 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3843 (Exception_Handler_to_gnu_zcx): Likewise.
3844 (gnat_to_gnu): Likewise.
3845 (build_binary_op_trapv): Likewise.
3846 * gcc-interface/utils2.c (build_call_0_expr): Delete.
3847 (build_call_1_expr): Likewise.
3848 (build_call_2_expr): Likewise.
3849 (build_call_n_expr): New function.
3850 (build_call_raise): Use build_call_n_expr.
3851 (build_call_raise_range): Likewise.
3852 (build_call_raise_column): Likewise.
3853 (build_call_alloc_dealloc_proc): Likewise.
3854 (maybe_wrap_malloc): Likewise.
3855 (maybe_wrap_free): Likewise.
3857 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3859 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
3861 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
3862 the result type is null if ENABLE_CHECKING. Set operation_type at the
3863 end unconditionally if not set in the previous cases.
3864 Use build2 and void_type_node for MODIFY_EXPR.
3865 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
3867 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
3869 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
3870 precision when converting to or from an integral type whose precision
3871 is not equal to its size.
3873 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
3875 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
3877 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
3879 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3881 * system-darwin-ppc64.ads: New file.
3883 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3885 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3888 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3890 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3891 size switches to the link phase for shared libs.
3893 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3895 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3896 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3898 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3900 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3901 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3902 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3904 (TOOLS_FLAGS_TO_PASS): New.
3905 (../stamp-tools): Reintroduce, to avoid merge conflicts.
3907 2011-09-06 Robert Dewar <dewar@adacore.com>
3909 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3910 name for Is_RM_Defined_Unit. Also several fixes to this unit.
3912 2011-09-06 Robert Dewar <dewar@adacore.com>
3914 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3915 * s-rident.ads: New restriction No_Implementation_Units
3916 (this restriction is also part of the profile
3917 No_Implementation_Extensions)
3918 * sem_ch10.adb (Analyze_With_Clause): Add check for
3919 No_Implementation_Units restriction.
3921 2011-09-06 Jerome Guitton <guitton@adacore.com>
3923 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3926 2011-09-06 Thomas Quinot <quinot@adacore.com>
3928 * s-solita.adb: Minor reformatting.
3930 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3932 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3933 is a rewriting of an expression function does not freeze previous
3936 2011-09-06 Robert Dewar <dewar@adacore.com>
3938 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3940 2011-09-06 Tristan Gingold <gingold@adacore.com>
3942 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3943 powerpc-wrs-vxworksae.
3945 2011-09-06 Thomas Quinot <quinot@adacore.com>
3947 * s-os_lib.ads (Spawn): Minor documentation clarification,
3948 Success is True for a zero exit status.
3950 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3952 * sem_ch5.adb: Add message for common iterator error.
3954 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3956 * exp_ch3.adb (Build_Initialization_Call): If the target is a
3957 selected component discriminated by a current instance, replace
3958 the constraint with a reference to the target object, regardless
3959 of whether the context is an init_proc.
3961 2011-09-06 Robert Dewar <dewar@adacore.com>
3963 * exp_attr.adb: Descriptor_Size is never static.
3965 2011-09-06 Robert Dewar <dewar@adacore.com>
3967 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3969 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3971 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3974 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3976 * sem_res.adb (Resolve): An expression that is the body of an
3977 expression function does not freeze.
3979 2011-09-06 Matthew Heaney <heaney@adacore.com>
3981 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3982 a-cuprqu.adb: Changed copyright notice to indicate current
3985 2011-09-06 Vincent Celier <celier@adacore.com>
3987 * prj.adb: Minor spelling error fix in comment
3988 * sem_res.adb: Minor reformatting
3990 2011-09-06 Pascal Obry <obry@adacore.com>
3992 * sysdep.c (winflush_nt): Removed as not needed anymore.
3993 (winflush_95): Likewise.
3994 (winflush_init): Likewise.
3995 (winflush_function): Likewise.
3996 (getc_immediate_common): Remove call to winflush_function.
3998 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4000 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
4001 processing for Descriptor_Size.
4002 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
4003 to account for its broader usage.
4004 * sem_attr.adb (Analyze_Attribute): Change the error detection
4005 circuitry for Descriptor_Size as the attribute is now applicable
4008 2011-09-06 Robert Dewar <dewar@adacore.com>
4010 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
4012 2011-09-06 Ed Schonberg <schonberg@adacore.com>
4014 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
4015 in a parameter association must not set the Referenced flag on
4017 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
4019 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4021 * gnat_rm.texi: Add a section on attribute Descriptor_Size
4023 2011-09-06 Arnaud Charlet <charlet@adacore.com>
4025 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
4026 gnatlink-re): Speed up by using -j0.
4028 2011-09-06 Yannick Moy <moy@adacore.com>
4030 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
4031 Set_Corresponding_Aspect when creating pragma from aspect.
4032 (Add_Predicates): Use new field Corresponding_Aspect.
4033 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
4034 name when present, for the purpose of issuing error messages;
4035 remove local procedure Error_Pragma_Arg_Alternate_Name.
4036 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
4038 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
4041 2011-09-06 Robert Dewar <dewar@adacore.com>
4043 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
4045 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4047 * exp_ch6.adb (Build_Heap_Allocator): Add new
4048 local variable Desig_Typ. Code and comment reformatting. Add
4049 machinery to ensure that the allocation uses a fat pointer when
4050 the type of the return object is a constrained array and the
4051 function return type is an unconstrained array.
4053 2011-09-06 Vincent Celier <celier@adacore.com>
4055 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
4056 parameters in subprograms.
4058 2011-09-06 Arnaud Charlet <charlet@adacore.com>
4060 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
4062 2011-09-06 Thomas Quinot <quinot@adacore.com>
4064 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
4065 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
4067 (System.Tasking.Primitive_Operations.Specific.Set): If argument
4068 is null, destroy task specific data, to make API consistent with
4069 other platforms, and thus compatible with the shared version
4071 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
4072 Document the above assumption.
4074 2011-09-06 Ed Schonberg <schonberg@adacore.com>
4076 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
4077 variable for type of return value when return type is
4078 unconstrained and context is an assignment.
4080 2011-09-06 Ed Schonberg <schonberg@adacore.com>
4082 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
4083 class-wide operation if expansion is not enabled.
4085 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
4087 * checks.adb (Apply_Scalar_Range_Check): Deal with access
4090 2011-09-06 Yannick Moy <moy@adacore.com>
4092 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4093 Aspect_Invariant): Do not issue error at this point on illegal
4094 pragma placement, as this is checked later on when analyzing
4095 the corresponding pragma.
4096 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
4097 similar to Error_Pragma_Arg, except the source name of the
4098 aspect/pragma to use in warnings may be equal to parameter
4099 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
4100 message to distinguish source name of pragma/aspect, and whether
4101 the illegality resides in the type being public, or being private
4102 without a public declaration
4104 2011-09-06 Thomas Quinot <quinot@adacore.com>
4106 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
4107 size check (fd_set is implemented differently on that platform).
4109 2011-09-06 Thomas Quinot <quinot@adacore.com>
4111 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
4112 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4113 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
4114 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
4115 (ATCB_Allocation): New subpackage of
4116 System.Tasking.Primitive_Operations, shared across all targets
4117 with full tasking runtime.
4118 (ATCB_Allocation.New_ATCB): Moved there (from target specific
4120 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
4121 taking care of establishing a local temporary ATCB if the one
4122 being deallocated is Self, to avoid a reference to the freed
4123 ATCB in Abort_Undefer.
4125 2011-09-06 Thomas Quinot <quinot@adacore.com>
4127 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
4128 terminated, mark it for deallocation upon termination.
4129 (Terminate_Task): Call Free_Task again if the task is marked
4130 for automatic deallocation upon termination.
4132 2011-09-06 Robert Dewar <dewar@adacore.com>
4134 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
4135 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
4136 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
4137 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
4138 a-intnam-solaris.ads, a-intnam-tru64.ads,
4139 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
4140 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
4141 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
4142 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
4143 * s-rident.ads: Add new restriction No_Implementation_Identifiers
4144 Add new profile No_Implementation_Extensions
4145 * sem_prag.adb: Implement pragma Implementation_Defined Implement
4146 profile No_Implementation_Extensions
4147 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
4148 Check violation of restriction No_Implementation_Identifiers
4149 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
4150 Add entry for Name_No_Implementation_Extensions
4152 2011-09-06 Robert Dewar <dewar@adacore.com>
4154 * impunit.ads: Minor reformatting.
4156 2011-09-06 Robert Dewar <dewar@adacore.com>
4158 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
4160 2011-09-06 Pascal Obry <obry@adacore.com>
4162 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
4165 2011-09-06 Robert Dewar <dewar@adacore.com>
4167 * g-socket.adb: Minor reformatting
4169 2011-09-06 Javier Miranda <miranda@adacore.com>
4171 * ali.adb (Scan_ALI): Add missing support to load references of
4172 entities imported from other languages.
4173 * ali.ads (Xref_Record): Adding new fields to store the language and
4174 name of an imported entity.
4175 * lib-xref.adb (Output_Import_Export_Info): Fix typo
4178 2011-09-06 Ed Schonberg <schonberg@adacore.com>
4180 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
4181 is allowed on a full type declaration if it is the completion of
4182 a private declarations.
4183 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
4184 aspect is allowed on a full type declaration in the private part
4187 2011-09-06 Robert Dewar <dewar@adacore.com>
4189 * sem_ch8.ads: Minor reformatting
4191 2011-09-06 Thomas Quinot <quinot@adacore.com>
4193 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
4194 Guard against socket values that are not in [0;FD_SETSIZE[
4196 2011-09-06 Robert Dewar <dewar@adacore.com>
4198 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
4201 2011-09-06 Arnaud Charlet <charlet@adacore.com>
4203 * s-linux-alpha.ads: Minor reformatting
4204 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
4205 Use sizeof instead of corresponding C defines in s-oscons template.
4207 2011-09-06 Vadim Godunko <godunko@adacore.com>
4209 * a-convec.ads, a-iteint.ads: Minor reformatting.
4211 2011-09-06 Vincent Celier <celier@adacore.com>
4213 * projects.texi: Add menus and @node lines.
4215 2011-09-06 Ed Schonberg <schonberg@adacore.com>
4217 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
4218 where the return type is an unconstrained array and the context
4219 is an assignment. Optimize the case when the target of the
4220 assignment is a selected component.
4222 2011-09-06 Arnaud Charlet <charlet@adacore.com>
4224 * s-solita.adb: Update comments.
4226 2011-09-06 Pascal Obry <obry@adacore.com>
4228 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
4229 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
4230 * s-oscons-tmplt.c: Add support for generating pthread related
4231 types size on GNU/Linux as done for Darwin.
4232 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
4234 2011-09-06 Robert Dewar <dewar@adacore.com>
4236 * exp_ch6.adb: Fix minor typo.
4238 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4240 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
4241 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
4242 (Double_Size_Of): Alphabetized. Update the comment on usage.
4243 (Make_Finalize_Address_Stmts): Update comments and reformat code.
4244 (Nearest_Multiple_Rounded_Up): New routine.
4245 (Size_Of): Update comment on usage. The generated expression now
4246 accounts for alignment gaps by rounding the size of the type to the
4247 nearest multiple rounded up of the type's alignment.
4249 2011-09-06 Robert Dewar <dewar@adacore.com>
4251 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
4253 2011-09-06 Steve Baird <baird@adacore.com>
4255 * exp_ch4.adb (Expand_Allocator_Expression): Look through
4256 derived subprograms in checking for presence of an
4257 Extra_Accessibility_Of_Result formal parameter.
4258 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
4259 checking for presence of an Extra_Accessibility_Of_Result formal
4261 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
4262 case where the Parameter_Associatiations attribute is already set,
4263 but set to an empty list.
4264 (Needs_Result_Accessibility_Level):
4265 Unconditionally return False. This is a temporary
4266 change, disabling the Extra_Accessibility_Of_Result
4268 (Expand_Simple_Function_Return): Check for
4269 Extra_Accessibility_Of_Result parameter's presence instead of
4270 testing Ada_Version when generating a runtime accessibility
4271 check which makes use of the parameter.
4273 2011-09-06 Ed Schonberg <schonberg@adacore.com>
4275 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
4276 expression in a given case alternative must be attached to the
4277 statement list of the ccrresponding case statement alternative
4278 They cannot be propagated ahead of the case statement, because
4279 the validity of the expression that generated the action may
4280 hold only for that alternative.
4282 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4284 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
4285 (Alignment_Of): Remove the code for strict alignment targets.
4286 (Double_Alignment_Of): Removed.
4287 (Double_Size_Of): New routine.
4288 (Make_Finalize_Address_Stmts): Change the
4289 calculation of the dope's size. Update relevant comments.
4290 (Size_Of): New routine.
4292 2011-09-06 Steve Baird <baird@adacore.com>
4294 * einfo.ads (Extra_Accessibility): Update associated comment to use
4295 the term "present" correctly ("present" just means that it is not
4296 an error to query the value of the attribute - it does not imply
4297 that the value must be non-null).
4298 (Extra_Constrained): Ditto.
4299 (Is_Visible_Formal): Ditto.
4300 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
4301 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
4302 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
4303 * exp_ch6.adb (Expand_Call): The callee may require an
4304 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
4305 < Ada_2012. This can occur if the callee is exported from a Gnat
4306 runtimes unit. Also improve a comment.
4308 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4310 * exp_ch7.adb: Add with and use clauses for Get_Targ.
4311 (Alignment_Of): Rename formal parameter Some_Typ
4312 to Typ, update related comment. Use the allocator alignment on
4313 strict alignment targets such as SPARC.
4314 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
4317 2011-09-06 Gary Dismukes <dismukes@adacore.com>
4319 * sem_ch9.adb (Check_Interfaces): Test
4320 Is_Limited_Type rather than Is_Limited_Record when checking that
4321 the partial view of a synchronized full view must be limited.
4323 2011-09-06 Emmanuel Briot <briot@adacore.com>
4325 * g-comlin.adb (Free): Fix memory leak.
4327 2011-09-06 Robert Dewar <dewar@adacore.com>
4329 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
4331 2011-09-06 Steve Baird <baird@adacore.com>
4333 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
4334 (Ada2012) cases described in AI05-0234 where the accessibility
4335 level of a function result is "determined by the point of
4336 call", an implicit parameter representing that accessibility
4337 level is passed in. Extra_Accessibilty_Of_Result yields this
4338 additional formal parameter. Extra_Accessibility_Of_Result
4339 is analogous to the existing Extra_Accessibility
4340 function used in the implementation of access parameters.
4341 (Set_Extra_Accessibility_Of_Result): New procedure; sets
4342 Extra_Accessibility_Of_Result attribute.
4343 * einfo.adb (Extra_Accessibility_Of_Result): New function.
4344 (Set_Extra_Accessibility_Of_Result): New procedure.
4345 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
4346 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
4347 an accessibility level literal to Natural; introduce a nested
4348 function, Make_Level_Literal, to do this.
4349 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
4350 determines whether a given function (or access-to-function
4351 type) needs to have an implicitly-declared accessibility-level
4352 parameter added to its profile.
4353 (Add_Extra_Actual_To_Call): Export an existing procedure which was
4354 previously declared in the body of Exp_Ch6.
4355 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
4357 (Has_Unconstrained_Access_Discriminants): New Function; a
4358 predicate on subtype entities which returns True if the given
4359 subtype is unconstrained and has one or more access discriminants.
4360 (Expand_Call): When expanding a call to a function which takes an
4361 Extra_Accessibility_Of_Result parameter, pass in the appropriate
4362 actual parameter value. In the case of a function call which is
4363 used to initialize an allocator, this may not be possible because
4364 the Etype of the allocator may not have been set yet. In this
4365 case, we defer passing in the parameter and handle it later in
4366 Expand_Allocator_Expression.
4367 (Expand_Simple_Function_Return): When returning from a function which
4368 returns an unconstrained subtype having at least one access
4369 discriminant, generate the accessibility check needed to ensure that
4370 the function result will not outlive any objects designated by its
4372 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
4374 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
4375 is used to initialize an allocator, we may need to pass in "the
4376 accessibility level determined by the point of call" (AI05-0234)
4377 to the function. Expand_Call, where such actual parameters are
4378 usually generated, is too early in this case because the Etype of
4379 the allocator (which is used in determining the level to be passed
4380 in) may not have been set yet when Expand_Call executes. Instead,
4381 we generate code to pass in the appropriate actual parameter
4382 in Expand_Allocator_Expression.
4383 * sem_ch6.adb (Create_Extra_Formals): Create
4384 the new Extra_Accessibility_Of_Result formal if
4385 Needs_Result_Accessibility_Level returns True. This includes the
4386 introduction of a nested procedure, Check_Against_Result_Level.
4388 2011-09-06 Arnaud Charlet <charlet@adacore.com>
4390 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
4393 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4395 * s-finmas.adb (Set_Finalize_Address): Explain the reason
4396 for the synchronization. Move the test for null from
4397 s-stposu.Allocate_Any_Controlled to this routine since the check
4398 needs to be protected too.
4399 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
4400 synchronization code.
4401 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
4402 explaining the context in which this routine is used.
4403 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
4404 to s-finmas.Set_Finalize_Address.
4406 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4408 * einfo.ads: Document that itypes have no parent field.
4410 2011-09-05 Robert Dewar <dewar@adacore.com>
4412 * rtsfind.adb (Check_CRT): Check for overloaded entity
4413 * rtsfind.ads: Document that entities to be found by rtsfind
4414 cannot be overloaded
4415 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
4416 (Lock_Entries_With_Status): New name for Lock_Entries with two
4417 arguments (changed to meet rtsfind no overloading rule).
4419 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4421 * s-finmas.adb (Set_Finalize_Address (Address,
4422 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4423 (Set_Finalize_Address (in out Finalization_Master,
4424 Finalize_Address_Ptr): Add synchronization code.
4425 * s-finmas.ads (Set_Finalize_Address (Address,
4426 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4427 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
4428 Set_Finalize_Address for the heterogeneous case.
4430 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4432 * sem_ch3.adb: Undo previous change, not suitable after all.
4434 2011-09-05 Robert Dewar <dewar@adacore.com>
4436 * einfo.ads: Minor comment clarification.
4438 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4440 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
4441 no longer needs to search through the entities of the return
4442 statement scope to find the _chain.
4443 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
4444 (Analyze_Block_Statement): Add local variable
4445 Is_BIP_Return_Statement. Add machinery to install all entities
4446 produced by the expansion of the return object declaration.
4447 (Install_Return_Entities): New routine.
4448 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
4450 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4452 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
4453 of subunit is incomplete.
4454 (Analyze_Proper_Body): If parent spec is not available, do not
4457 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4459 * sem_disp.adb (Find_Controlling_Arg): Add checks for
4460 interface type conversions, that are expanded into dereferences.
4462 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4464 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4465 Examine the parameter and return profile of a subprogram and swap
4466 any incomplete types coming from a limited context with their
4467 corresponding non-limited views.
4468 (Exchange_Limited_Views): New routine.
4470 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4472 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
4473 of internal entity to the subtype declaration, so that when
4474 entities are subsequently exchanged in a package body, the tree
4475 remains properly formatted for ASIS.
4477 2011-09-05 Johannes Kanig <kanig@adacore.com>
4479 * g-comlin.adb (Set_Usage): Additional optional argument to set help
4481 (Display_Help): display the user given help message, if available.
4483 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4485 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
4486 is legal if the original node is an identifier that is a
4487 parameterless function call.
4489 2011-09-05 Pascal Obry <obry@adacore.com>
4491 * prj-nmsc.adb: Minor reformatting.
4492 Add support for standalone aggregate library.
4493 (Check_Stand_Alone_Library): Handle standalone aggregate library.
4494 * projects.texi: Fix documentation for aggregate library projects.
4496 2011-09-05 Robert Dewar <dewar@adacore.com>
4498 * sem_ch6.adb: Minor reformatting.
4500 2011-09-05 Matthew Gingell <gingell@adacore.com>
4502 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
4503 stack guard page on PPC Linux. This patch ensures the 64K guard page at
4504 the bottom of the stack is not overwritten.
4506 2011-09-05 Thomas Quinot <quinot@adacore.com>
4508 * exp_intr.adb, s-tasini.adb: Minor reformatting.
4510 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4512 * sem_ch3.adb (Access_Definition): If an access type declaration
4513 appears in a child unit, the scope of whatever anonymous type
4514 may be generated is the child unit itself.
4516 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4518 * sem_ch6.adb (Analyze_Expression_Function): Do not set
4519 Comes_From_Source on rewritten body.
4520 (Analyze_Subprogram_Body_Helper): Check that the original node for
4521 the body comes from source, when determining whether expansion
4522 of a protected operation is needed.
4524 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4526 * exp_aggr.adb (Replace_Type): If the target of the assignment is
4527 a selected component and the right-hand side is a self-referential
4528 access, the proper prefix of the rewritten attribute is a copy
4529 of the left-hand side, not of its prefix.
4531 2011-09-05 Robert Dewar <dewar@adacore.com>
4533 * sem_ch5.adb: Minor reformatting.
4534 * sem_ch3.adb: Minor code clean up.
4536 2011-09-05 Jose Ruiz <ruiz@adacore.com>
4538 * exp_ch9.adb (Make_Initialize_Protection): The fact that
4539 restriction No_Dynamic_Attachment is in effect or not should
4540 not influence the default priority associated to a protected
4541 object. With this change, when the restriction is in effect (as
4542 is the case for the Ravenscar profile) the default priority of
4543 a protected object with an interrupt handler is in the range of
4544 interrupt priorities (Default_Interrupt_Priority) as required
4547 2011-09-05 Arnaud Charlet <charlet@adacore.com>
4549 * a-iteint.ads: Fix header.
4551 2011-09-05 Vincent Celier <celier@adacore.com>
4553 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
4554 with a directory separator to avoid output such as:
4555 "/path/to/objauto.cgpr" has been deleted.
4557 2011-09-05 Robert Dewar <dewar@adacore.com>
4559 * sem_ch3.adb: Minor reformatting.
4561 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4563 * sem_ch5.adb: Better error message.
4565 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4567 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
4568 (Expand_Array_Aggregate): Detect a special case of an aggregate
4569 which contains tasks in the context of an unexpanded return
4570 statement of a build-in-place function.
4571 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
4572 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
4573 which contains tasks and expand it now that the original simple
4574 return statement has been rewritten.
4575 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
4576 reformatting. Do not create a chain for an extended return
4577 statement if one is already available.
4578 (Has_Activation_Chain): New routine.
4580 2011-09-05 Marc Sango <sango@adacore.com>
4582 * sem_ch3.adb (Analyze_Object_Declaration): Remove
4583 the wrong test and add the correct test to detect the violation
4584 of illegal use of unconstrained string type in SPARK mode.
4586 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4588 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
4589 message on an iterator over an array.
4591 2011-09-05 Robert Dewar <dewar@adacore.com>
4593 * lib-xref-alfa.adb: Minor reformatting.
4595 2011-09-05 Robert Dewar <dewar@adacore.com>
4597 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
4598 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
4600 2011-09-05 Gary Dismukes <dismukes@adacore.com>
4602 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
4604 2011-09-05 Johannes Kanig <kanig@adacore.com>
4606 * lib-xref-alfa.adb: Update comments.
4608 2011-09-05 Thomas Quinot <quinot@adacore.com>
4610 * sem_res.adb: Minor reformatting
4612 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4614 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
4615 present, create them now. Needed in case the return type was
4616 a limited view in the function declaration.
4617 (Make_Build_In_Place_Call_In_Allocator): If return type contains
4618 tasks, build the activation chain for it. Pass a reference to
4619 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
4620 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
4621 with build_in_place calls.
4622 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
4623 incomplete, inatialize its Corresponding_Record_Type component.
4624 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
4627 2011-09-05 Johannes Kanig <kanig@adacore.com>
4629 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
4632 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4634 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
4635 appears within a package specification and the token after "IS"
4636 is not a parenthesis, assume that this is an unparenthesized
4637 expression function, even if the token appears in a line by
4639 * par.adb: Clarify use of Labl field of scope stack in error
4642 2011-09-05 Bob Duff <duff@adacore.com>
4644 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
4645 conversions instead of normal type conversions in all cases where a
4646 type conversion would be illegal. In particular, use unchecked
4647 conversions when the operand types are private.
4649 2011-09-05 Johannes Kanig <kanig@adacore.com>
4651 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
4652 objects of task type or protected type.
4654 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4656 * sem_ch6.adb (Analyze_Expression_Function): If the expression
4657 function comes from source, indicate that so does its rewriting,
4658 so it is compatible with any subsequent expansion of the
4659 subprogram body (e.g. when it is a protected operation).
4660 * sem_ch4.adb: minor reformatting
4662 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4664 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
4665 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
4666 may lead to wrong ancestor package in the case of instantiated subunit
4667 bodies. If a subunit is instantiated, follow the chain of instantiations
4668 rather than the stub structure.
4670 2011-09-02 Robert Dewar <dewar@adacore.com>
4672 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
4673 * gcc-interface/Make-lang.in: Update dependencies.
4675 2011-09-02 Marc Sango <sango@adacore.com>
4677 * sem_ch3.adb (Analyze_Object_Declaration): Change
4678 comment and add additional check to differentiate constant of
4679 type string from others unconstrained type.
4681 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4683 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
4684 present in incomplete type declarations to refine the error
4685 message the full declaration is in the same unit.
4686 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
4687 an incomplete type, set the Premature_Use for additional message.
4688 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
4689 and Premature_Use is set, place additional information at the
4690 point of premature use.
4692 2011-09-02 Bob Duff <duff@adacore.com>
4694 * sem_ch6.adb: (Check_Post_State): Suppress warning
4695 "postcondition refers only to pre-state" when the expression has not
4696 yet been analyzed, because it causes false alarms. This can happen when
4697 the postcondition contains a quantified expression, because those are
4698 analyzed later. This is a temporary/partial fix.
4699 (Process_Post_Conditions): Minor: change wording of warning.
4701 2011-09-02 Marc Sango <sango@adacore.com>
4703 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
4704 illegal use of unconstrained string type in SPARK mode.
4705 * sem_res.adb (Analyze_Operator_Symbol): Set the
4706 right place where the string operand of concatenation should be
4707 violate in SPARK mode.
4709 2011-09-02 Robert Dewar <dewar@adacore.com>
4711 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
4712 exp_ch3.adb: Minor reformatting.
4714 2011-09-02 Vincent Celier <celier@adacore.com>
4716 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
4717 as the compiler driver so Is_Compilable returns True for sources.
4718 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
4721 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4723 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
4724 condition, a reference to a controlling formal must be interpreted
4725 as having the class-wide type (or an access to such) so that the
4726 inherited condition can be properly applied to any overriding
4727 operation (see ARM12 6.6.1 (7)).
4729 2011-09-02 Tristan Gingold <gingold@adacore.com>
4731 * init.c (__gnat_is_vms_v7): Fix case and add prototype
4734 2011-09-02 Javier Miranda <miranda@adacore.com>
4736 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
4737 initializing expression of a class-wide interface object declaration
4738 if its type is limited.
4740 2011-09-02 Johannes Kanig <kanig@adacore.com>
4742 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
4743 literals, take into account the type name; the type is *not*
4744 the scope for an enumeration literal.
4746 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4748 * sem_ch6.adb (Check_Overriding_Indicator): add special check
4749 to reject an overriding indicator on a user-defined Adjust
4750 subprogram for a limited controlled type.
4752 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4754 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
4755 for an actual that is a function call returning an unconstrained
4756 limited controlled type.
4758 2011-09-02 Tristan Gingold <gingold@adacore.com>
4760 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
4762 2011-09-02 Johannes Kanig <kanig@adacore.com>
4764 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
4765 from "HEAP" to __HEAP Change comment that refers to that variable
4766 * put_alfa.adb: Change comment that refers to that variable
4768 2011-09-02 Robert Dewar <dewar@adacore.com>
4770 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
4772 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4774 * exp_util.adb (Extract_Renamed_Object): Renamed to
4775 Find_Renamed_Object. This routine has been reimplemented and now uses
4776 tree traversal to locate a renamed object.
4777 (Is_Aliased): Replace call to Extract_Renamed_Object with
4778 Find_Renamed_Object.
4780 2011-09-02 Tristan Gingold <gingold@adacore.com>
4782 * init.c: (__gnat_is_vms_v7): New function.
4784 2011-09-02 Olivier Hainque <hainque@adacore.com>
4786 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
4787 that have a misaligned backchain, necessarily bogus.
4789 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4791 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
4792 TSS routine Finalize_Address when compiling in Alfa mode.
4793 (Expand_Freeze_Record_Type): Do not create TSS routine
4794 Finalize_Address when compiling in Alfa mode.
4795 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
4796 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
4798 (Expand_N_Allocator): Do not produce a call to
4799 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
4800 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
4801 produce a call to primitive Set_Finalize_Address in Alfa mode because
4802 Finalize_Address is not built.
4803 * exp_ch7.adb (Build_Finalization_Master): Do not create
4804 finalization masters in Afa mode since they are not needed.
4805 (Build_Finalizer): Do not create scope and library-level
4806 finalizers in Alfa mode since they are not needed.
4807 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
4808 "new" and "free" when applied to controlled objects in Alfa mode since
4811 2011-09-02 Vincent Celier <celier@adacore.com>
4813 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
4814 only library names with the syntax of Ada identifiers, to avoid errors
4815 when compiling the binder generated files.
4816 * projects.texi: Document restriction on SAL library names
4818 2011-09-02 Thomas Quinot <quinot@adacore.com>
4820 * a-chtgbo.adb: Minor comment fix.
4822 2011-09-02 Robert Dewar <dewar@adacore.com>
4824 * lib-xref.adb: Minor reformatting
4826 2011-09-02 Vincent Celier <celier@adacore.com>
4828 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
4829 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
4830 --version and --help in usage.
4831 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
4833 2011-09-02 Bob Duff <duff@adacore.com>
4835 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
4836 compilers don't understand it.
4838 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4840 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
4841 underlying subtype rather than its base type on the call to
4842 Build_Record_Or_Elementary_Input_Function, so that any
4843 constraints on a discriminated subtype will be available for
4844 doing the check required by AI05-0192.
4845 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4846 If the prefix subtype of the 'Input attribute is a constrained
4847 discriminated subtype, then check each constrained discriminant value
4848 against the corresponding value read from the stream.
4850 2011-09-02 Yannick Moy <moy@adacore.com>
4852 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
4853 warnings on suspicious contracts, and enable them with -gnatwa.
4855 2011-09-02 Robert Dewar <dewar@adacore.com>
4857 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
4860 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4862 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
4863 which ensure that restriction No_Dynamic_Attachment has not been
4865 (Make_Initialize_Protection): Protected types with attach or
4866 interrupt handlers must not violate restriction No_Dynamic_Attachment.
4867 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
4868 which ensures that restriction No_Dynamic_Attachment has not been
4870 * sem_attr.adb: (Eval_Attribute): Transform
4871 VAX_Float_Type'First and 'Last into references to
4872 the temporaries which store the corresponding bounds. The
4873 transformation is needed since the back end cannot evaluate
4874 'First and 'Last on VAX.
4875 (Is_VAX_Float): New routine.
4877 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4879 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4880 generic unit is not intrinsic and has an explicit convention,
4881 the instance inherits it.
4883 2011-09-02 Robert Dewar <dewar@adacore.com>
4885 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4886 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4888 2011-09-02 Thomas Quinot <quinot@adacore.com>
4890 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4891 Guard against a prefix that is an N_Has_Entity but has no
4894 2011-09-02 Yannick Moy <moy@adacore.com>
4896 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4899 2011-09-02 Yannick Moy <moy@adacore.com>
4901 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4902 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4904 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4905 procedure looking for suspicious postconditions.
4906 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4907 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4908 options -gnatw.t and -gnatw.T.
4910 2011-09-02 Pascal Obry <obry@adacore.com>
4912 * prj.adb: Minor code refactoring. Move check for null project in
4914 * projects.texi: Fix minor typos.
4916 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4918 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4919 of iteration is an expression, its value must be captured in a
4920 renaming declaration, so that modification of the elements is
4921 propagated to the original container.
4923 2011-09-02 Pascal Obry <obry@adacore.com>
4925 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4926 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4927 prj-tree.adb: Minor reformatting and style fixes.
4929 2011-09-02 Robert Dewar <dewar@adacore.com>
4931 * s-rident.ads: Add new restriction No_Implicit_Aliasing
4932 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4933 No_Implicit_Aliasing
4934 (Analyze_Attribute, case Address): ditto
4935 (Analyze_Attribute, case Unrestricted_Access): ditto
4936 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4937 No_Implicit_Aliasing restriction.
4938 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4940 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4942 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4943 is an unchecked conversion, apply test to its expression.
4945 2011-09-02 Javier Miranda <miranda@adacore.com>
4947 * sem_ch3.adb (Check_Abstract_Overriding): When
4948 traversing the chain of aliased subprograms avoid reporting a
4949 redundant error on the current entity.
4951 2011-09-02 Sergey Rybin <rybin@adacore.com>
4953 * gnat_ugn.texi: Minor clean up.
4955 2011-09-02 Bob Duff <duff@adacore.com>
4957 * s-htable.adb (Set_If_Not_Present): Use renaming
4958 instead of ":=", because the type Key is limited in the generic (even
4959 if not in the instances).
4961 2011-09-02 Robert Dewar <dewar@adacore.com>
4963 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4964 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4967 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4969 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4970 inherited component with the enclosing derived type. Code reformatting.
4972 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4974 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4975 return done when overflow checks are enabled, since comparisons against
4976 Lor and Hir should not be done when OK1 is False.
4978 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4980 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4981 Add new formal Master_Exp. When present, add that expression to the
4982 call as an extra actual.
4983 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4984 Fmaster_Actual and in the case of a BIP call initializing a return
4985 object of an enclosing BIP function set it to a
4986 new reference to the implicit finalization master
4987 formal of the enclosing function. Fmaster_Actual is
4988 then passed to the new formal Master_Exp on the call to
4989 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4990 initializations of Enclosing_Func to its declaration.
4992 2011-09-02 Thomas Quinot <quinot@adacore.com>
4994 * csets.ads: Minor reformatting
4996 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4998 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4999 the full view of a private type coming from an instantiation.
5000 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
5001 loop to iterate over the declarations rather than use the
5002 First_Entity / Next_Entity scheme.
5004 2011-09-02 Ed Schonberg <schonberg@adacore.com>
5006 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
5007 X'range (N) into X'First (N) .. X'Last (N), do not share the
5008 dimension indicator N, if present. Even though it is a static
5009 constant, its source location may be modified when printing
5010 expanded code under -gnatDL, and node sharing will lead to chaos
5011 in Sprint on large files, by generating a sloc value that does
5012 not correspond to any source file.
5014 2011-09-02 Bob Duff <duff@adacore.com>
5016 * einfo.adb: (Has_Xref_Entry): Do not call
5017 Implementation_Base_Type. Lib.Xref has been
5018 rewritten to avoid the need for it, and it was costly.
5019 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
5020 functions in support of efficient xref.
5021 * lib-xref-alfa.adb: Misc changes related to Key component of
5023 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
5024 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
5025 no longer does. This is the one place where it is needed.
5027 2011-09-02 Johannes Kanig <kanig@adacore.com>
5029 * g-comlin.adb (Getopt): New optional argument Concatenate to have
5030 similar interface as the other Getopt function.
5032 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
5034 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
5035 a call to Set_Finalize_Address if there is no allocator available.
5036 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
5037 a case of allocator expansion where the allocator is not expanded but
5038 needs a custom allocate routine. Code reformatting.
5039 (Is_Finalizable_Transient): Remove local variables Has_Rens and
5040 Ren_Obj. Code reformatting.
5041 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
5042 through the use of 'reference.
5043 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
5044 as part of build-in-place expansion. They are intentionally marked as
5045 coming from source, but their parents are not.
5047 2011-09-02 Ed Schonberg <schonberg@adacore.com>
5049 * sem_ch10.adb (Analyze_With_Clause): If the library unit
5050 is the generated subprogram declaration for a child unit body
5051 that acts as spec, use the original body in the with_clause,
5052 to prevent binding errors.
5054 2011-09-02 Vincent Celier <celier@adacore.com>
5056 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
5057 qualifier /MULTI_UNIT_INDEX=
5059 2011-09-02 Johannes Kanig <kanig@adacore.com>
5061 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
5062 instead of calling the callback function
5064 2011-09-02 Robert Dewar <dewar@adacore.com>
5066 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
5067 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
5069 2011-09-02 Vincent Celier <celier@adacore.com>
5071 * prj-nmsc.adb: (Find_Sources): When the list of sources is
5072 explicitly declared in an extending project, do not warn if a source
5073 for an inherited naming exception is not found.
5075 2011-09-02 Gary Dismukes <dismukes@adacore.com>
5077 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
5078 expansion is inactive.
5080 2011-09-02 Ed Schonberg <schonberg@adacore.com>
5082 * sem_util.adb (Note_Possible_Modification): If the entity
5083 being modified is the renaming generated for an Ada2012 iterator
5084 element, the enclosing container or array is modified as well.
5086 2011-09-02 Jose Ruiz <ruiz@adacore.com>
5088 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
5089 Initialize): Define and initialize the
5090 mutex attributes and condition variable attributes locally.
5092 2011-09-02 Vincent Celier <celier@adacore.com>
5094 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
5095 exception replaced in an extending project.
5096 (Check_Object): No error when the other source is locally removed.
5098 2011-09-02 Yannick Moy <moy@adacore.com>
5100 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
5103 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5105 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
5107 * gcc-interface/Make-lang.in: Update dependencies.
5109 2011-09-01 Robert Dewar <dewar@adacore.com>
5111 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
5113 2011-09-01 Jose Ruiz <ruiz@adacore.com>
5115 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
5116 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
5117 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
5118 specific for systems where their glibc version does not define the
5119 routines to handle dynamically allocated CPU sets.
5121 2011-09-01 Vincent Celier <celier@adacore.com>
5123 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
5124 prj-env.adb: Implement inheritance of naming exceptions in extending
5127 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
5129 * gnatls.adb: Display simple message instead of content of
5132 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5134 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
5135 access discriminant and anonymous access component scopes.
5136 (Inherit_Component): Reuse the itype of an access discriminant
5137 or anonymous access component by copying it in order to set the proper
5138 scope. This is done only when the parent and the derived type
5139 are in different scopes.
5140 (Set_Anonymous_Etype): New routine.
5142 2011-09-01 Robert Dewar <dewar@adacore.com>
5144 * a-convec.adb: Minor reformatting throughout.
5146 2011-09-01 Jose Ruiz <ruiz@adacore.com>
5148 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
5149 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
5150 CPU_ALLOC_SIZE and CPU_FREE linux macros.
5151 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
5152 CPU_SET_S respectively because we are now using dynamically allocated
5153 CPU sets which are more portable across different glibc versions.
5154 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
5155 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
5156 masks dynamically according to the number of processors in the target
5158 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
5159 respectively, so we need to pass the size of the masks as
5161 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
5162 created cpu_set_t masks
5163 with the number of processors available in the target platform,
5164 instead of static bit arrays. It enhances portability because
5165 it uses the information from the target platform.
5166 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
5167 are using a restricted run-time library, use the flag
5168 Configurable_Run_Time_Mode instead of Restricted_Profile.
5170 2011-09-01 Vincent Celier <celier@adacore.com>
5172 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
5173 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
5175 2011-09-01 Nicolas Roche <roche@adacore.com>
5177 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
5178 on VxWorks in kernel mode.
5180 2011-09-01 Jose Ruiz <ruiz@adacore.com>
5182 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
5183 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
5184 directly the bit array.
5185 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
5186 the linux macros with the same name.
5187 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
5188 wrappers around the CPU_ZERO and CPU_SET linux macros.
5190 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5192 * exp_ch7.adb (Find_Insertion_List): Removed.
5193 (Process_Transient_Objects): Insert the declarations of the hook
5194 access type and the hook object before the associated transient object.
5196 2011-09-01 Jose Ruiz <ruiz@adacore.com>
5198 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
5199 package System.Aux_Dec when using restricted run-time libraries which
5200 do not have this package.
5202 2011-09-01 Tristan Gingold <gingold@adacore.com>
5204 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
5206 2011-09-01 Bob Duff <duff@adacore.com>
5208 * sem_attr.adb (Analyze_Access_Attribute): Do not call
5209 Kill_Current_Values for P'Unrestricted_Access, where P is library level
5211 2011-09-01 Thomas Quinot <quinot@adacore.com>
5213 * exp_ch5.adb: Minor reformatting
5214 * gnat_ugn.texi: Fix minor typos.
5215 * gcc-interface/Make-lang.in: Update dependencies.
5217 2011-09-01 Robert Dewar <dewar@adacore.com>
5219 * inline.adb, sem_aggr.adb: Minor reformatting.
5221 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5223 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
5225 2011-09-01 Robert Dewar <dewar@adacore.com>
5227 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
5229 2011-09-01 Bob Duff <duff@adacore.com>
5231 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
5232 body" the same as "in inlined body", because visibility shouldn't
5235 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
5237 * inline.adb (Add_Inlined_Body): Refine previous change.
5239 2011-09-01 Gary Dismukes <dismukes@adacore.com>
5241 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
5242 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5243 Test for case where call
5244 initializes an object of a return statement before testing for
5245 a constrained call, to ensure that all such cases get handled
5246 by simply passing on the caller's parameters. Also, in that
5247 case call Needs_BIP_Alloc_Form to determine whether to pass on
5248 the BIP_Alloc_Form parameter of the enclosing function rather
5249 than testing Is_Constrained. Add similar tests for the return
5250 of a BIP call to later processing to ensure consistent handling.
5251 (Needs_BIP_Alloc_Form): New utility function.
5252 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
5253 a BIP_Alloc_Form formal with call to new utility function
5254 Needs_BIP_Alloc_Form.
5256 2011-09-01 Pascal Obry <obry@adacore.com>
5258 * prj-part.adb: Minor reformatting.
5260 2011-09-01 Vincent Celier <celier@adacore.com>
5262 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
5263 half character in the unit name.
5265 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5267 * exp_ch4.adb: Minor code and comment reformatting.
5269 2011-09-01 Thomas Quinot <quinot@adacore.com>
5271 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
5272 for Is_Limited_Type and Is_Tagged_Type in condition checking
5273 for by-reference type.
5274 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
5275 subprograms may have a completion because of a previous
5276 Inline_Always clause, but the enclosing package must be marked
5277 inlined for the subprogram body to become visible to the backend.
5279 2011-09-01 Thomas Quinot <quinot@adacore.com>
5281 * sem_aux.adb, exp_ch4.adb: Minor reformatting
5283 2011-09-01 Pascal Obry <obry@adacore.com>
5285 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
5287 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5289 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
5290 the formals of a subprogram stub that acts as a spec.
5292 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5294 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
5295 type, declare a renaming for it, not an object declaration.
5297 2011-09-01 Yannick Moy <moy@adacore.com>
5299 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
5300 Ignore_Errors to ignore failures to read ALI files when True.
5302 2011-09-01 Javier Miranda <miranda@adacore.com>
5304 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
5305 constructor calls associated with non-tagged record types.
5307 2011-09-01 Robert Dewar <dewar@adacore.com>
5309 * g-socthi-vms.adb: Minor reformatting.
5311 2011-09-01 Nicolas Roche <roche@adacore.com>
5313 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
5314 in order to avoid impact of imcompatible changes.
5315 * cstreams.c: Likewise
5317 * aux-io.c: Likewise
5319 2011-09-01 Yannick Moy <moy@adacore.com>
5321 * lib-writ.adb (Write_With_Lines): Always output complete information
5322 on "with" line in Alfa mode, as this is required by formal verification
5325 2011-09-01 Tristan Gingold <gingold@adacore.com>
5327 * g-socthi-vms.adb: Add comments.
5329 2011-09-01 Pascal Obry <obry@adacore.com>
5331 * prj.ads: Minor reformatting.
5333 2011-09-01 Vincent Celier <celier@adacore.com>
5335 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
5336 exceptions in the config pragmas file.
5338 2011-09-01 Tristan Gingold <gingold@adacore.com>
5340 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
5342 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5344 * exp_ch7.adb (Find_Insertion_List): New routine.
5345 (Process_Transient_Objects): Add code to handle the abnormal
5346 finalization of a controlled transient associated with a subprogram
5347 call. Since transients are cleaned up right after the associated
5348 context, an exception raised during a subprogram call may bypass the
5351 2011-09-01 Robert Dewar <dewar@adacore.com>
5353 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
5356 2011-09-01 Robert Dewar <dewar@adacore.com>
5358 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
5360 2011-09-01 Robert Dewar <dewar@adacore.com>
5362 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
5364 2011-09-01 Thomas Quinot <quinot@adacore.com>
5366 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
5367 GNATRTL_NONTASKING_OBJS.
5369 2011-09-01 Robert Dewar <dewar@adacore.com>
5371 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
5372 possibility of this flag being set for formals in Ada 2012 mode.
5373 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
5375 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
5377 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
5379 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
5382 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5384 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
5385 insertion node in a tree of nested Expression_With_Actions nodes.
5386 (Process_Transient_Object): In the case where a complex if statement
5387 has been converted into nested Expression_With_Actions nodes, the
5388 "hook" object and the associated access type must be inserted before
5389 the top most Expression_With_Actions.
5391 2011-09-01 Robert Dewar <dewar@adacore.com>
5393 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
5394 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
5396 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5398 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
5400 2011-09-01 Jose Ruiz <ruiz@adacore.com>
5402 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
5404 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
5405 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
5406 in a similar way as we do for the Priority or Dispatching_Domain aspect.
5407 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
5408 Dispatching_Domains_Frozen): Move this local data to package
5409 System.Tasking because with the CPU aspect we need to have access
5410 to this data when creating the task in System.Tasking.Stages.Create_Task
5411 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
5412 Move these variables from the body of
5413 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
5414 we need to have access to this data when creating the task in
5415 System.Tasking.Stages.Create_Task.
5416 * s-taskin.adb (Initialize): Signal the allocation of the environment
5417 task to a CPU, if any, so that we know whether the CPU can be
5418 transferred to a different dispatching domain.
5419 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
5420 is being allocated belongs to the dispatching domain where the task
5421 lives. Signal the allocation of the task to a CPU, if any, so that we
5422 know whether the CPU can be transferred to a different dispatching
5425 2011-09-01 Ed Schonberg <schonberg@adacore.com>
5427 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
5428 attributes Same_Storage and Overlaps_Storage.
5430 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
5432 * exp_strm.adb: Remove with and use clause for Opt.
5433 (Build_Array_Input_Function): Remove the version-dependent generation
5434 of the return statement. The Ada 2005 tree is now the default.
5436 2011-09-01 Yannick Moy <moy@adacore.com>
5438 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
5439 it is never empty when compiling in Alfa mode.
5441 2011-09-01 Robert Dewar <dewar@adacore.com>
5443 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
5444 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
5445 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
5446 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
5448 2011-09-01 Matthew Heaney <heaney@adacore.com>
5450 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
5451 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
5452 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
5453 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
5454 unbounded queue container.
5455 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
5456 bounded queue container.
5457 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
5458 unbounded priority queue container.
5459 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
5460 bounded priority queue container.
5462 2011-08-31 Pascal Obry <obry@adacore.com>
5464 * a-direct.adb: Do not try to create an UNC path on Windows.
5465 (Create_Path): Skip leading computer name in UNC path if any.
5467 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5469 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
5470 version-dependent generation of the return statement. The Ada 2005 tree
5473 2011-08-31 Thomas Quinot <quinot@adacore.com>
5475 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
5476 types Stream_Element_Offset and Storage_Offset have a different native
5477 type depending on whether the platform is 32 or 64 bits. When
5478 exchanging them, always convert to 64 bits.
5480 2011-08-31 Yannick Moy <moy@adacore.com>
5482 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
5483 --force-alfa to gnat2why.
5485 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5487 * sem_ch12.adb (Save_References): If the node has aspects, save
5488 references within the corresponding expressions in a separate step,
5489 because the aspects are not directly in the tree for the declaration
5490 to which they belong.
5492 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5494 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
5495 in CodePeer mode, since representation clauses are partially ignored.
5496 * gcc-interface/Make-lang.in: Update dependencies.
5498 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5500 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5501 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
5502 to any dispatching domain.
5504 2011-08-31 Thomas Quinot <quinot@adacore.com>
5506 * exp_ch4.adb: Minor reformatting.
5508 2011-08-31 Bob Duff <duff@adacore.com>
5510 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
5511 on nodes for which it is not defined.
5512 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
5515 2011-08-31 Bob Duff <duff@adacore.com>
5517 * sem_ch3.adb (Process_Full_View): Disable legality check if
5518 In_Instance, to avoid spurious errors.
5519 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
5520 if In_Instance, to avoid spurious errors.
5522 2011-08-31 Pascal Obry <obry@adacore.com>
5524 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
5525 directory speparators.
5526 (Compose): Use Dir_Seps to handle both forms.
5527 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
5529 (Extension): Use Dir_Seps to handle both forms.
5531 2011-08-31 Pascal Obry <obry@adacore.com>
5533 * prj-conf.adb: Minor reformatting.
5535 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5537 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
5538 dispatching domain aspect.
5539 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
5541 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
5542 Dispatching_Domain aspect in a similar way as we do for the Priority
5544 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
5545 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
5547 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
5548 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
5549 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
5550 Dispatching_Domain and add it to the task definition.
5551 (Sig_Flags): Add Pragma_Dispatching_Domain.
5552 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
5553 support to find the types Dispatching_Domain and
5554 Dispatching_Domain_Access.
5555 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
5556 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
5557 query the availability of a pragma Dispatching_Domain.
5558 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
5559 the expander to pass the Dispatching_Domain when creating a task.
5560 (Name_Dispatching_Domain): Add this new name for a pragma.
5561 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
5562 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
5563 task has been allocated at creation time.
5564 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
5565 Ravenscar is always null.
5566 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
5567 the task has been allocated at creation time.
5568 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
5569 a specific dispatching domain.
5570 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
5571 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
5572 and CPU are specified for the task, and the CPU value is not contained
5573 within the range of processors for the domain.
5575 2011-08-31 Vincent Celier <celier@adacore.com>
5577 * make.adb (Original_Gcc) : New constant String_Access.
5578 (Gnatmake): For VM targets, do not use VM version of the compiler if
5579 --GCC= has been specified.
5581 2011-08-31 Thomas Quinot <quinot@adacore.com>
5583 * sem_ch5.adb: Minor reformatting.
5585 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5587 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
5590 2011-08-31 Bob Duff <duff@adacore.com>
5592 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
5593 the access type is private; we don't care about privacy in expansion.
5595 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5597 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
5598 subcomponents tnat may be limited, because they originate in view
5599 conflicts. If the original aggregate is legal and the actuals are
5600 legal, the aggregate itself is legal.
5602 2011-08-31 Matthew Heaney <heaney@adacore.com>
5604 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
5607 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5609 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
5612 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5614 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
5615 Interrupt_Priority aspects, force the analysis of the aspect expression
5616 (when building the equivalent pragma). Otherwise, its analysis is done
5617 too late, after the task or protected object has been created.
5618 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
5619 Analyze_Single_Task_Declaration): Remove the code to move the aspects
5620 to the object declaration because they are needed in the type
5623 2011-08-31 Robert Dewar <dewar@adacore.com>
5625 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
5626 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
5629 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5631 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
5632 if the corresponding type is malformed due to restriction violations.
5634 2011-08-31 Robert Dewar <dewar@adacore.com>
5636 * s-ransee.ads, s-ransee.adb: Minor reformatting.
5638 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5640 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
5641 would cause the generation of Set_Finalize_Address if the target is a
5642 VM and the designated type is not derived from [Limited_]Controlled.
5644 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5646 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
5648 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
5649 case of a compilation error.
5651 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5653 * init.c (__gnat_error_handler): Standardize the stack overflow or
5654 erroneous memory access message.
5655 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
5656 or erroneous memory access message.
5658 2011-08-31 Robert Dewar <dewar@adacore.com>
5660 * sem_ch4.adb: Minor reformatting.
5661 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5663 2011-08-31 Thomas Quinot <quinot@adacore.com>
5665 * scos.ads: Minor documentation clarification.
5666 * put_scos.adb: Do not generate SCO unit header line for a unit that
5669 2011-08-31 Robert Dewar <dewar@adacore.com>
5671 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
5673 2011-08-31 Tristan Gingold <gingold@adacore.com>
5675 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
5676 hold variables between these following subprograms.
5677 (Build_Exception_Handler, Build_Object_Declarations,
5678 Build_Raise_Statement): Use the above type as parameter.
5679 Make the above adjustments.
5680 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
5682 2011-08-31 Pascal Obry <obry@adacore.com>
5684 * projects.texi: Minor reformatting.
5686 2011-08-31 Tristan Gingold <gingold@adacore.com>
5688 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
5689 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
5691 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5693 * exp_ch5.adb: Minor code cleanup.
5694 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
5695 prevent cascaded errors.
5696 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
5697 variable of an iterator specification in current scope.
5698 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
5699 postconditions on the stack, as they contain no return statements.
5701 2011-08-31 Yannick Moy <moy@adacore.com>
5703 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
5704 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
5705 call Qualify_Entity_Names.
5706 (Expand_Alfa): call Qualify_Entity_Names in more cases
5707 * lib-xref-alfa.adb: Take into account system package.
5708 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
5709 CodePeer mode in which we are interested in finding bugs even if
5710 compiler cannot compile source.
5711 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
5714 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5716 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
5717 denoted by the subtype mark to ensure getting the concurrent type in
5718 the case where the subtype mark denotes a private subtype of a
5719 concurrent type (needed when using -gnatc).
5720 (Process_Subtype): For the processing specific to type kinds, case on
5721 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
5722 subtype denotes a private subtype whose base type is nonprivate (needed
5723 for subtypes of private fulfilled by task types when compiling with
5726 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5728 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
5729 late primitives that override interface operations when the full
5730 expander is not active, to avoid blowups in Register_Primitive when
5731 types don't have associated secondary dispatch tables.
5733 2011-08-31 Yannick Moy <moy@adacore.com>
5735 * alfa_test.adb: Code clean up.
5737 2011-08-31 Marc Sango <sango@adacore.com>
5739 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
5740 by Comes_From_Source (Original_Node (N)) in order to treat also the
5741 nodes which have been rewritten.
5742 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
5743 explicit dereference and slice violation in spark mode on the nodes
5744 coming only from the source code.
5746 2011-08-31 Robert Dewar <dewar@adacore.com>
5748 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
5749 lib-xref-alfa.adb: Minor reformatting.
5751 2011-08-31 Matthew Heaney <heaney@adacore.com>
5753 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
5755 2011-08-31 Javier Miranda <miranda@adacore.com>
5757 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
5758 only for class-wide subprograms conflicting with entities of concurrent
5761 2011-08-31 Matthew Heaney <heaney@adacore.com>
5763 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
5766 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5768 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
5769 general description of the routine.
5771 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5773 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
5774 doubly-linked lists.
5776 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5778 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
5779 check is needed for a left-hand side that is a dereference, and the
5780 base type is private without discriminants (whereas the full type does
5781 have discriminants), an extra retrieval of the underlying type may be
5782 needed in the case where the subtype is a record subtype whose base
5783 type is private. Update comments.
5785 2011-08-31 Javier Miranda <miranda@adacore.com>
5787 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
5788 found check if there is a class-wide subprogram covering the primitive.
5790 2011-08-31 Yannick Moy <moy@adacore.com>
5792 * sem_res.adb: Further cases where full expansion test is needed,
5793 rather than expansion test.
5795 2011-08-31 Pascal Obry <obry@adacore.com>
5797 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
5799 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5801 * exp_ch5.adb: Handle iterators over derived container types.
5803 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5805 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
5806 (Has_Anonymous_Master): New routine.
5807 (Set_Has_Anonymous_Master): New routine.
5808 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
5809 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
5810 (Current_Anonymous_Master): New routine.
5811 (Current_Unit_First_Declaration): Removed.
5812 (Current_Unit_Scope): Removed.
5813 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
5814 their objects on a per-unit heterogeneous finalization master.
5816 2011-08-31 Matthew Heaney <heaney@adacore.com>
5818 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
5821 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5823 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
5826 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5828 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
5829 where the actual is an unexpanded call to 'Input.
5831 2011-08-31 Yannick Moy <moy@adacore.com>
5833 * sem_ch4.adb: Code clean up.
5835 2011-08-31 Yannick Moy <moy@adacore.com>
5837 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
5839 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5841 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
5842 and TSS primitive Finalize_Address if finalization is suppressed.
5843 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
5844 primitive Finalize_Address if finalization is suppressed.
5846 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5848 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
5849 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
5850 sure that the underlying task has already been created before trying
5851 to change its affinity.
5852 (Set_CPU): Use the term processor instead of CPU, as we do in
5855 2011-08-31 Vincent Celier <celier@adacore.com>
5857 * prj-attr.adb: New Compiler attribute Source_File_Switches.
5858 * prj-nmsc.adb (Process_Compiler): Process attribute
5859 Source_File_Switches.
5860 * prj.ads (Language_Config): New name list component
5861 Name_Source_File_Switches.
5862 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
5864 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5866 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
5867 discriminated component of an actual, expand at once to prevent
5868 ouf-of-order references with generated subtypes.
5870 2011-08-31 Yannick Moy <moy@adacore.com>
5872 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
5873 reference to operator in Alfa xrefs.
5875 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5877 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5878 where the parent instance was frozen before the current instance due to
5879 the presence of a source body. Update calls to Insert_After_Last_Decl.
5880 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5881 Update the comment which illustrates the purpose of the routine.
5882 Package instances are now frozen by source bodies which appear after
5883 the instance. This ensures that entities coming from within the
5884 instance are available for use in the said bodies.
5885 (Install_Body): Add code to handle the case where the parent instance
5886 was frozen before the current instance due to the presence of a source
5887 body. Update calls to Insert_After_Last_Decl.
5889 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5891 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5893 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5895 2011-08-31 Yannick Moy <moy@adacore.com>
5897 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5899 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5900 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5901 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5902 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5903 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5904 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5905 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5906 ALFA in Alfa (we dropped acronym).
5907 * einfo.adb (Primitive_Operations): Correctly return list of primitive
5908 operations in a case where it returned previously No_Elist.
5910 2011-08-31 Robert Dewar <dewar@adacore.com>
5912 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5913 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5914 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5915 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5916 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5917 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5920 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5922 * sem_ch12 (Check_Private_View): Revert previous change.
5923 * sem_res.adb (Conversion_Check): Do not emit the error message if the
5924 conversion is in a generic instance.
5926 2011-08-31 Matthew Heaney <heaney@adacore.com>
5928 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5929 * a-chtgbo.adb (Free): Allow 0 as index value.
5931 2011-08-31 Matthew Heaney <heaney@adacore.com>
5933 * a-cborma.adb (Insert): Add comment to explain why no element
5936 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5938 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5939 spec discriminant is already a concurrent type, in which case just use
5940 it, otherwise fetch the Corresponding_Concurrent_Type as before.
5942 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5944 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5945 system-linux-mips.ads, system-linux-mipsel.ads,
5946 system-linux-mips64el.ads, system-linux-ppc64.ads,
5947 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5949 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5951 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5952 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5953 (build_unary_op): Likewise.
5955 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5957 * raise-gcc.c: Do not include coretypes.h and tm.h.
5958 (setup_to_install): Remove test for compiler macro.
5959 * targext.c: Document use for the library.
5960 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5962 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5964 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5965 the expression to the nominal type if the latter is a record type with
5966 a variant part and the type of the former is a record type without one.
5968 2011-08-30 Yannick Moy <moy@adacore.com>
5970 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5971 expansion in Alfa mode.
5972 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5973 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5975 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5976 * sem_res.adb: Ditto.
5977 * gcc-interface/Make-lang.in: Update dependencies.
5979 2011-08-30 Thomas Quinot <quinot@adacore.com>
5981 * g-socket.ads: Minor documentation adjustment.
5983 2011-08-30 Robert Dewar <dewar@adacore.com>
5985 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5987 2011-08-30 Yannick Moy <moy@adacore.com>
5989 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5990 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5991 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5992 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5993 Revert change which introduced files for "light"
5994 expansion, to be replaced by a single file for Alfa expansion.
5996 2011-08-30 Robert Dewar <dewar@adacore.com>
5998 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5999 Minor code reorg/reformatting.
6001 2011-08-30 Yannick Moy <moy@adacore.com>
6003 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
6004 common shorthand for (Expander_Active and not ALFA_Mode) that can be
6005 used for testing full expansion, that is active expansion not in the
6006 reduced mode for Alfa
6007 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
6008 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
6009 of the verbose (Expander_Active and not ALFA_Mode)
6011 2011-08-30 Tristan Gingold <gingold@adacore.com>
6013 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
6014 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
6015 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
6016 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
6018 2011-08-30 Gary Dismukes <dismukes@adacore.com>
6020 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
6021 access conversions to check that the conversion is a rewritten node,
6022 rather than just having Comes_From_Source set to False, which wasn't
6025 2011-08-30 Robert Dewar <dewar@adacore.com>
6027 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
6028 g-socket.ads: Minor reformatting.
6030 2011-08-30 Thomas Quinot <quinot@adacore.com>
6032 * sem_util.adb: Minor reformatting.
6034 2011-08-30 Tristan Gingold <gingold@adacore.com>
6036 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
6037 to be compliant with the ABI.
6039 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
6041 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
6042 of a designated type when the related access type is an actual in an
6043 instance. This ensures that the full view of designated type is
6044 available when inside the body of the instance.
6046 2011-08-30 Ed Schonberg <schonberg@adacore.com>
6048 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
6049 in a position to be modified, a slice is treated like an indexed
6052 2011-08-30 Thomas Quinot <quinot@adacore.com>
6054 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
6055 field tv_sec in struct timeval.
6057 2011-08-30 Yannick Moy <moy@adacore.com>
6059 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
6060 blocks of code doing full expansion, previously only guarded by
6061 Expander_Active, by anding the test that ALFA_Mode is not set
6063 2011-08-30 Ed Schonberg <schonberg@adacore.com>
6065 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
6066 add the function to the list of private dependents, for subsequent
6067 legality check on Taft amendment types.
6068 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
6069 Private_Dependents, as for other incomplete types.
6070 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
6071 Taft-amendment type is used as the return type of a function.
6073 2011-08-30 Javier Miranda <miranda@adacore.com>
6075 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
6076 which emits an error by a call to a new routine which report the error.
6077 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
6078 entity does not cover an existing interface.
6079 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
6081 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
6082 protected procedures or entries whose mode is not conformant.
6083 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
6084 an error by a call to a new routine which report the error.
6086 2011-08-30 Robert Dewar <dewar@adacore.com>
6088 * gnat_rm.texi: Minor change.
6089 * exp_attr_light.adb: Minor reformatting.
6091 2011-08-30 Ed Schonberg <schonberg@adacore.com>
6093 * sem_ch3.adb: Patch inheritance of aspects in
6094 Complete_Private_Subtype, to avoid infinite loop.
6096 2011-08-30 Javier Miranda <miranda@adacore.com>
6098 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
6099 been reported and a subprogram covering an interface primitive is not
6100 found then skip generating the internal entity. Done to avoid crashing
6102 (Check_Abstract_Overriding): Change text of error of wrong formal of
6103 protected subprogram or entry. Done for consistency to emit exactly the
6104 same error reported by Check_Synchronized_Overriding. In addition, the
6105 error is restricted to protected types (bug found working on AI05-0090)
6107 2011-08-30 Yannick Moy <moy@adacore.com>
6109 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
6110 expansion in Alfa mode.
6111 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
6112 * exp_light.adb, exp_light.ads: New package defining light expansion.
6113 * expander.adb (Expand): Call light expansion in Alfa mode
6114 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
6116 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
6118 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
6119 * gnat1drv.adb (Adjust_Global_Switches): Comment
6121 2011-08-30 Yannick Moy <moy@adacore.com>
6123 * lib-xref-alfa.adb: Minor refactoring.
6125 2011-08-30 Yannick Moy <moy@adacore.com>
6127 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
6129 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
6130 expansion in Alfa mode.
6131 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
6134 2011-08-30 Robert Dewar <dewar@adacore.com>
6136 * debug_a.adb: Update comment.
6138 2011-08-30 Robert Dewar <dewar@adacore.com>
6140 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
6141 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
6142 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
6143 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
6145 2011-08-30 Robert Dewar <dewar@adacore.com>
6147 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
6150 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
6152 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
6153 Build_Finalization_Master by supplying an insertion node and enclosing
6154 scope. In its old version, the call did not generate a finalization
6156 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
6157 recognize anonymous access-to-controlled components. Rewrite the
6158 machinery which creates finalization masters to service anonymous
6159 access-to-controlled components of a record type. In its current state,
6160 only one heterogeneous master is necessary to handle multiple anonymous
6162 (Freeze_Type): Comment reformatting.
6163 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
6165 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
6166 associates TSS primitive Finalize_Address with either the master itself
6167 or with the internal hash table depending on the mode of operation of
6170 2011-08-30 Javier Miranda <miranda@adacore.com>
6172 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
6173 interface type then do not generate code to compare this component.
6174 Required since they have no components and their equality operator is
6177 2011-08-30 Steve Baird <baird@adacore.com>
6179 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
6180 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
6181 returns the (static) accessibility level of the object. Otherwise, the
6182 same as Type_Access_Level.
6183 (Dynamic_Accessibility_Level): New function; given an expression which
6184 could occur as the rhs of an assignment to a saooaaat (i.e., an
6185 expression of an access-to-object type), return the new value for the
6186 saooaaat's associated Extra_Accessibility object.
6187 (Effective_Extra_Accessibility): New function; same as
6188 Einfo.Extra_Accessibility except that object renames are looked through.
6190 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
6191 (Dynamic_Accessibility_Level): New function; see sem_util.ads
6193 (Effective_Extra_Accessibility): New function; see sem_util.ads
6195 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
6196 (Extra_Accessibility): Update comments.
6197 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
6198 except RM_Size field (which is only for types) is unaffected.
6200 (Extra_Accessibility): Expand domain to allow objects, not just formals.
6201 (Set_Extra_Accessibility): Expand domain to allow objects, not just
6203 (Init_Size): Add assertion that we are not trashing the
6204 Extra_Accessibility attribute of an object.
6205 (Init_Size_Align): Add assertion that we are not trashing the
6206 Extra_Accessibility attribute of an object.
6207 (Init_Object_Size_Align): New procedure; see einfo.ads description.
6208 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
6209 differently for the type of a (non-library-level) saooaaat depending
6210 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
6211 is queried in this set of changes - everything else (in particular,
6212 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
6213 driven off of the setting of the Is_Local_Anonymous_Access attribute.
6214 The special treatment of library-level saooaaats is an optimization,
6215 not required for correctnesss. This is based on the observation that the
6216 Ada2012 rules (static and dynamic) for saooaaats turn out to be
6217 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
6219 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
6220 false for the type of a saooaaat, declare and initialize its
6221 accessibility level object and set the Extra_Accessibility attribute
6222 of the saooaaat to refer to this object.
6223 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
6224 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
6225 calls to Effective_Extra_Accessibility in order to support
6226 renames of saooaaats.
6227 (Expand_N_Type_Conversion): Add new local function,
6228 Has_Extra_Accessibility, and call it when determining whether an
6229 accessibility check is needed.
6230 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
6231 evaluate to True (without raising an exception).
6233 (Expand_N_Assignment_Statement): When assigning to an Ada2012
6234 saooaaat, update its associated Extra_Accessibility object (if
6235 it has one). This includes an accessibility check.
6236 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
6237 a saooaaat, update its Extra_Accessibility object too (if it
6239 (Expand_Call): Replace a couple of calls to Type_Access_Level
6240 with calls to Dynamic_Access_Level to handle cases where
6241 passing a literal (any literal) is incorrect.
6242 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
6243 checks associated with "Saooaat := Some_Object'Access;"; this must
6244 be rejected if Some_Object is declared in a more nested scope
6246 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
6247 assignment to a saooaaat even if Is_Local_Anonymous_Access
6248 returns False for its type (indicating a 2012-style saooaaat).
6250 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
6251 (which is only appropriate for objects, not types) with a call
6252 of Init_Object_Size_Align in order to avoid trashing the
6253 Extra_Accessibility attribute of a rename (the two attributes
6256 (Valid_Conversion) Replace six calls to Type_Access_Level with
6257 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
6258 Ada2012 non-library-level saooaaat, the former returns library level
6259 while the latter returns the (static) accessibility level of the
6260 saooaaat. A type conversion to the anonymous type of a saooaaat
6261 can only occur as part of an assignment to the saooaaat, so we
6262 know that such a conversion must be in a lhs context, so Deepest
6263 yields the result that we need. If such a conversion could occur,
6264 say, as the operand of an equality operator, then this might not
6265 be right. Also add a test so that static accessibilty checks are
6266 performed for converting to a saooaaat's type even if
6267 Is_Local_Anonymous_Access yields False for the type.
6269 2011-08-30 Javier Miranda <miranda@adacore.com>
6271 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
6272 controls generation of a warning associated with late declaration of
6273 dispatching functions. Required to avoid generating spurious
6276 2011-08-30 Gary Dismukes <dismukes@adacore.com>
6278 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
6279 return object has an anonymous access type and the function's type is
6280 a named access type.
6281 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
6282 conversions on implicit conversions, since such conversions can occur
6283 for anonymous access cases due to expansion. Issue error for attempt
6284 to rename an anonymous expression as an object of a named access type.
6285 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
6286 to indicate whether this function should report errors on invalid
6288 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
6289 the expression is of an anonymous access type and the expected type is
6290 a named general access type, rewrite the expression as a type
6291 conversion, unless this is an expression of a membership test.
6292 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
6293 calling of Error_Msg_N on new formal Report_Errs.
6294 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
6295 calling of Error_Msg_NE on new formal Report_Errs.
6296 (Valid_Conversion): Move declaration of this function to the package
6297 spec, to allow calls from membership test processing. For Ada 2012,
6298 enforce legality restrictions on implicit conversions of anonymous
6299 access values to general access types, disallowing such conversions in
6300 cases where the expression has a dynamic accessibility level (access
6301 parameters, stand-alone anonymous access objects, or a component of a
6302 dereference of one of the first two cases).
6303 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
6304 in the context of a named general access expected type.
6305 * exp_ch4.adb Add with and use of Exp_Ch2.
6306 (Expand_N_In): Add processing for membership tests applied to
6307 expressions of an anonymous access type. First, Valid_Conversion is
6308 called to check whether the test is statically False, and then the
6309 conversion is expanded to test that the expression's accessibility
6310 level is no deeper than that of the tested type. In the case of
6311 anonymous access-to-tagged types, a tagged membership test is applied
6313 (Tagged_Membership): Extend to handle access type cases, applying the
6314 test to the designated types.
6315 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
6316 accessibility level, and the actual is a 'Access applied to a current
6317 instance, pass the accessibility level of the type of the current
6318 instance rather than applying Object_Access_Level to the prefix. Add a
6319 ??? comment, since this level isn't quite right either (will eventually
6320 need to pass an implicit level parameter to init procs).
6322 2011-08-30 Bob Duff <duff@adacore.com>
6324 * s-taskin.ads: Minor comment fix.
6326 2011-08-30 Ed Schonberg <schonberg@adacore.com>
6328 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
6329 component and the selector is a dispatching operation, check if it is
6330 a prefixed call before rewriting as a parameterless function call.
6332 2011-08-29 Jakub Jelinek <jakub@redhat.com>
6334 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
6335 tsystem.h into $(RTSDIR) instead of rts.
6337 2011-08-29 Robert Dewar <dewar@adacore.com>
6339 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
6341 * gcc-interface/Make-lang.in: Update dependencies.
6343 2011-08-29 Yannick Moy <moy@adacore.com>
6345 * alfa.ads (Name_Of_Heap_Variable): New constant name.
6346 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
6347 table to hold dereferences.
6348 (Add_ALFA_Xrefs): Take into account dereferences as special
6349 reads/writes to the variable "HEAP".
6350 (Enclosing_Subprogram_Or_Package): Move subprogram here.
6351 (Generate_Dereference): New procedure to store a read/write dereferencew
6353 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
6354 the special "HEAP" var.
6355 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
6357 * sem_util.adb (Note_Possible_Modification): Store write dereference
6360 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6362 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
6363 ensures that the level of the subpool access type is not deeper than
6364 that of the pool object.
6365 * sem_util.adb (Object_Access_Level): Expand to handle defining
6367 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
6368 subpool handle name of a rewritten allocator.
6370 2011-08-29 Robert Dewar <dewar@adacore.com>
6372 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
6374 2011-08-29 Thomas Quinot <quinot@adacore.com>
6376 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
6377 values, we generate multiple triples of parameters in the TypeCode.
6378 Bump Choice_Index for each such triple so that a subsequent default
6379 choice is associated with the correct index in the typecode.
6381 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6383 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
6385 (First, Last): Handle properly an iterator over a null container.
6387 2011-08-29 Bob Duff <duff@adacore.com>
6389 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
6390 processing if we run across a node with no Scope. This can happen if
6391 we're with-ing an library-level instance, and that instance got errors
6392 that caused "instantiation abandoned".
6393 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
6394 an exception instead of using Assert, so it won't go into an infinite
6395 loop, even when assertions are turned off.
6397 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6399 * a-coorse.adb: Proper handling of empty ordered sets.
6401 2011-08-29 Johannes Kanig <kanig@adacore.com>
6403 * debug.adb: Add comments.
6405 2011-08-29 Thomas Quinot <quinot@adacore.com>
6407 * a-except.adb, a-except-2005.adb: Minor comment rewording and
6410 2011-08-29 Yannick Moy <moy@adacore.com>
6412 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
6413 declaration for Itypes in Alfa mode.
6415 2011-08-29 Robert Dewar <dewar@adacore.com>
6417 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
6418 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6419 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
6422 2011-08-29 Tristan Gingold <gingold@adacore.com>
6424 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
6426 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
6427 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
6430 2011-08-29 Robert Dewar <dewar@adacore.com>
6432 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
6434 2011-08-29 Javier Miranda <miranda@adacore.com>
6436 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
6437 renamings of formal subprograms when the actual for a formal type is
6440 2011-08-29 Matthew Heaney <heaney@adacore.com>
6442 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
6445 2011-08-29 Matthew Heaney <heaney@adacore.com>
6447 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
6448 components of record type.
6449 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
6452 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6454 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
6455 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
6458 2011-08-29 Robert Dewar <dewar@adacore.com>
6460 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
6463 2011-08-29 Matthew Heaney <heaney@adacore.com>
6465 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
6466 components of record type.
6468 2011-08-29 Bob Duff <duff@adacore.com>
6470 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
6471 by the termination handler.
6473 2011-08-29 Yannick Moy <moy@adacore.com>
6475 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
6476 created in Alfa mode, instead of inserting artificial declarations of
6477 non-Itypes in the tree.
6478 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
6479 know if an Itype has a corresponding declaration, as defined in
6482 2011-08-29 Yannick Moy <moy@adacore.com>
6484 * gnat1drv.adb: Minor rewrite.
6486 2011-08-29 Bob Duff <duff@adacore.com>
6488 * s-tasuti.adb (Make_Passive): Work around race condition in
6489 Make_Independent, which can cause Wait_Count to be zero. So instead of
6490 asserting that Wait_Count > 0, and then decrementing it, decrement it
6491 only if Wait_Count > 0.
6492 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
6493 should be nonnegative, so declare them Natural instead of Integer.
6495 2011-08-29 Robert Dewar <dewar@adacore.com>
6497 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
6498 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
6499 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
6500 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
6501 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
6503 2011-08-29 Tristan Gingold <gingold@adacore.com>
6505 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
6507 2011-08-29 Vadim Godunko <godunko@adacore.com>
6509 * s-parint.ads: Minor comment clarification.
6511 2011-08-29 Vincent Celier <celier@adacore.com>
6513 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
6514 may be used as identifiers.
6516 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6518 * a-coinho.ads: Minor reformating.
6520 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6522 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
6523 container of a derived type.
6525 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6527 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
6528 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
6530 2011-08-29 Pascal Obry <obry@adacore.com>
6532 * exp_disp.adb: Minor comment fix.
6533 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
6534 to avoid warnings when compiling with -Wall.
6535 (Make_Disp_Conditional_Select_Body): Likewise.
6536 (Make_Disp_Timed_Select_Body): Likewise.
6538 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6540 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
6541 an entity name, generate reference for it.
6543 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6545 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
6547 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
6548 the class-wide type.
6549 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
6551 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6553 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
6554 subtype for an object whose type is an unconstrained union.
6556 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6558 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
6559 is allowed in a component definition, by AI95-406.
6561 2011-08-29 Matthew Heaney <heaney@adacore.com>
6563 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
6565 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6567 * a-except-2005.adb: Alphabetize all routines.
6568 (Triggered_By_Abort): New routine.
6569 * a-except-2005.ads (Triggered_By_Abort): New routine.
6570 * a-except.adb Alphabetize all routines.
6571 (Triggered_By_Abort): New routine.
6572 * a-except.ads (Triggered_By_Abort): New routine.
6573 * exp_ch7.adb: Update all comments involving the detection of aborts in
6575 (Build_Object_Declarations): Do not generate code to detect the
6576 presence of an abort at the start of finalization code, use a runtime
6578 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
6580 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
6581 allocate a task on a subpool.
6582 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
6583 The flag disables all actions related to the maintenance of
6584 Finalize_Address_Table when subpools are not in use.
6585 (Allocate_Any_Controlled): Signal the machinery that subpools are in
6587 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
6588 performs costly task locking when subpools are not in use.
6590 2011-08-29 Yannick Moy <moy@adacore.com>
6592 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
6593 types and dispatching calls in Alfa mode.
6594 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6595 correspondance between body and spec scopes, to reuse utility functions
6596 (Traverse_Declarations_Or_Statements): Protect access to body for stub
6597 by testing the presence of the library unit for the body
6598 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
6599 mode the expansion of accept statements is skipped
6600 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
6601 the unique entity corresponding to the one returned by
6602 Unique_Defining_Entity applied to the enclosing declaration of the
6605 2011-08-29 Bob Duff <duff@adacore.com>
6607 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
6608 gdb when x is not a node (it can be a node list, name_id, etc). pp is
6609 an alias for pn. ppp is an alias for pt.
6611 2011-08-29 Javier Miranda <miranda@adacore.com>
6613 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
6614 aggregate to take a consistent decision on the need to convert into
6615 assignments aggregates that initialize constant objects.
6617 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6619 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
6620 Build_Allocate_Deallocate_Proc in order to handle allocation of
6621 non-controlled objects on subpools.
6622 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
6623 to be end-user visible.
6624 * s-finmas.adb: Add with and use clause for System.HTable.
6625 Add an instantiation of Simple_HTable which provides a mapping between
6626 the address of a controlled object and the corresponding
6627 Finalize_Address used to clean up the object. The table is used when a
6628 master is operating in heterogeneous mode.
6629 (Attach): Explain why the input node is not verified on being already
6631 (Delete_Finalize_Address): New routine.
6632 (Detach): Add pragma Assert which ensures that a node is already
6634 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
6635 since nodes are no longer removed on traversal. Explain why node
6636 detachment is undesirable in this case.
6637 (Get_Finalize_Address): New routine.
6638 (Hash): New routine.
6639 (Is_Empty_List): Removed.
6640 (pm): Renamed to Print_Master. Add output for discriminant
6642 Comment reformatting.
6643 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6644 * s-finmas.ads: Various comments additions / improvements.
6645 Type Finalization_Master has a discriminant which determines the mode of
6647 (Delete_Finalize_Address): New routine.
6648 (Get_Finalize_Address): New routine.
6649 (pm): Renamed to Print_Master.
6650 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6651 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
6652 use clause for System.IO.
6653 (Allocate_Any_Controlled): Add machinery to set TSS primitive
6654 Finalize_Address depending on the mode of allocation and the mode of
6656 (Deallocate_Any_Controlled): Remove the relation pair object -
6657 Finalize_Address regardless of the master mode. Add comment explaining
6659 (Detach): Ensure that fields Prev and Next are null after detachment.
6660 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
6661 scheme to check whether the list of subpools is empty. There is no
6662 longer need to store the next subpool or advance the current pointer.
6663 (Is_Empty_List): New routine.
6664 (Print_Pool): New routine.
6665 (Print_Subpool): New routine.
6666 * s-stposu.ads: Various comments additions / improvements.
6667 Field Master of type Root_Subpool is now a heterogeneous collection.
6668 (Print_Pool): New routine.
6669 (Print_Subpool): New routine.
6671 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6673 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
6674 forms, using aspects of container types.
6675 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
6676 Has_Implicit_Dereference flags, that may be set on the partial view.
6677 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
6678 container type with an indexing aspect.
6679 (Analyze_Quantified_Expression): Analyze construct with expansion
6680 disabled, because it will be rewritten as a loop during expansion.
6681 (Try_Container_Indexing): The prefix itself may be a container type
6682 with an indexing aspect, as with a vector of vectors.
6683 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
6684 the original doamin of iteration, for name capture.
6685 (Analyze_Iterator_Specification): If the domain is an expression that
6686 needs finalization, create a separate declaration for it.
6687 For an iterator with "of" retrieve default iterator info from aspect of
6688 container type. For "in" iterator, retrieve type of Iterate function.
6689 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
6690 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
6691 analysis, to prevent spurious errors about late attributes.
6692 * sprint.adb: Handle quantified expression with either loop or iterator
6694 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
6697 2011-08-29 Vincent Celier <celier@adacore.com>
6699 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
6700 Binder or Linker of the main project file.
6702 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6704 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
6707 2011-08-29 Yannick Moy <moy@adacore.com>
6709 * exp_ch9.adb: Partial revert of previous change for Alfa mode
6711 2011-08-29 Yannick Moy <moy@adacore.com>
6713 * exp_ch11.adb: Minor expansion of comment.
6715 2011-08-29 Yannick Moy <moy@adacore.com>
6717 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
6719 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6721 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
6722 interpretation, set the type before resolving the operands, because
6723 legality checks on an exponention operand need to know the type of the
6726 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6728 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
6729 cleanups on a master if the instance is within a generic unit.
6730 Complement to the corresponding fix to inline.adb for K520-030.
6732 2011-08-29 Tristan Gingold <gingold@adacore.com>
6734 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
6736 * exp_intr.adb: Minor comment fix.
6738 2011-08-29 Bob Duff <duff@adacore.com>
6740 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
6741 Delay_Required was used as an uninitialized variable.
6743 2011-08-29 Robert Dewar <dewar@adacore.com>
6745 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
6746 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
6747 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
6749 2011-08-29 Thomas Quinot <quinot@adacore.com>
6751 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
6752 Remove unused variables.
6754 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6756 * sem_res.adb: Remove Build_Explicit_Dereference.
6757 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
6758 from sem_res.adb, used in analysis of additional constructs.
6759 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
6760 expansion of iterators.
6761 (Is_Object_Reference): Recognize variables rewritten as explicit
6762 dereferences in Ada2012.
6763 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
6764 Reversible_Iterator names, for expansion of Ada2012 iterators.
6765 * aspects.ads, aspects.adb (Find_Aspect): Utility.
6766 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
6767 linked list container.
6768 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
6769 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
6771 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6773 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
6776 2011-08-29 Vincent Celier <celier@adacore.com>
6778 * make.adb (Gnatmake): Get the maximum number of simultaneous
6779 compilation processes after the Builder switches has been scanned, as
6780 there may include -jnn.
6782 2011-08-29 Matthew Heaney <heaney@adacore.com>
6784 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
6786 2011-08-29 Tristan Gingold <gingold@adacore.com>
6788 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
6789 GNAT_DRIVER_COMMAND_LINE to 255.
6791 2011-08-29 Pascal Obry <obry@adacore.com>
6793 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
6794 reformatting and style fix (class attribute casing).
6796 2011-08-29 Yannick Moy <moy@adacore.com>
6798 * exp_ch11.adb: Yet another case where expansion should be common
6799 between CodePeer and Alfa.
6801 2011-08-29 Yannick Moy <moy@adacore.com>
6803 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
6805 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6807 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
6808 incomplete type and its completion match.
6810 2011-08-29 Yannick Moy <moy@adacore.com>
6812 * exp_ch13.adb: Adjust previous change.
6814 2011-08-29 Robert Dewar <dewar@adacore.com>
6816 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
6817 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
6820 2011-08-29 Emmanuel Briot <briot@adacore.com>
6822 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
6823 initialize aggregated projects.
6825 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6827 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
6828 depth of candidates to resolve a potentially spurious ambiguity between
6829 two visible subprograms.
6831 2011-08-29 Yannick Moy <moy@adacore.com>
6833 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
6835 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6836 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
6839 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6841 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
6844 2011-08-29 Thomas Quinot <quinot@adacore.com>
6846 * sem_res.adb: Minor reformatting.
6848 2011-08-29 Johannes Kanig <kanig@adacore.com>
6850 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
6852 * gnat1drv.adb (Adjust_Global_Switches): Set
6853 Use_Expressions_With_Actions to False in ALFA mode.
6854 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
6857 2011-08-29 Yannick Moy <moy@adacore.com>
6859 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
6860 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
6861 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
6862 tagged types and dispatching calls in Alfa mode.
6864 2011-08-29 Javier Miranda <miranda@adacore.com>
6866 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
6867 we do not report an error on an Empty node.
6869 2011-08-29 Geert Bosch <bosch@adacore.com>
6871 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
6872 a-nlrear.o and a-nurear.o.
6874 2011-08-29 Robert Dewar <dewar@adacore.com>
6876 * freeze.adb: Minor code reorganization.
6878 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6879 sem_ch6.adb: Minor reformatting
6881 2011-08-29 Tristan Gingold <gingold@adacore.com>
6883 * s-except.ads, s-except.adb: Provide dummy body.
6885 2011-08-29 Yannick Moy <moy@adacore.com>
6887 * sem_warn.adb (Within_Postcondition): Take into account the case of
6888 an Ensures component in a Test_Case.
6890 2011-08-29 Tristan Gingold <gingold@adacore.com>
6892 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6893 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6894 System_Exceptions_Debug
6895 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6896 * a-except.adb: With and use System.Exceptions_Debug instead of
6898 * a-except-2005.adb: Likewise.
6899 * s-assert.adb: Likewise.
6900 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6901 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
6902 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6903 s-excdeb. Update dependencies.
6904 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6905 as these no longer need external libraries.
6907 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6909 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6910 exponentiation operator on universal values in a context that requires
6913 2011-08-29 Tristan Gingold <gingold@adacore.com>
6915 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
6916 before calling notify_handled_exception.
6917 * a-exextr.adb: Fix comment.
6919 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6921 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6922 Finalize_Address of the access type's finalization master.
6923 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6924 access type's finalization master. Add a guard to prevent
6925 Associated_Storage_Pool from being set on .NET/JVM.
6926 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6927 attribute Finalize_Address of the access type's finalization master.
6928 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6929 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6930 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6932 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6933 use clause for System.IO
6934 (Detach): Relax the assertion, to be reinstated later.
6935 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6936 Relax the assertion on Finalize_Address, to be reinstated later.
6937 (Is_Empty_List): New routine.
6938 (pm): New debug routine.
6939 (Set_Finalize_Address): New routine.
6940 * s-finmas.ads (pm): New debug routine.
6941 (Set_Finalize_Address): New routine.
6942 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6944 2011-08-29 Tristan Gingold <gingold@adacore.com>
6946 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6947 Remove convention C.
6949 2011-08-29 Tristan Gingold <gingold@adacore.com>
6951 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6952 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6953 (Finalize_TCB): Remove its finalization.
6954 (Initialize): Remove assignment of GET_Exc_Stack_Addr
6955 * s-soflin.adb (NT_Exc_Stack): Remove
6956 (Get_Exc_Stack_Addr_NT): Likewise.
6957 (Get_Exc_Stack_Addr_Soft): Likewise.
6958 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6959 (Get_Exc_Stack_Addr): Likewise.
6960 (Get_Exc_Stack_Addr_Soft): Likewise
6961 * s-taspri-vms.ads (Exc_Stack_T): Remove.
6962 (Exc_Stack_Ptr_T): Likewise.
6963 (Private_Data): Remove Exc_Stack_Ptr component.
6965 2011-08-29 Tristan Gingold <gingold@adacore.com>
6967 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6969 2011-08-29 Tristan Gingold <gingold@adacore.com>
6971 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6973 2011-08-29 Geert Bosch <bosch@adacore.com>
6975 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6976 L2_Norm, Swap_Column): New generic subprograms
6977 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6978 L2_Norm, Swap_Column): Implement new subprograms in order to
6979 eliminate dependency on BLAS and LAPACK libraries in
6980 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6981 version. Forward_Eliminate/Back_Substitute can be used to put a
6982 matrix in row echelon or reduced row echelon form using partial
6984 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6985 Swap_Column): Instantiate from System.Generic_Array_Operations.
6986 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6987 (Sqrt): Local function for simple computation of square root without
6988 adding dependencies on Generic_Elementary_Functions.
6989 (Swap): New subprogram to exchange floating point numbers.
6990 (Inverse): Reimplement using Jordan-Gauss elimination.
6991 (Jacobi): New procedure implementing Jacobi's method for computation
6992 of eigensystems, based on Rutishauser's implementation.
6993 (L2_Norm): Implement directly using the inner product.
6994 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6995 decreasing eigenvalue as required by the Ada RM.
6996 (Swap_Column): New helper procedure for Sort_Eigensystem.
6997 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6998 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
7001 2011-08-29 Thomas Quinot <quinot@adacore.com>
7003 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
7006 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7008 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
7009 than the current node.
7010 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
7011 Finalization_Master. The list headers have two fields instead of three.
7012 This should fix alignment issue but subpool allocations are now
7013 unusable. Alphabetize subprograms.
7014 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
7015 the size of the header when converting the beginning of the object to
7016 a FM_Node. Set the master's Finalize_Address attribute if not already
7018 (Deallocate_Any_Controlled): Use the offset rather than the size of the
7019 header when converting the beginning of the object to a FM_Node.
7021 2011-08-29 Gary Dismukes <dismukes@adacore.com>
7023 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
7024 reraise when compiling for CodePeer.
7026 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7028 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
7029 now needed by a-convec.adb. Fix warning.
7031 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7033 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
7034 processing of TSS routine Finalize_Address when compiling in
7037 2011-08-29 Thomas Quinot <quinot@adacore.com>
7039 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
7040 sem_warn.adb: Minor reformatting.
7042 2011-08-29 Emmanuel Briot <briot@adacore.com>
7044 * prj-conf.adb (Get_Config_Switches): Also collect the list of
7045 languages from aggregated projects.
7047 2011-08-29 Yannick Moy <moy@adacore.com>
7049 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
7050 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7051 Traverse_Package_Declaration, Traverse_Subprogram_Body,
7052 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
7053 for stubs are traversed too when parameter is set
7054 (Traverse_All_Compilation_Units): Traverse without going inside stubs
7055 (Traverse_Declarations_Or_Statements): Do the special traversing for
7056 stubs when required.
7057 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
7058 return subprogram or package body from stub.
7059 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
7060 stubs without prior subprogram decl.
7062 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
7064 * gnat_ugn.texi: Fix typo.
7066 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7068 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
7069 which accounts for size vs alignment issues and calculates the size of
7071 (Deallocate_Any_Controlled): Ditto.
7072 (Nearest_Multiple_Rounded_Up): New routine.
7074 2011-08-29 Tristan Gingold <gingold@adacore.com>
7076 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
7077 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
7078 (Set_Exception_Msg): Ditto.
7079 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
7081 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
7082 Use Save_Occurrence instead of Save_Occurrence_No_Private.
7083 (Raise_With_Msg): Remove Cleanup_Flag.
7084 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
7085 Clean_Flag and Private_Data components.
7087 2011-08-29 Yannick Moy <moy@adacore.com>
7089 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
7091 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
7092 of an explicitly declared type, so that the base types of the original
7093 type and this generated type are the same, and a "type" (not a subtype
7095 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
7096 small" in Alfa mode, like in CodePeer mode.
7097 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
7098 clauses in Alfa mode.
7100 2011-08-29 Javier Miranda <miranda@adacore.com>
7102 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
7103 function to the package spec.
7104 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
7105 internally generated bodies of null procedures locate the internally
7106 generated spec enforcing mode conformance.
7107 (Is_Interface_Conformant): Ensure that the controlling formal of the
7110 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7112 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
7113 reject the pragma if it appears to apply to a formal subprogram.
7115 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7117 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
7118 inner expression, to prevent double evaluation.
7120 2011-08-29 Tristan Gingold <gingold@adacore.com>
7122 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
7124 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
7125 * a-except-2005.adb (Propagate_Exception): Adjust spec.
7126 (Raise_Current_Excep): Adjust call.
7127 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
7129 2011-08-29 Thomas Quinot <quinot@adacore.com>
7131 * exp_disp.adb: Minor reformatting.
7133 2011-08-29 Tristan Gingold <gingold@adacore.com>
7135 * a-exexpr.adb (Setup_Exception): Removed.
7136 * a-exexpr-gcc.adb (Setup_Exception): Removed.
7137 * a-except.adb (Exception_Propagation): Removed.
7138 * a-except-2005.adb (Setup_Exception): Removed.
7139 (Reraise): Remove call to Setup_Exception.
7140 (Reraise_Occurrence): Ditto.
7141 (Reraise_Occurrence_Always): Ditto.
7142 (Reraise_Occurrence_No_Defer): Ditto.
7143 (Transfer_Occurrence): Ditto.
7144 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
7145 (Set_Exception_Msg): Ditto.
7147 2011-08-29 Robert Dewar <dewar@adacore.com>
7149 * a-convec.adb, exp_disp.adb: Minor reformatting.
7151 2011-08-29 Tristan Gingold <gingold@adacore.com>
7153 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
7155 2011-08-29 Gary Dismukes <dismukes@adacore.com>
7157 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
7158 Exception_Handlers to No_List instead of Empty_List in the case where
7159 there are no handlers.
7161 2011-08-29 Tristan Gingold <gingold@adacore.com>
7163 * gcc-interface/gigi.h (enum standard_datatypes): Add
7164 ADT_reraise_zcx_decl
7165 (reraise_zcx_decl): New macro.
7166 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
7167 (gigi): Set reraise_zcx_decl.
7168 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
7169 (gnat_to_gnu): Handle N_Raise_Statement.
7171 2011-08-29 Robert Dewar <dewar@adacore.com>
7173 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
7174 a-undesu.adb: Minor reformatting.
7176 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7178 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
7179 table, accept an unfrozen untagged component if it is an actual for a
7180 formal incomplete type.
7181 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
7182 provide new iterator forms over vectors.
7183 Introduce type Iterator in package body to implement operations of
7184 Reversible_Iterator interface.
7185 * a-iteint.ads: Make package pure so it is usable with new container
7186 packages, that are categorized Remote_Types.
7188 2011-08-29 Robert Dewar <dewar@adacore.com>
7190 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
7192 2011-08-29 Bob Duff <duff@adacore.com>
7194 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
7195 of <>, because this is the routine that checks for dimensionality
7196 errors (for example, for a two-dimensional array, (others => <>) should
7197 be (others => (others => <>)).
7199 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7201 * impunit.adb: Add new run-time units.
7202 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
7203 s-stposu.ads, s-stposu.adb: Code clean up.
7204 Handle protected class-wide or task class-wide types
7205 Handle C/C++/CIL/Java types.
7206 * s-spsufi.adb, s-spsufi.ads: New files.
7208 2011-08-29 Yannick Moy <moy@adacore.com>
7210 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
7211 library-level subprogram.
7212 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
7214 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
7216 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
7218 * gnat_rm.texi: Update doc for Test_Case pragma.
7220 2011-08-29 Tristan Gingold <gingold@adacore.com>
7222 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
7224 (GCC_Exception_Access): New type.
7225 (Unwind_DeleteException): New imported procedure
7226 (Foreign_Exception): Import it.
7227 (GNAT_GCC_Exception): Simply have the occurrence inside.
7228 (To_GCC_Exception): New function.
7229 (To_GNAT_GCC_Exception): New function.
7230 (GNAT_GCC_Exception_Cleanup): New procedure..
7231 (Propagate_GCC_Exception): New procedure.
7232 (Reraise_GCC_Exception): New procedure.
7233 (Setup_Current_Excep): New procedure.
7234 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
7235 (Unwind_RaiseException): Ditto.
7236 (Unwind_ForcedUnwind): Ditto.
7238 (Begin_Handler): Change type of parameter.
7239 (End_Handler): Ditto. Now delete the exception if still present.
7240 (Setup_Key): Removed.
7241 (Is_Setup_And_Not_Propagated): Removed.
7242 (Set_Setup_And_Not_Propagated): Ditto.
7243 (Clear_Setup_And_Not_Propagated): Ditto.
7244 (Save_Occurrence_And_Private): Ditto.
7245 (EID_For): Add 'not null' constraint on parameter.
7246 (Setup_Exception): Does nothing.
7247 (Propagate_Exception): Simplified.
7248 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
7249 re-raise is not expanded anymore.
7250 * s-except.ads (Foreign_Exception): New exception - placeholder for
7252 * raise-gcc.c (__gnat_setup_current_excep): Declare
7253 (CXX_EXCEPTION_CLASS): Define (not yet used)
7254 (GNAT_EXCEPTION_CLASS): Define.
7255 (is_handled_by): Handle foreign exceptions.
7256 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
7258 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7260 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
7262 2011-08-29 Thomas Quinot <quinot@adacore.com>
7264 * a-synbar-posix.adb: Minor reformatting.
7266 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7268 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
7269 a-exetim-default.ads (Interrupt_Clocks_Supported,
7270 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
7271 definitions to be compliant with AI-0171. The target systems do not
7272 support separate account for the execution time of interrupt handlers.
7274 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7276 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
7277 in the barrier to put first the easiest to evaluate (and the one which
7278 will be True more often). More efficient.
7280 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7282 * s-atocou-x86.adb: Fix constraint in machine code insertion.
7284 2011-08-29 Bob Duff <duff@adacore.com>
7286 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
7287 attributes that are now aspects, as specified by AI05-0229-1.
7288 * sem_ch13.adb (Analyze_Aspect_Specifications,
7289 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
7290 pragmas or attribute references, as appropriate.
7292 2011-08-29 Robert Dewar <dewar@adacore.com>
7294 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
7295 a-synbar-posix.ads: Minor reformatting.
7297 2011-08-29 Yannick Moy <moy@adacore.com>
7299 * snames.ads-tmpl: Add name Force.
7301 2011-08-29 Pascal Obry <obry@adacore.com>
7303 * prj-nmsc.adb: Minor reformatting.
7305 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7307 * a-exetim.ads (Interrupt_Clocks_Supported,
7308 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
7309 definitions to be compliant with AI-0171.
7311 2011-08-29 Robert Dewar <dewar@adacore.com>
7313 * a-ngelfu.adb: Add comments.
7315 2011-08-29 Geert Bosch <bosch@adacore.com>
7317 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
7318 the closest machine number to Pi / 2.0.
7320 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7322 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
7323 package Ada.Synchronous_Barriers.
7324 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
7325 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
7326 default implementation using protected objects and another one
7327 a-synbar-posix using POSIX barriers as the underlying support.
7328 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
7329 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
7330 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
7331 Clean up dependencies.
7332 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
7334 2011-08-29 Robert Dewar <dewar@adacore.com>
7336 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
7337 exp_dist.adb: Minor code reorganization.
7340 2011-08-29 Thomas Quinot <quinot@adacore.com>
7342 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
7343 primitive operation must support external streaming if it is not a
7344 controlling access result.
7346 2011-08-29 Thomas Quinot <quinot@adacore.com>
7348 * sinfo.ads, sem_ch7.adb: Minor reformatting.
7350 2011-08-29 Bob Duff <duff@adacore.com>
7352 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
7353 restriction on allocators, as required by AI05-0013-1.
7354 * restrict.ads: Minor comment fix.
7356 2011-08-29 Tristan Gingold <gingold@adacore.com>
7358 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
7359 (To_Jmpbuf_Address): Ditto
7360 (builtin_longjmp): Ditto
7362 2011-08-29 Thomas Quinot <quinot@adacore.com>
7364 * sem_res.adb: Minor reformatting.
7366 2011-08-29 Vincent Celier <celier@adacore.com>
7368 * make.adb (Gnatmake): Move special processing for VM targets after the
7369 call to Get_Target_Parameters.
7371 2011-08-29 Thomas Quinot <quinot@adacore.com>
7373 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
7375 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7377 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
7378 where an anonymous access discriminant of a limited designated type
7379 appears in a non-immutably limited discriminated type and issue an
7380 error message. Add local variable Desig_T and replace all occurrences
7383 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7385 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
7386 implementation is compliant to RM D.15(15/2) after the modification
7387 imposed by AI05-0094-1 (binding interpretation).
7389 2011-08-29 Robert Dewar <dewar@adacore.com>
7391 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
7392 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
7394 2011-08-29 Thomas Quinot <quinot@adacore.com>
7396 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
7397 the scope name, do not report a missing label as a style violation (it
7398 will be diagnosed as an illegality).
7399 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
7400 variant records: Get_Enum_Lit_From_Pos already returns a usage
7401 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
7402 on Expr in Integer_Literal case so that it can be used by
7405 2011-08-29 Tristan Gingold <gingold@adacore.com>
7407 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
7409 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
7410 (Build_Abort_Block_Handler): New function to build an Abort_Signal
7412 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
7413 Build_Abort_Block_Handler to build the exception handler. Do not
7414 undefer aborts for the Abort_Signal exception handler if back-end
7415 exception mechanism.
7416 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
7417 back_end exceptions for all others and abort_signal.
7418 * s-except.ads (ZCX_By_Default): New constant.
7419 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
7420 (Raise_Exception_Always): Ditto.
7421 (Raise_From_Signal_Handler): Ditto.
7422 (Raise_With_Location_And_Msg): Ditto.
7423 (Raise_With_Msg): Ditto.
7425 (Reraise_Occurence): Ditto.
7426 (Reraise_Occurrence_Always): Ditto.
7427 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
7428 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
7430 2011-08-29 Thomas Quinot <quinot@adacore.com>
7432 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
7434 2011-08-29 Robert Dewar <dewar@adacore.com>
7436 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
7437 Minor code reorganization.
7439 2011-08-29 Bob Duff <duff@adacore.com>
7441 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
7442 2012, not just Ada 2005.
7444 2011-08-29 Vincent Celier <celier@adacore.com>
7446 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
7447 with a project file or with gprbuid, if -gnatep= is specified, the
7448 builder may need to be invoked with -x.
7450 2011-08-29 Tristan Gingold <gingold@adacore.com>
7452 * a-exexpr-gcc.adb: Minor comment fix.
7454 2011-08-29 Robert Dewar <dewar@adacore.com>
7456 * sem_ch8.adb: Minor reformatting.
7458 2011-08-29 Bob Duff <duff@adacore.com>
7460 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
7461 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
7462 treating "some" as unreserved in earlier Ada versions. This is now
7463 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
7464 rather than Name_Some, since Tok_Some is now recognized as reserved.
7465 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
7467 * scans.ads: Minor comment fixes.
7468 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
7469 for other language versions.
7470 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
7471 treating "some" as unreserved in earlier Ada versions. This is now
7472 handled in Snames.Is_Keyword_Name.
7473 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
7475 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
7476 unreserved in earlier Ada versions. This is now handled in
7477 Snames.Is_Keyword_Name.
7478 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
7479 words as for other language versions.
7480 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
7481 Ada 2012, not just Ada 2005.
7483 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7485 * sem_ch13.adb: Additional semantic checks for aspects involved in
7488 2011-08-29 Matthew Heaney <heaney@adacore.com>
7490 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
7491 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
7492 Container parameter.
7493 (Ancestor_Find): ditto.
7495 2011-08-29 Thomas Quinot <quinot@adacore.com>
7497 * par-endh.adb: Minor reformatting.
7499 2011-08-29 Tristan Gingold <gingold@adacore.com>
7501 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
7502 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
7503 (Adjust_N_CLeanups_For): Remove.
7504 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
7506 (Propgate_Exception): Adjust.
7507 * raise-gcc.c: Add a few static/const.
7508 (Adjust_N_Cleanups_For): Remove declaration.
7509 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
7511 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7513 * sem_ch8.adb: Use type of function return when rewriting as object
7516 2011-08-29 Gary Dismukes <dismukes@adacore.com>
7518 * sem_type.adb: Minor reformatting.
7520 2011-08-29 Robert Dewar <dewar@adacore.com>
7522 * makeutl.adb: Minor reformatting.
7524 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7526 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
7527 function call of a limited type, the expansion of the renaming is
7528 complicated by the presence of various temporaries and subtypes that
7529 capture constraints of the renamed object.
7530 Rewrite node as an object declaration, whose expansion is simpler.
7531 Given that the object is limited there is no copy involved and no
7534 2011-08-29 Robert Dewar <dewar@adacore.com>
7536 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
7537 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
7539 2011-08-29 Tristan Gingold <gingold@adacore.com>
7541 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
7542 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
7543 system-linux-hppa.ads, system-linux-s390.ads,
7544 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
7545 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
7546 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
7547 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
7548 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
7549 system-solaris-sparc.ads, system-lynxos-x86.ads,
7550 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
7551 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
7552 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
7553 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7554 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
7555 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
7556 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
7557 * opt.ads: Adjust comment.
7558 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
7559 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
7560 * system.ads: Move GCC_ZCX_Support to obsolete entries.
7562 2011-08-29 Emmanuel Briot <briot@adacore.com>
7564 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
7565 file name is specified on the gnatmake or gprbuild command line, and
7566 before we search for that file in the project.
7568 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7570 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
7571 used to determine whether a possible interpretation for an overloadable
7572 entity is declared within the current instantiation and should be
7573 included in the candidate set.
7575 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
7577 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
7579 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7581 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
7582 access subtype is access_to_subprogram, when applying checks for
7585 2011-08-29 Matthew Heaney <heaney@adacore.com>
7587 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
7588 for sibling when common parent.
7590 2011-08-29 Thomas Quinot <quinot@adacore.com>
7592 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
7595 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7597 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
7598 for the return type when in ASIS mode.
7600 2011-08-29 Vincent Celier <celier@adacore.com>
7602 * make.adb (Gnatmake): Get the default search dirs, then the target
7603 parameters after getting the Builder switches, as the Builder switches
7604 may include --RTS= and that could change the default search dirs.
7606 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7608 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
7609 Make_Final_Call. Move the processing for class-wide types before the
7610 processing for derivations from [Limited_]Controlled.
7611 (Make_Final_Call): Move the processing for class-wide types before the
7612 processing for derivations from [Limited_]Controlled.
7613 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
7614 Add code to account for alignments larger than the list header. Add a
7615 comment illustrating the structure of the allocated object + padding +
7617 (Deallocate_Any_Controlled): Add code to account for alignments larger
7618 than the list header.
7620 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7622 * sinfo.ads, sinfo.adb: New node kind
7623 N_Formal_Incomplete_Type_Definition, related flags.
7624 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
7625 Parse formal incomplete types.
7626 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
7628 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
7629 Formal incomplete types do not need completion.
7630 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
7631 Validate_Incomplete_Type_Instance): New procedures to handle formal
7633 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
7634 that corresponds to a formal incomplete type.
7635 * sprint.adb: Handle formal incomplete type declarations.
7636 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
7639 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7641 * a-fihema.ads, a-fihema.adb: Unit removed.
7642 * a-undesu.ads, a-undesu.adb: New unit implementing
7643 Ada.Unchecked_Deallocate_Subpool.
7644 * einfo.adb: Remove Associated_Collection from the node usage.
7645 Add Finalization_Master to the node usage.
7646 (Associated_Collection): Removed.
7647 (Finalization_Master): New routine.
7648 (Set_Associated_Collection): Removed.
7649 (Set_Finalization_Master): New routine.
7650 (Write_Field23_Name): Remove Associated_Collection from the output. Add
7651 Finalization_Master to the output.
7652 * einfo.ads: Remove attribute Associated_Collection and its uses in
7654 Add new attribute Finalization_Master along with its uses in entitites.
7655 (Associated_Collection): Removed along with its pragma import.
7656 (Finalization_Master): New routine along with a pragma import.
7657 (Set_Associated_Collection): Removed along with its pragma import.
7658 (Set_Finalization_Master): New routine along with a pragma import.
7659 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
7660 Build_Finalization_Collection with Build_Finalization_Master.
7661 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
7662 before the bodies of the predefined routines. Add comment explaining
7663 this. Replace call to Build_Finalization_Collection with
7664 Build_Finalization_Master.
7665 (Freeze_Type): Replace call to Build_Finalization_Collection with
7666 Build_Finalization_Master.
7667 (Make_Finalize_Address_Body): Comment reformatting.
7668 (Make_Predefined_Primitive_Specs): Code reformatting.
7669 (Stream_Operation_OK): Update comment mentioning finalization
7670 collections. Replace RE_Finalization_Collection with
7671 RE_Finalization_Master.
7672 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
7673 Associated_Collection with Finalization_Master. Replace call to
7674 Build_Finalization_Collection with Build_Finalization_Master.
7675 (Expand_Allocator_Expression): Replace call to Associated_Collection
7676 with Finalization_Master. Replace call to Set_Associated_Collection with
7677 Set_Finalization_Master. Remove the generation of
7678 Set_Finalize_Address_Ptr.
7679 (Expand_N_Allocator): Replace call to Associated_Collection with
7680 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
7681 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
7682 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
7683 comment on usage. Replace call to Needs_BIP_Collection with
7684 Needs_BIP_Finalization_Master Remplace BIP_Collection with
7685 BIP_Finalization_Master. Update all comments which mention finalization
7686 collections. Replace Associated_Collection with
7687 Finalization_Master. Replace Build_Finalization_Collection with
7688 Build_Finalization_Master.
7689 (BIP_Formal_Suffix): Update BIP_Collection's case.
7690 (Build_Heap_Allocator): Update the related comment. Rename local
7691 variable Collect to Fin_Mas_Id and update its occurrences. Update
7692 comments which mention finalization collections. Replace
7693 Set_Associated_Collection with Set_Finalization_Master.
7694 (Expand_Call): Update the code which detects a special piece of library
7696 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
7697 Add_Collection_Actual_To_Build_In_Place_Call with
7698 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
7699 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
7700 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
7701 Add_Collection_Actual_To_Build_In_Place_Call with
7702 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7703 (Make_Build_In_Place_Call_In_Assignment): Replace call to
7704 Add_Collection_Actual_To_Build_In_Place_Call with
7705 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7706 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7707 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
7708 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7709 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
7710 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
7711 Replace call to Set_Associated_Collection with Set_Finalization_Master.
7712 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
7713 Replace the call to Associated_Collection with Finalization_Master.
7714 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
7715 Update the way finalization master names are generated. Update the
7716 retrieval of the correct access type which will carry the pool and
7718 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
7719 (Make_Finalize_Address_Body): Abstract types do not need
7720 Finalize_Address. Code reformatting.
7721 (Make_Finalize_Address_Stmts): Update comment on usage.
7722 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7723 (Process_Declarations): Update comments.
7724 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
7725 Build_Finalization_Master. Update associated comment.
7726 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7727 * exp_ch13.adb: Update comments which mention finalization collections.
7728 (Expand_N_Free_Statement): Replace the call to Associated_Collection
7729 with Finalization_Master.
7730 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
7731 create calls to routines Allocate_Any_Controlled and
7732 Deallocate_Any_Controlled.
7733 (Find_Finalize_Address): New routine.
7734 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
7736 (Requires_Cleanup_Actions): Update the comment on freeze node
7738 * exp_util.ads: Remove comment on generated code for
7739 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
7740 is better to simply look in the body.
7741 * freeze.adb (Freeze_All): Update the comment of finalization
7742 collections. Replace the call to Associated_Collection with
7743 Finalization_Master. Replace the call to Build_Finalization_Collection
7744 with Build_Finalization_Master.
7745 * impunit.adb: Add a-undesu and s-stposu to the list of units.
7746 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
7748 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
7749 Ada.Finalization. Add processing for children of System.Storage_Pools.
7750 * rtsfind.ads: Remove the naming of second level children of
7752 Remove Ada_Finalization_Heap_Management from the list of units.
7753 Remove subtype Ada_Finalization_Child.
7754 Remove the following subprogram entities:
7758 RE_Finalization_Collection
7759 RE_Finalization_Collection_Ptr
7760 RE_Set_Finalize_Address_Ptr
7762 Add the naming of second level children of System.Storage_Pools.
7763 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
7765 Add subtype System_Storage_Pools_Child.
7766 Add the following subprogram entities to System.Finalization_Masters:
7768 RE_Finalization_Master
7769 RE_Finalization_Master_Ptr
7771 Add the following subprogram entities to System.Storage_Pools.Subpools:
7773 RE_Allocate_Any_Controlled
7774 RE_Deallocate_Any_Controlled
7775 RE_Root_Storage_Pool_With_Subpools
7779 Move the following subprogram entities from
7780 Ada.Finalization.Heap_Management to System.Finalization_Masters:
7782 RE_Add_Offset_To_Address
7787 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
7788 Set_Associated_Collection with Set_Finalization_Master.
7789 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
7790 BIP_Finalization_Master is created.
7791 * s-finmas.adb: New unit System.Finalization_Masters.
7792 * s-finmas.ads: New unit System.Finalization_Masters.
7793 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
7794 * s-stposu.ads, s-stposu.adb: New unit implementing
7795 System.Storage_Pools.Subpools.
7797 2011-08-29 Bob Duff <duff@adacore.com>
7799 * tbuild.adb: Add assertion.
7801 2011-08-29 Thomas Quinot <quinot@adacore.com>
7803 * s-pooglo.adb: Minor reformatting.
7805 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7807 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
7808 an indexed component of a packed array whose element type is a record
7809 with a representation clause different from that of the right-hand
7810 side, generate a temporary to minimuze the number of bit-field
7811 operations generated.
7813 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7815 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
7816 declarations, and thus are likely insertion points for actions.
7818 2011-08-29 Bob Duff <duff@adacore.com>
7820 * einfo.ads: Minor comment fix.
7822 2011-08-29 Robert Dewar <dewar@adacore.com>
7824 * frontend.adb, gnat1drv.adb: Minor reformatting.
7826 2011-08-29 Tristan Gingold <gingold@adacore.com>
7828 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
7829 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
7830 space in front of the header.
7832 2011-08-29 Johannes Kanig <kanig@adacore.com>
7834 * frontend.adb (Frontend): Exit after creating Standard package when
7835 -gnatd.H is present.
7836 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
7839 2011-08-29 Robert Dewar <dewar@adacore.com>
7841 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
7842 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
7843 snames.ads-tmpl: Minor reformatting.
7845 2011-08-29 Philippe Gil <gil@adacore.com>
7847 * prj.adb (Reset_Units_In_Table): New procedure.
7848 Reset units to avoid access to freed memory.
7850 2011-08-29 Thomas Quinot <quinot@adacore.com>
7852 * get_scos.adb: When reading a P statement SCO without a pragma name
7853 (from an older ALI file), ensure that the Pragma_Name component is set
7854 to Unknown_Pragma (not left uninitialized).
7856 2011-08-29 Vincent Celier <celier@adacore.com>
7858 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
7859 modified to compute correctly the object path of a SAL project that is
7860 extending another library project.
7861 (Write_Path_File): New procedure.
7862 * makeutl.ads (Directories): New table moved from Buildgpr
7863 (Get_Directories): New procedure moved from Buildgpr
7864 (Write_Path_File): New procedure
7865 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
7866 paths before binding SALs, instead of Set_Ada_Paths.
7867 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
7869 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
7870 (Current_Source_Path_File_Of): New function
7871 (Set_Current_Object_Path_File_Of): New procedure
7872 (Current_Source_Object_File_Of): New function
7873 (Set_Current_Object_Path_File_Of): New procedure
7874 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
7875 (Current_Source_Path_File_Of): New function
7876 (Set_Current_Object_Path_File_Of): New procedure
7877 (Current_Source_Object_File_Of): New function
7878 (Set_Current_Object_Path_File_Of): New procedure
7880 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7882 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7883 packed entity, use a bit-field assignment only if there is no change of
7886 2011-08-29 Thomas Quinot <quinot@adacore.com>
7888 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7889 Is_RTU instead of using Chars comparisons.
7891 2011-08-29 Thomas Quinot <quinot@adacore.com>
7893 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7894 temporary object if the actual is constrained, and the discriminants
7895 read from the stream don't match.
7897 2011-08-29 Tristan Gingold <gingold@adacore.com>
7899 * sem_attr.adb, exp_attr.adb: Add handling of
7900 Attribute_System_Allocator_Alignment
7901 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7902 Attribute_System_Allocator_Alignment.
7903 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7904 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7905 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7906 get_target_system_allocator_alignment.
7908 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7910 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7913 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7915 * exp_ch3.adb (In_Runtime): Fix typo.
7917 2011-08-29 Bob Duff <duff@adacore.com>
7919 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7921 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7923 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7924 and a separate tag assignment is generated, ensure that the tag
7925 assignment is analyzed.
7927 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7929 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7930 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7931 of statement lists that may contain local declarations.
7932 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7933 duplicate the triggering statements needed for the expansion of this
7934 construct, when the trigger is a dispatching call to a synchronized
7937 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7939 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7940 * bindgen.adb: Add comments.
7941 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7944 2011-08-29 Robert Dewar <dewar@adacore.com>
7946 * exp_attr.adb: Minor reformatting.
7947 Minor code reorganization and commenting.
7948 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7951 2011-08-29 Thomas Quinot <quinot@adacore.com>
7953 * get_scos.adb: Ignore chaining indicators not currently supported
7956 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7958 * system.ads: Minor editing.
7960 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7962 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7964 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7965 Attribute_Elab_Subp_Body.
7966 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7967 * sem_util.adb: Update comments.
7969 2011-08-29 Thomas Quinot <quinot@adacore.com>
7971 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7972 pragma name for each SCO statement corresponding to a pragma.
7974 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7976 * opt.ads: Minor editing.
7978 2011-08-29 Yannick Moy <moy@adacore.com>
7980 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7981 that only made sense for CodePeer mode.
7983 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7985 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7986 which is no longer used.
7987 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7988 handling of the 64-bit division check.
7989 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7991 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7994 2011-08-29 Thomas Quinot <quinot@adacore.com>
7996 * get_scos.adb: Minor reformatting.
7998 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
8000 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
8001 statement list is wrapped in a block, the block is explicitly analyzed
8002 in order to properly redecorate the entities and create a servicing
8005 2011-08-29 Tristan Gingold <gingold@adacore.com>
8007 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
8008 (Set_Zero_Cost_Handling): Remove.
8010 2011-08-29 Thomas Quinot <quinot@adacore.com>
8012 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
8014 2011-08-29 Geert Bosch <bosch@adacore.com>
8016 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
8017 instruction, as the latter may produce -0.0, which is not a valid VAX
8019 (Neg_G): Likewise for VAX F float.
8021 2011-08-29 Robert Dewar <dewar@adacore.com>
8023 * exp_util.adb: Minor reformatting.
8025 2011-08-29 Yannick Moy <moy@adacore.com>
8027 * sem_ch3.adb: Minor comment update.
8029 2011-08-29 Thomas Quinot <quinot@adacore.com>
8031 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
8034 2011-08-29 Thomas Quinot <quinot@adacore.com>
8036 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
8037 current statement sequence on a generic instantiation or a subprogram
8040 2011-08-29 Robert Dewar <dewar@adacore.com>
8042 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
8045 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
8047 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8048 Correct the check which involves the freeze node of a controlled or
8049 access-to-controlled type.
8051 2011-08-29 Geert Bosch <bosch@adacore.com>
8053 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
8055 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
8058 2011-08-29 Yannick Moy <moy@adacore.com>
8060 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
8061 for every index type and component type that is not a subtype_mark.
8062 (Process_Subtype): Set Etype of subtype.
8064 2011-08-29 Robert Dewar <dewar@adacore.com>
8066 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
8067 reorganization. Minor reformatting.
8069 2011-08-29 Steve Baird <baird@adacore.com>
8071 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
8072 for CodePeer and ALFA modes.
8074 2011-08-29 Ed Schonberg <schonberg@adacore.com>
8076 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
8077 that comes from an enclosing scope if it is not the renaming of an
8078 actual, to handle properly a spurious ambiguity in an instance.
8080 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
8082 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
8083 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
8084 use it instead of the Esize of the first parameter.
8085 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
8087 <Size>: Likewise. Call it for composite types on the RM size.
8089 2011-08-29 Yannick Moy <moy@adacore.com>
8091 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
8092 * sem_util.adb (Unique_Name): Correct behaviour for names of
8095 2011-08-29 Yannick Moy <moy@adacore.com>
8097 * sem_prag.adb (Check_Precondition_Postcondition): In formal
8098 verification mode, analyze pragma expression for correctness, for
8099 pre/post on library-level subprogram, as it is not expanded later.
8101 2011-08-29 Yannick Moy <moy@adacore.com>
8103 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
8104 in formal verification.
8106 2011-08-29 Thomas Quinot <quinot@adacore.com>
8108 * sem_util.adb: Minor reformatting.
8109 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
8111 * par_sco.ads, par_sco.adb: Update comments.
8113 2011-08-29 Yannick Moy <moy@adacore.com>
8115 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
8116 associated getter/setter.
8117 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
8119 2011-08-29 Vincent Celier <celier@adacore.com>
8121 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
8122 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
8123 with declarations for Language_Kind and Dependency_Kind for Ada.
8124 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
8125 (Process_Compiler): Take into account the new attributes Dependency_Kind
8127 (Check_Configuration): Check if language kind is unit based, not if the
8128 language name is Ada.
8129 (Process_Exceptions_Unit_Based): Ditto
8130 (Add_Language): Remove default additions of language and dependency kind
8131 * prj.ads: Minor comment change
8132 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
8134 2011-08-29 Johannes Kanig <kanig@adacore.com>
8136 * debug.adb: Update comments.
8138 2011-08-24 Joseph Myers <joseph@codesourcery.com>
8140 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
8141 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
8142 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
8143 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
8144 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
8146 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8148 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
8149 (GNATLIBCFLAGS_FOR_C): Replace
8150 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
8151 (gnatlib-shared-default, gnatlib-shared-dual-win32)
8152 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
8153 (gnatlib-sjlj, gnatlib-zcx): Likewise.
8155 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
8157 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
8159 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
8161 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
8163 2011-08-05 Nicolas Roche <roche@adacore.com>
8165 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
8166 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
8168 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
8170 2011-08-05 Matthew Heaney <heaney@adacore.com>
8172 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
8173 subprogram bodies declared out-of-order.
8175 2011-08-05 Yannick Moy <moy@adacore.com>
8177 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
8178 entities directly in package Standard, otherwise skip the standard
8181 2011-08-05 Robert Dewar <dewar@adacore.com>
8183 * a-cbmutr.adb: Minor reformatting
8184 (Allocate_Node): refactor node allocation algorithm
8186 2011-08-05 Robert Dewar <dewar@adacore.com>
8188 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
8189 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
8191 (Analyze_Pragma, case Check_Policy): Ditto.
8192 * sem_prag.ads (Check_Disabled): New function
8193 * snames.ads-tmpl: Add Name_Disable.
8195 2011-08-05 Robert Dewar <dewar@adacore.com>
8197 * gnat_rm.texi: Document implementation-defined policy DISABLE for
8198 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
8200 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8202 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
8203 that appears in a generic formal part and applies to a formal
8206 2011-08-05 Robert Dewar <dewar@adacore.com>
8208 * a-cbmutr.ads: Minor reformatting.
8210 2011-08-05 Matthew Heaney <heaney@adacore.com>
8212 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
8213 to check count, check sign of value instead.
8214 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
8215 (Copy_Subtree): allocate copy of source element
8216 (Equal_Subtree): compare elements, not access objects
8218 2011-08-05 Vincent Celier <celier@adacore.com>
8220 * gnat_ugn.texi: Fix VMS alternative.
8222 2011-08-05 Thomas Quinot <quinot@adacore.com>
8224 * sem_ch11.adb: Add comment.
8226 2011-08-05 Robert Dewar <dewar@adacore.com>
8228 * exp_util.adb: Minor comment fix.
8230 2011-08-05 Robert Dewar <dewar@adacore.com>
8232 * scng.adb (Error_Unterminated_String): Improve flag position when
8235 2011-08-05 Matthew Heaney <heaney@adacore.com>
8237 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
8239 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
8240 multiway tree containers.
8242 2011-08-05 Robert Dewar <dewar@adacore.com>
8244 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
8245 * stylesw.adb: Implement -gnatyC to control comment spacing
8246 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
8248 * usage.adb: Add line for -gnatyC.
8250 2011-08-05 Robert Dewar <dewar@adacore.com>
8252 * gnat_ugn.texi: Document -gnatyC.
8253 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
8254 synonym for COMMENTS2).
8256 2011-08-05 Robert Dewar <dewar@adacore.com>
8258 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
8259 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
8260 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
8261 a-comutr.ads, lib-xref.adb: Minor reformatting.
8263 2011-08-05 Robert Dewar <dewar@adacore.com>
8265 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
8266 warning if there is an exception handler present.
8268 2011-08-05 Pascal Obry <obry@adacore.com>
8270 * a-iteint.ads: Fix copyright year.
8272 2011-08-05 Thomas Quinot <quinot@adacore.com>
8274 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
8275 statement SCO for a USE clause or a representation clause.
8277 2011-08-05 Yannick Moy <moy@adacore.com>
8279 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
8280 between body and spec for stub.
8281 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
8282 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
8283 pragma precondition or postcondition, for which the enclosing
8284 subprogram or package in the AST is not the desired one, return empty.
8286 2011-08-05 Thomas Quinot <quinot@adacore.com>
8288 * g-expect.adb: Minor reformatting.
8290 2011-08-05 Bob Duff <duff@adacore.com>
8292 * a-fihema.adb: Comment out OS_Lib.
8294 2011-08-05 Matthew Heaney <heaney@adacore.com>
8296 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
8297 (unbounded multiway tree containers) and a-iteint.ads.
8298 * a-comutr.ads, a-comutr.adb:
8299 This is the new Ada 2012 unit for unbounded multiway tree containers
8300 * a-cimutr.ads, a-cimutr.adb
8301 This is the new Ada 2012 unit for indefinite multiway tree containers
8302 * a-iteint.ads: New file.
8304 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8306 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
8308 2011-08-05 Bob Duff <duff@adacore.com>
8310 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
8312 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
8314 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8316 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
8317 general indexing aspects of Ada2012. Called when analyzing indexed
8318 components when other interpretations fail.
8319 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
8320 in an expression context where overloading is meaningful. This excludes
8321 the occurrence in an aspect specification (efficiency only).
8322 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
8323 related to iterators can be set by an attribute specification, but
8325 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
8326 Constant_Indexing and Variable_Indexing.
8327 (Check_Indexing_Functions): New procedure to perform legality checks.
8328 Additional semantic checks at end of declarations.
8330 2011-08-05 Sergey Rybin <rybin@adacore.com>
8332 * tree_io.ads: Update ASIS_Version_Number because of the change of the
8333 order of calling Tree_Write/Tree_Read routines made for aspects.
8335 2011-08-05 Bob Duff <duff@adacore.com>
8337 * a-fihema.adb (Finalize): Fix race condition.
8339 2011-08-05 Yannick Moy <moy@adacore.com>
8341 * sem_ch12.adb (Analyze_Package_Instantiation,
8342 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
8345 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8347 * sem_type.adb (Specific_Type): in an instance, the type-specific
8348 operand of an equality check that involves null may have a private
8349 type. Use full view to determine legality of construct.
8351 2011-08-05 Vincent Celier <celier@adacore.com>
8353 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8354 delete or close the file when the call to gnatmake was successful.
8356 2011-08-05 Yannick Moy <moy@adacore.com>
8358 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
8359 Global_Discard_Names.
8361 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8363 * sinfo.ads: comments on use of entity field for aspect specifications.
8365 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8367 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
8368 node is not itself an entity but a selected component, it is a
8369 rewritten parameterless call to an en enclosing synchronized operation,
8370 and this expansion will be performed again in the instance, so there is
8371 no global information to preserve.
8373 2011-08-05 Javier Miranda <miranda@adacore.com>
8375 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
8376 for renamings of predefined primitives.
8377 (In_Predef_Prims_DT): New subprogram.
8379 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8381 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
8382 possible interpretation of name is a reference type, add an
8383 interpretation that is the designated type of the reference
8384 discriminant of that type.
8385 * sem_res.adb (resolve): If the interpretation imposed by context is an
8386 implicit dereference, rewrite the node as the deference of the
8387 reference discriminant.
8388 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
8389 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
8390 parent type or base type.
8391 * sem_ch4.adb (Process_Indexed_Component,
8392 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
8393 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
8394 Check for implicit dereference.
8395 (List_Operand_Interps): Indicate when an implicit dereference is
8397 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
8399 2011-08-05 Thomas Quinot <quinot@adacore.com>
8401 * scos.ads: Update documentation of SCO table. Pragma statements can now
8402 be marked as disabled (using 'p' instead of 'P' as the statement kind).
8403 * par_sco.ads, par_sco.adb: Implement the above change.
8404 (Process_Decisions_Defer): Generate a P decision for the first parameter
8405 of a dyadic pragma Debug.
8406 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
8408 * put_scos.adb: Code simplification based on above change.
8410 2011-08-05 Robert Dewar <dewar@adacore.com>
8412 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
8413 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
8414 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
8415 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
8417 2011-08-05 Bob Duff <duff@adacore.com>
8419 * a-stunau.ads, g-spipat.adb: Update comments.
8421 2011-08-05 Bob Duff <duff@adacore.com>
8423 * a-fihema.ads: Minor comment fix.
8424 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
8426 (Attach, Detach): Remove some unnecessary code.
8427 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
8429 2011-08-05 Bob Duff <duff@adacore.com>
8431 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
8432 allocation for Objects component. This simplifies the code somewhat. It
8433 is also a little more efficient in the not-so-unusual case where there
8434 are no controlled objects allocated.
8435 Make Finalization_Started flag atomic.
8436 (Finalize): Avoid unnecessary detachment of items from the list.
8437 (pcol): Minor cleanup.
8439 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8441 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
8442 package whose name is the same as that of the generic unit, or its
8445 2011-08-05 Bob Duff <duff@adacore.com>
8447 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
8448 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
8449 Minor comment fixes.
8451 2011-08-05 Arnaud Charlet <charlet@adacore.com>
8453 * make.adb (Linking_Phase): No longer need to set source search path
8454 before calling gnatlink in CodePeer mode.
8455 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
8456 gcc in CodePeer mode, since the binder generated file no longer has a
8458 * switch.ads, switch.adb (Is_Language_Switch): Removed.
8459 * switch-c.adb: Update comment.
8461 2011-08-05 Thomas Quinot <quinot@adacore.com>
8463 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
8465 2011-08-05 Nicolas Roche <roche@adacore.com>
8467 * gnat_ugn.texi: Fix minor syntax error issue.
8469 2011-08-05 Vincent Celier <celier@adacore.com>
8471 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8472 delete or close the file when the call to gnatmake returns a non
8473 successful return code.
8475 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8477 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
8478 check, indicate that the copy of the original node does not come from
8479 source, to prevent an infinite recursion of the expansion.
8481 2011-08-05 Johannes Kanig <kanig@adacore.com>
8483 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
8484 VC generation for subprogram bodies.
8486 2011-08-05 Yannick Moy <moy@adacore.com>
8489 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
8490 the base type with the smallest allowed base type.
8492 2011-08-05 Sergey Rybin <rybin@adacore.com>
8494 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
8497 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8499 * sem_ch12.ads: minor comment updates.
8501 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8503 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
8504 instantiation and a formal package the compiler generates a package
8505 renaming declaration so that the generic name within the declaration
8506 is interpreted as a renaming of the instance. At the end of a formal
8507 package declaration, this renaming must become invisible.
8509 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8511 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
8512 comparison and rely on concrete entities instead.
8514 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8516 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
8517 and discriminants, to indicate that the type has an access discriminant
8518 that supports implicit dereference.
8519 * snames.ads-tmpl: Add names of aspects and attributes related to
8520 Ada2012 iterators: constant_indexing, default_iterator,
8521 iterator_element, implicit_dereference, variable_indexing.
8522 * aspects.ads, aspects.adb: entries for iterator-related aspects.
8523 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
8524 iterator-related aspects.
8525 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
8527 2011-08-05 Sergey Rybin <rybin@adacore.com>
8529 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
8530 metrics in gnatmetric to cover new kinds of coupling mentrics.
8532 2011-08-05 Steve Baird <baird@adacore.com>
8534 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
8535 of calling the user-defined main subprogram.
8536 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
8537 is set) Call_Main_Subprogram ahead of, as opposed to
8539 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
8540 generation of a "with" of the user-defined main subprogram.
8541 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
8542 (which is now called from Gen_Main instead).
8544 2011-08-05 Emmanuel Briot <briot@adacore.com>
8546 * projects.texi: Added reference to the Makefile package.
8548 2011-08-05 Thomas Quinot <quinot@adacore.com>
8550 * exp_ch7.adb: Minor comment rewording.
8552 2011-08-05 Ed Falis <falis@adacore.com>
8554 * env.c: Fix comment.
8556 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8558 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
8559 character comparison and rely on concrete entities instead.
8561 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8563 * sem_ch3.adb: (Check_Private_Overriding): better error message,
8564 suggested by AI95-0068.
8566 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8568 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
8569 the two potential initialization calls. This accounts for any
8570 access-before-elaboration checks which may precede the initialization
8572 (Next_Suitable_Statement): New routine. Returns the next real statement
8573 after the input node while skipping generated checks.
8574 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
8575 with comment on usage.
8576 Do not generate Elaborate_All when the trigger is a finalization call
8577 coming from a type init proc.
8578 (Check_Elab_Call): Propagate the initialization procedure context to
8579 subsequent calls to Check_A_Call.
8580 (Check_Internal_Call_Continue): Propagate the initialization procedure
8581 context to subsequent calls to Check_Elab_Call.
8582 (Is_Finalization_Procedure): New routine. Returns True if the input
8583 entity denotes a [Deep_]Finalize routine.
8584 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
8585 along with comment on usage.
8587 2011-08-05 Vadim Godunko <godunko@adacore.com>
8589 * s-atocou.ads: Add list of supported platforms.
8591 2011-08-05 Yannick Moy <moy@adacore.com>
8593 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
8595 * opt.ads (Disable_ALI_File): new Boolean flag
8596 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
8598 2011-08-05 Ed Falis <falis@adacore.com>
8600 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
8601 environ is properly defined.
8603 2011-08-05 Vincent Celier <celier@adacore.com>
8605 * make.adb (Compilation_Phase): Exit immediately when all objects have
8606 been found up to date, to avoid multiple exit messages.
8607 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
8608 same project for languages with no compiler.
8609 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
8611 2011-08-05 Robert Dewar <dewar@adacore.com>
8613 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
8614 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
8615 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
8616 s-atocou-builtin.adb: Minor reformatting.
8618 2011-08-05 Yannick Moy <moy@adacore.com>
8620 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
8621 if the node to wrap is a pragma check, this node and enclosed
8622 expression are not expanded, so do not apply any transformations here.
8623 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
8624 introducing transient scopes.
8626 2011-08-05 Jose Ruiz <ruiz@adacore.com>
8628 * adaint.c (__gnat_set_writable, __gnat_set_readable,
8629 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
8630 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
8631 routine is available, so we use the default implementation of these
8633 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
8634 support for copying attributes on VxWorks 6.
8636 2011-08-05 Yannick Moy <moy@adacore.com>
8638 * debug.adb: Remove use of -gnatd.D.
8639 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
8640 * opt.ads: Simplify variables for ALFA mode, to keep one only
8641 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
8644 2011-08-05 Vincent Celier <celier@adacore.com>
8646 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
8647 Builder'Default_Switches.
8649 2011-08-05 Vincent Celier <celier@adacore.com>
8651 * makeusg.adb: Add lines for --create-map-file switches.
8653 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8655 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
8656 profile is incomplete and the full view is available, replace it with
8658 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
8659 incomplete, freezing the subprogram is delayed until the full view is
8661 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
8662 fixed-point multiplication operator and the predefined operator is
8663 resolved in favor of the user-defined one.
8665 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8667 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
8670 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8672 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
8673 whether a type lacks user-defined Read or Write operations, or has a
8674 component that lacks them.
8675 * sem_attr.adb (Check_Stream_Attribute): if restriction
8676 No_Default_Stream_Attributes is active, verify that all subcomponent
8677 types of the target have user-defined stream operations, and report
8679 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
8680 * exp_strm.adb: Build_Elementary_Input_Call,
8681 Build_Elementary_Write_Call): remove checks for restriction
8682 No_Default_Stream_Attributes, now checked in semantics.
8684 2011-08-04 Vincent Celier <celier@adacore.com>
8686 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
8687 switches on the command line, look for all valid --RTS switches in the
8688 Builder switches and for each language use the first runtime name found
8689 to invoke gprconfig.
8690 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
8691 command line and there is no auto-configuration.
8692 (Runtime_Name_Set_For): New function.
8694 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8696 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
8697 elaborate initialization expression for variable Abort when processing
8698 a package body or a declaration.
8699 (Create_Finalizer): Propagate the package context when creating the
8700 exception-related variables.
8701 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
8702 For_Package along with usage comment.
8704 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8706 * gcc-interface/Makefile.in: Clean up targets.
8707 Enable new package for atomic counters and copy-on-write implementation
8708 of unbounded strings on x86 platforms.
8709 * gcc-interface/Make-lang.in: Update dependencies.
8711 2011-08-04 Robert Dewar <dewar@adacore.com>
8713 * exp_ch7.adb: Minor reformatting.
8715 2011-08-04 Robert Dewar <dewar@adacore.com>
8717 * exp_strm.adb: Minor reformatting.
8719 2011-08-04 Vadim Godunko <godunko@adacore.com>
8721 * s-atocou.adb: Replace by dummy version and use on targets where atomic
8722 operations are not supported.
8723 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
8724 * s-atocou-x86.adb: New file.
8725 * Makefile.rtl: Add s-atocou.o file
8727 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8729 * make.adb (Compile): Move setting of CodePeer_Mode to ...
8730 (Compilation_Phase): ... here.
8731 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
8733 2011-08-04 Thomas Quinot <quinot@adacore.com>
8735 * Make-generated.in: Fix minor typo in comment.
8737 2011-08-04 Thomas Quinot <quinot@adacore.com>
8739 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
8742 2011-08-04 Robert Dewar <dewar@adacore.com>
8744 * a-coinho.adb: Minor reformatting.
8746 2011-08-04 Robert Dewar <dewar@adacore.com>
8748 * a-coinho.ads: Minor reformatting.
8750 2011-08-04 Vadim Godunko <godunko@adacore.com>
8752 * s-atocou.ads, s-atocou.adb: New files.
8753 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
8754 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
8755 direct use of GCC's atomic builtins and replace them by use of new
8756 atomic counter package.
8758 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8760 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
8762 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8764 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
8765 with a call to Get_External_Tag.
8766 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
8767 subprogram usage. Remove the guard against package declarations and
8768 bodies since Build_Cleanup_Statements is no longer invoked in that
8770 (Build_Components): Initialize Tagged_Type_Stmts when the context
8771 contains at least one library-level tagged type.
8772 (Build_Finalizer): New local variables Has_Tagged_Types and
8773 Tagged_Type_Stmts along with associated comments on usage. Update the
8774 logic to include tagged type processing.
8775 (Create_Finalizer): Insert all library-level tagged type unregistration
8776 code before the jump block circuitry.
8777 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
8778 (Expand_N_Package_Declaration): Remove the call to
8779 Build_Cleanup_Statements.
8780 (Process_Tagged_Type_Declaration): New routine. Generate a call to
8781 unregister the external tag of a tagged type.
8782 (Processing_Actions): Reimplemented to handle tagged types.
8783 (Process_Declarations): Detect the declaration of a library-level
8784 tagged type and carry out the appropriate actions.
8785 (Unregister_Tagged_Types): Removed. The machinery has been directly
8786 merged with Build_Finalizer.
8788 2011-08-04 Robert Dewar <dewar@adacore.com>
8790 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
8791 gnatls.adb, exp_ch3.adb: Minor reformatting.
8793 2011-08-04 Marc Sango <sango@adacore.com>
8795 * sem_attr.adb (Analyze_Attribute): Replace the message
8796 "invisible attribute of}" of the spark restriction violation in
8797 attribute reference by the simple message "invisible attribute of type".
8798 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
8799 two insertion characters: '&' and '}'.
8801 2011-08-04 Vadim Godunko <godunko@adacore.com>
8803 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
8804 * a-coinho.ads, a-coinho.adb: New file.
8805 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
8807 2011-08-04 Nicolas Roche <roche@adacore.com>
8809 * alfa_test.adb: Not all ali files are containing alfa information even
8810 if compiled with -gnatd.F. So suppress warning about missing ALFA
8813 2011-08-04 Yannick Moy <moy@adacore.com>
8815 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
8817 * put_alfa.adb: Check that scope name is not empty.
8819 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8821 * exp_ch3.adb (Stream_Operation_Ok): new predicate
8822 Needs_Elementary_Stream_Operation, to determine whether user-defined
8823 Read and Write attributes are available for the elementary components
8824 of the given type. If only the predefined attributes are available,
8825 then when restriction No_Default_Stream_Attributes is active the
8826 predefined stream attributes for the composite type cannot be created.
8828 2011-08-04 Robert Dewar <dewar@adacore.com>
8830 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
8831 Put routines in alpha order
8833 2011-08-04 Jose Ruiz <ruiz@adacore.com>
8835 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
8836 * gcc-interface/Make-lang.in: Update dependencies.
8838 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8840 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
8841 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
8844 2011-08-04 Robert Dewar <dewar@adacore.com>
8846 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
8847 lib-xref-alfa.adb: Minor reformatting.
8849 2011-08-04 Marc Sango <sango@adacore.com>
8851 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
8852 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
8853 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
8856 2011-08-04 Tristan Gingold <gingold@adacore.com>
8858 * bindgen.adb (Gen_Adainit_C): Remove.
8859 (Gen_Adafinal_C): Ditto.
8860 (Gen_Elab_Externals_C): Ditto.
8861 (Gen_Elab_Calls_C): Ditto.
8862 (Gen_Elab_Order_C): Ditto.
8863 (Gen_Elab_Defs_C): Ditto.
8864 (Gen_Finalize_Library_C): Ditto.
8865 (Gen_Finalize_Library_Defs_C): Ditto.
8866 (Gen_Main_C): Ditto.
8867 (Gen_Output_File_C): Ditto.
8868 (Gen_Restrictions_C): Ditto.
8869 (Gen_Versions_C): Ditto.
8870 (Write_Info_Ada_C): Ditto.
8871 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
8872 (Gen_Output_File): Do not force Ada_Bind_File anymore.
8873 Always call Gen_Output_File_Ada.
8874 * gnatlink.adb (Begin_Info): Now a constant.
8876 (Ada_Bind_File): Remove
8877 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
8878 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8879 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8880 * opt.ads (Ada_Bind_File): Remove.
8882 2011-08-04 Thomas Quinot <quinot@adacore.com>
8884 * projects.texi: Document target-specific directory in default project
8887 2011-08-04 Thomas Quinot <quinot@adacore.com>
8889 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8892 2011-08-04 Yannick Moy <moy@adacore.com>
8894 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8895 opt.ads, lib-xref.ads: Code clean up.
8897 2011-08-04 Yannick Moy <moy@adacore.com>
8899 * gnat_rm.texi: Update description of Test_Case
8900 * gnat_ugn.texi: Typo.
8902 2011-08-04 Ed Falis <falis@adacore.com>
8904 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8906 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8908 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8909 it is of type Root_Controlled. This action eliminates fields Prev and
8910 Next from type equality.
8912 2011-08-04 Yannick Moy <moy@adacore.com>
8914 * lib-xref-alfa.adb: Correct typo.
8916 2011-08-04 Matthew Heaney <heaney@adacore.com>
8918 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8921 2011-08-04 Yannick Moy <moy@adacore.com>
8923 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8924 (Analyze_Pragma): allow static string expression for name of Test_Case,
8925 instead of simply string literals.
8926 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8929 2011-08-04 Vincent Celier <celier@adacore.com>
8931 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8932 case suffixes to find truncated main sources.
8934 2011-08-04 Tristan Gingold <gingold@adacore.com>
8936 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8937 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8938 (Compute_Current_Task): Ditto.
8940 2011-08-04 Tristan Gingold <gingold@adacore.com>
8942 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8944 2011-08-04 Yannick Moy <moy@adacore.com>
8946 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8947 library-level constant.
8948 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8949 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8950 used as selector of parameter association, in ALFA mode.
8952 2011-08-04 Robert Dewar <dewar@adacore.com>
8954 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8955 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8958 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8960 * make.adb (Linking_Phase): Set source search path before calling
8961 gnatlink in CodePeer mode.
8963 2011-08-04 Javier Miranda <miranda@adacore.com>
8965 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8966 Remove code which takes care of building TSDs.
8967 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8968 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8969 the accessibility check in VM targets.
8970 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8971 (Building_Static_DT): Now returns false for VM targets.
8972 (Build_VM_TSDs): Removed.
8973 (Expand_Interface_Conversion): Generate missing runtime check for
8974 conversions to interface types whose target type is unknown at compile
8976 (Make_VM_TSD): Add missing code to disable the generation of calls to
8977 Check_TSD if the tagged type is not defined at library level, or not
8978 has a representation clause specifying its external tag, or -gnatdQ is
8980 * exp_disp.ads (Build_VM_TSDs): Removed.
8981 (Make_VM_TSDs): Spec relocated from exp_disp.adb
8982 * sem_disp.adb (Check_Dispatching_Operation): No code required to
8983 register primitives in the dispatch tables in VM targets.
8984 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8985 initialization of class-wide interface objects in VM targets.
8986 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8989 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8991 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8992 when dotnet-ld cannot be found.
8994 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8996 * bindgen.adb: Simplify significantly generation of binder body file in
8998 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8999 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
9002 2011-08-04 Yannick Moy <moy@adacore.com>
9004 * sem_prag.adb, sem.ads: Code cleanup.
9006 2011-08-04 Tristan Gingold <gingold@adacore.com>
9008 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
9009 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
9010 results if possible.
9011 * s-stusta.adb (Print): Adjust after changes in s-stausa.
9012 * gnat_ugn.texi: Update dynamic stack usage section.
9014 2011-08-04 Steve Baird <baird@adacore.com>
9016 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
9017 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
9018 contains only a call to the user-defined main subprogram.
9019 (Gen_Main_Ada) - If CodePeer_Mode is set, then
9020 call the "wrapper" subprogram instead of directly
9021 calling the user-defined main subprogram.
9023 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9025 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
9026 alternatives of a case statement for controlled objects. Rename local
9027 variable A to Dead_Alt.
9028 (Expand_N_If_Statement): Check the then and else statements of an if
9029 statement for controlled objects. Check the then statements of all
9030 elsif parts of an if statement for controlled objects.
9031 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
9033 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
9034 detects a loop associated with the expansion of an array object.
9035 Augment the processing of the loop statements to account for a possible
9036 wrap done by Process_Statements_For_Controlled_Objects.
9037 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
9038 statements and abortable part of an asynchronous select for controlled
9040 (Expand_N_Conditional_Entry_Call): Check the else statements of a
9041 conditional entry call for controlled objects.
9042 (Expand_N_Selective_Accept): Check the alternatives of a selective
9043 accept for controlled objects.
9044 (Expand_N_Timed_Entry_Call): Check the entry call and delay
9045 alternatives of a timed entry call for controlled objects.
9046 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
9047 exception handler for controlled objects.
9048 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
9049 Add formal parameter Nested_Constructs along with its associated
9051 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
9052 Requires_Cleanup_Actions.
9053 (Process_Statements_For_Controlled_Objects): New routine.
9054 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
9055 routine. Inspect a node which contains a non-handled sequence of
9056 statements for controlled objects. If such an object is found, the
9057 statements are wrapped in a block.
9059 2011-08-04 Bob Duff <duff@adacore.com>
9061 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
9062 need to compare with Class_Wide_Type (T2), in order to get at the
9063 original class-wide type node.
9064 * sem_type.ads (Covers): Improve the comment.
9065 * einfo.ads (Class_Wide_Type): Improve the comment.
9066 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
9067 the type of the Deref.
9069 2011-08-04 Yannick Moy <moy@adacore.com>
9071 * gnat_rm.texi: Document that Test_Case pragma can only appear on
9072 separate declarations.
9073 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
9074 check identifier of pragma argument.
9075 (Chain_TC): check that no other test case associated to the same entity
9076 share the same name.
9077 (Check_Test_Case): disallow test case inside subprogram body
9078 (Analyze_Pragma): correct call to check identifier and not argument
9079 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
9080 function gets name from test case pragma.
9082 2011-08-04 Yannick Moy <moy@adacore.com>
9084 * gnat_rm.texi: Document new pragma and aspect.
9085 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
9086 (No_Duplicates_Allowed): new constant array defining whether duplicates
9087 aspects of each kind can appear on the same declaration.
9088 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
9089 field, which points to a node holding the previous Spec_PPC_List.
9090 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
9091 through the indirection with Contract.
9092 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
9093 * par-prag.adb (Prag): do nothing on Test_Case pragma
9094 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
9096 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
9097 component Ensures of Test_Case.
9098 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
9099 (Analyze_Generic_Subprogram_Declaration,
9100 Analyze_Subprogram_Instantiation,
9101 Analyze_Abstract_Subprogram_Declaration,
9102 Analyze_Subprogram_Body_Helper,
9103 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
9104 insert contract in subprogram node at point of definition
9106 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
9107 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
9108 corresponding pragma
9109 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
9110 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
9111 similar to the analysis of pre/post
9112 (Derive_Subprogram): insert contract in subprogram node at point of
9114 * sem_prag.adb, sem_prag.ads
9115 (Check_Arg_Is_String_Literal, Check_Identifier):
9116 new checking procedures to be called in treatment of pragmas
9117 (Check_Test_Case): new procedure to check that a Test_Case aspect or
9118 pragma is well-formed. This does not check currently that 'Result is
9119 used only in the Ensures component of a Test_Case.
9120 (Analyze_Pragma): add case for Test_Case
9121 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
9122 components of a Test_Case.
9123 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
9124 expressions in the 3rd (and 4th if present) arguments of a Test_Case
9125 pragma, treated as spec expressions.
9126 (Sig_Flags): add value -1 for Test_Case.
9127 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
9128 Get_Requires_From_Test_Case_Pragma): getters for both expression
9129 components of a Test_Case.
9130 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
9131 indirection between an entry or [generic] subprogram entity and its
9132 pre/post + test-cases.
9133 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
9134 get/set for fields of an N_Contract node.
9135 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
9136 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
9137 names and pragma for Test_Case.
9138 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
9140 2011-08-04 Vincent Celier <celier@adacore.com>
9142 * gnat_ugn.texi: Improve documentation of gnatmake switch
9143 --source-info-file=.
9145 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9147 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
9148 type). Initialize Atyp to the appropriate type which is later checked
9149 for completion. Rewrite the assertion associated with private type
9152 2011-08-04 Ed Falis <falis@adacore.com>
9154 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
9155 initialize the number of CPUs.
9157 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9159 * sem_type.adb (Disambiguate): New subsidiary routine
9160 In_Same_Declaration_List, to implement AI05-0020: a user-defined
9161 equality on an anonymous access type whose designated type is private
9162 does not lead to an ambiguity with the universal access equality
9163 operator in the body or child units of the defining package. The same
9164 is true for a multiplication operator on a private type completed with
9167 2011-08-04 Javier Miranda <miranda@adacore.com>
9169 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
9170 (Normalize_Scalars_Config): Removed.
9172 (Register_Opt_Config_Switches): Remove registering config values of
9173 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
9174 (Restore_Opt_Config_Switches): Remove code which restores the values of
9175 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
9176 Init_Or_Norm_Scalars.
9177 (Save_Opt_Config_Switches): Remove code which saves values of
9178 Init_Or_Norm_Scalars and Normalize_Scalars.
9179 (Set_Opt_Config_Switches): Remove code which restores config values of
9180 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
9181 Init_Or_Norm_Scalars.
9183 2011-08-04 Yannick Moy <moy@adacore.com>
9185 * frontend.adb (Frontend): remove previous patch to avoid full
9186 qualification in ALFA mode.
9187 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
9188 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
9189 unique name for an entity, which could be used to identify the entity
9190 across compilation units.
9192 2011-08-04 Thomas Quinot <quinot@adacore.com>
9195 (Initialize_Default_Project_Path): Add target specific directory
9196 ($prefix/$target/lib/gnat) in front of project path in all cases
9197 (making gnatmake's behaviour consistent with gprbuild).
9198 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
9199 Pass target name from Sdefault to project subsystem.
9200 * gnatls.adb: Show new target specific default project directory.
9202 2011-08-04 Johannes Kanig <kanig@adacore.com>
9204 * cstand.adb: Add Information to Identifier in Standard
9205 (Identifer_For): Set Entity to the corresponding entity
9207 2011-08-04 Sergey Rybin <rybin@adacore.com>
9209 * gnat_ugn.texi: Update doc on gnatcheck.
9211 2011-08-04 Yannick Moy <moy@adacore.com>
9213 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
9216 2011-08-04 Yannick Moy <moy@adacore.com>
9218 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
9219 performing expansion.
9220 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
9221 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
9222 it is not called in ALFA mode.
9224 2011-08-04 Emmanuel Briot <briot@adacore.com>
9226 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
9227 after all, so removed.
9229 2011-08-04 Sergey Rybin <rybin@adacore.com>
9231 * vms_data.ads: Add missing VMS qualifiers.
9233 2011-08-04 Emmanuel Briot <briot@adacore.com>
9235 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
9236 the list of files on the command line after processing it through
9239 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9241 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
9242 processing for .NET/JVM. These targets can now benefit from
9243 Raise_From_Controlled_Operation and they share the same processing with
9245 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
9246 These targets need transient scopes in order to properly finalize short
9247 lived controlled objects.
9248 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
9249 NET/JVM. These targets can now benefit from
9250 Raise_From_Controlled_Operation and they share the same processing with
9253 2011-08-04 Geert Bosch <bosch@adacore.com>
9255 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
9257 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9259 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
9260 Expand_Record_Aggregate, to determine whether aggregate must be
9261 expanded into assignments. This is the case if the ancestor part is
9262 private, regarless of the setting of the flag Has_Private_Ancestor.
9264 2011-08-04 Ed Falis <falis@adacore.com>
9266 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
9268 2011-08-04 Bob Duff <duff@adacore.com>
9270 * sinfo.ads: Fix comment.
9272 2011-08-04 Steve Baird <baird@adacore.com>
9274 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
9275 choose a package name in much the same way as is
9276 done for JGNAT when VM_Target /= No_VM, except that
9277 a slightly more distinctive prefix string is used.
9279 2011-08-04 Emmanuel Briot <briot@adacore.com>
9281 * makeutl.adb (Complete_Mains): no longer accept unit names on the
9282 gnatmake command line.
9283 This behavior was never documented (and was supported only because of
9284 an early bug in the code). This case might lead to ambiguous cases
9285 (between unit names and truncated base names without suffixes).
9287 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9289 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
9290 Remove the external tag of a tagged type from the internal hash table.
9291 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
9292 expanded usage of the routine. Strenghten the check for Is_Master. Add
9293 processing for tagged types.
9294 (Build_Finalizer): Create all the necessary lists used in finalizer
9295 creation when the processed context is a package that may contain
9297 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
9298 Requires_Cleanup_Actions.
9299 (Expand_N_Package_Body): Package bodies may need clean up code
9300 depending on whether they contain tagged types.
9301 (Expand_N_Package_Declaration): Package declarations may need clean up
9302 code depending on whether they contain tagged types.
9303 (Unregister_Tagged_Types): New routine. Search through a list of
9304 declarations or statements, looking for non-abstract Ada tagged types.
9305 For each such type, generate code to unregister the external tag.
9306 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
9307 Requires_Cleanup_Actions.
9308 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
9309 through a list of declarations or statements looking for non-abstract
9310 Ada tagged types or controlled objects.
9311 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
9312 Requires_Cleanup_Actions.
9313 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
9314 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
9317 2011-08-04 Vincent Celier <celier@adacore.com>
9319 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
9320 has Ada sources, not project Project, because if the root project
9321 Project has no sources of its own, all projects will be deemed without
9324 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9326 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
9327 of the No_Param_Proc acc-to-subp type used for initialization of
9328 __gnat_finalize_library_objects so that it's declared at library level
9329 rather than nested inside of the adainit routine.
9331 2011-08-04 Javier Miranda <miranda@adacore.com>
9333 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
9334 if the tagged type has a representation clause which specifies its
9337 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9339 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
9340 Remove previous procedure with that name.
9341 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
9343 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
9344 subtype mark, the ancestor cannot have unknown discriminants.
9345 (Resolve_Record_Aggregate): if the type has invisible components
9346 because of a private ancestor, the aggregate is illegal.
9348 2011-08-04 Vincent Celier <celier@adacore.com>
9350 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
9351 account switches -gnat2005, -gnat12 and -gnat2012.
9353 2011-08-04 Bob Duff <duff@adacore.com>
9355 * s-tasdeb.ads: Minor comment fix.
9357 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9359 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
9361 * switch.ads, switch.adb (Is_Language_Switch): New function.
9363 2011-08-04 Vincent Celier <celier@adacore.com>
9365 * switch-c.adb: Minor comment addition.
9367 2011-08-04 Vincent Celier <celier@adacore.com>
9369 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
9370 ending with '=' is followed by a space (missing file name).
9372 2011-08-04 Pascal Obry <obry@adacore.com>
9374 * g-regist.ads: Fix size of HKEY on x86_64-windows.
9376 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9378 * sem_ch12.adb (Analyze_Associations): New routine
9379 Check_Overloaded_Formal_Subprogram to reject a formal package when
9380 there is a named association or a box initialisation for an overloaded
9381 formal subprogram of the corresponding generic.
9383 2011-08-04 Yannick Moy <moy@adacore.com>
9385 * alfa.ads (ALFA_Xref_Record): add component for type of entity
9386 * get_alfa.adb, put_alfa.adb: Read and write new component of
9388 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
9390 2011-08-04 Pascal Obry <obry@adacore.com>
9392 * urealp.adb: Minor reformatting.
9394 2011-08-04 Tristan Gingold <gingold@adacore.com>
9396 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
9397 Handle the case when Cleanup_Protected_Object returns Empty.
9399 2011-08-04 Yannick Moy <moy@adacore.com>
9401 * frontend.adb (Frontend): only qualify names in non-ALFA mode
9403 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9405 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
9406 call, ignore functions.
9408 2011-08-04 Geert Bosch <bosch@adacore.com>
9410 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
9413 2011-08-04 Emmanuel Briot <briot@adacore.com>
9415 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
9416 as an index for Builder'Switches. This conforms to the documentation.
9417 * make.adb (Insert_Project_Sources): avoid duplicate code
9419 2011-08-04 Emmanuel Briot <briot@adacore.com>
9421 * makeutl.adb (Complete_Mains): if the user has passed a relative file
9422 name on the command line (for instance "../dummy"), never assume it can
9425 2011-08-04 Tristan Gingold <gingold@adacore.com>
9427 * bindgen.adb: Remove code the reference or create the
9428 Break_Start/__gnat_break_start procedure.
9429 * s-stalib.adb (Break_Start): Removed.
9431 2011-08-04 Emmanuel Briot <briot@adacore.com>
9433 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
9434 shared with gprbuild.
9436 2011-08-04 Yannick Moy <moy@adacore.com>
9438 * par-ch4.adb (P_Primary): preferentially issue an error message about
9439 a missing parenthesis arount a conditional or case expression in Ada
9440 2012 mode, if we detect that the alignment is not correct for a
9443 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9445 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
9446 tag-to-class-wide conversion as needing finalization actions.
9447 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
9448 a tag-to-class-wide conversion as needing finalization actions.
9449 (Is_Finalizable_Transient): The result of a tag-to-class-wide
9450 conversion does not need finalization actions.
9451 (Is_Tag_To_CW_Conversion): New routine.
9452 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
9453 whether an object is the result of a tag-to-class-wide conversion.
9455 2011-08-04 Yannick Moy <moy@adacore.com>
9457 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
9458 the left-hand-side and right-hand-side of a conjunct are inserted when
9459 translating a pre- or postcondition
9460 * sem_ch6.adb: Correct typo in comment
9462 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9464 * gnat_rm.texi: Ravenscar does not prohibit dependence on
9465 Unchecked_Conversion and Unchecked_Deallocation.
9467 2011-08-04 Thomas Quinot <quinot@adacore.com>
9469 * make.adb: Minor reformatting.
9471 2011-08-04 Emmanuel Briot <briot@adacore.com>
9473 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
9474 sources in the project and its imported projects, but not in the whole
9477 2011-08-04 Emmanuel Briot <briot@adacore.com>
9479 * make.adb: Remove debug trace.
9481 2011-08-04 Vincent Celier <celier@adacore.com>
9483 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
9484 path in canonical form, to be able to compare path names on platforms
9485 such as Windows or Darwin.
9487 2011-08-04 Thomas Quinot <quinot@adacore.com>
9489 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
9490 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
9491 * scos.ads: Update documentation accordingly.
9492 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
9495 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9497 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
9498 attribute only if prefix type is scalar.
9500 2011-08-04 Emmanuel Briot <briot@adacore.com>
9502 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
9503 in gnatmake for specifying mains on the command line that do not belong
9504 to the main project. These mains must currently all belong to the same
9506 (Ultimate_Extension_Of): removed, since duplicated
9507 Ultimate_Extending_Project.
9509 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9511 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
9513 (CodePeer_Mode_String): New.
9514 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
9516 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
9517 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
9518 mode, since no useful elaboration subprogram is needed by CodePeer.
9519 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
9520 In this mode, compile binder file with -gnatC and do stop after this
9523 2011-08-04 Vincent Celier <celier@adacore.com>
9525 * exp_ch7.adb: Minor comment fix.
9527 2011-08-04 Robert Dewar <dewar@adacore.com>
9529 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
9530 exp_ch4.adb, makeutl.adb: Minor reformatting.
9532 2011-08-04 Emmanuel Briot <briot@adacore.com>
9534 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
9535 Create several new subprograms to move code out of Make. This makes the
9536 code more readable, removes code duplication, and is a preparation work
9537 for adding support for aggregate projects.
9539 2011-08-04 Tristan Gingold <gingold@adacore.com>
9541 * s-po32gl.ads, s-po32gl.adb: New files.
9542 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
9543 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
9544 (Build_Finalization_Collection): Use it.
9545 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
9546 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
9548 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
9549 * gcc-interface/Make-lang.in: Update dependencies.
9551 2011-08-04 Emmanuel Briot <briot@adacore.com>
9553 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
9556 2011-08-04 Emmanuel Briot <briot@adacore.com>
9558 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
9559 command line is not a file name, also check whether it could be a unit
9562 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9564 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
9565 the header of the finalization routine.
9566 If the unit has no finalizer but is a body whose spec has one, then
9567 generate the decrement of the elaboration entity only.
9568 If the unit has a finalizer and is a spec, then do not generate the
9569 decrement of the elaboration entity.
9570 (Gen_Finalize_Library_C): Likewise.
9572 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9574 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
9575 (Bounds_Size_Expression): Removed.
9576 (Double_Alignment_Of): New subsidiary routine.
9577 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
9578 for a hole in the dope vector of unconstrained arrays due to different
9579 index and element alignments.
9581 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9583 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
9584 raise program_error because body has not been seen yet.
9586 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9588 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
9591 2011-08-04 Vincent Celier <celier@adacore.com>
9593 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
9595 2011-08-04 Yannick Moy <moy@adacore.com>
9597 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
9598 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
9600 2011-08-04 Thomas Quinot <quinot@adacore.com>
9602 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
9603 instantiation in RCI.
9605 2011-08-04 Emmanuel Briot <briot@adacore.com>
9607 * make.adb: Share more code with gprbuild
9609 2011-08-04 Emmanuel Briot <briot@adacore.com>
9611 * projects.texi: Added documentation for the IDE'Gnat project file
9614 2011-08-04 Nicolas Roche <roche@adacore.com>
9616 * gnat_rm.texi: Minor editing.
9618 2011-08-04 Javier Miranda <miranda@adacore.com>
9620 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
9621 and the library case for VM targets.
9622 (Gen_Adainit_Ada): Likewise.
9624 2011-08-04 Robert Dewar <dewar@adacore.com>
9626 * g-altive.ads: Minor comment updates.
9627 * prj-nmsc.adb: Minor reformatting.
9629 2011-08-04 Javier Miranda <miranda@adacore.com>
9632 (Normalize_Scalars_Config): Value of the configuration switch set by
9633 pragma Normalize_Scalars when it appears in the gnat.adc file.
9634 (Normalize_Scalars): New field for record Config_Switches_Type. Used
9635 to save and restore settings of this pragma.
9637 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
9638 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
9640 2011-08-04 Vincent Celier <celier@adacore.com>
9642 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
9644 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9646 * makeutl.adb: Minor reformatting.
9648 2011-08-04 Olivier Hainque <hainque@adacore.com>
9650 * g-altive.ads: Update comments to reflect that only the soft
9651 binding is available today.
9653 2011-08-04 Robert Dewar <dewar@adacore.com>
9655 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
9656 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
9657 * gcc-interface/Make-lang.in: Update dependencies.
9659 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9661 * prj-env.adb: Remove local debug traces.
9663 2011-08-04 Yannick Moy <moy@adacore.com>
9665 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
9666 was used instead of Hi_OK, which could cause a read of an uninitialized
9667 value later on. Detected while working on the new warning.
9668 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
9670 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
9671 in more cases, in order to detect more unreferenced values.
9672 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
9673 object for expression, if any.
9675 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9677 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
9678 the operand types instead of the Esize.
9680 2011-08-04 Steve Baird <baird@adacore.com>
9682 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
9683 enable CodePeer_Mode.
9684 * bindusg.adb (Display): Add help message describing -P binder switch.
9685 * gnat_ugn.texi: Document -P binder switch.
9686 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
9687 user-defined main program directly.
9688 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
9689 user-defined main program in the context clause of the package body.
9691 2011-08-04 Yannick Moy <moy@adacore.com>
9693 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
9694 duplicate of Defining_Entity
9695 (Get_Unique_Entity_For_Decl): rename function into
9696 Unique_Defining_Entity
9697 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
9698 (Formal_Proof_On): remove synthesized flag
9699 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9700 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
9701 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
9702 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
9703 Annotate (Formal_Proof)
9705 2011-08-04 Emmanuel Briot <briot@adacore.com>
9707 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
9708 source files with non-standard naming schemes, in imported projects
9710 2011-08-04 Emmanuel Briot <briot@adacore.com>
9712 * makeutl.adb (Complete_Mains): when a multi-unit source file is
9713 specified on the gprbuild command line, we need to compile all units
9714 within that file, not just the first one we find
9715 Fix error message for mains that are not found.
9717 2011-08-04 Thomas Quinot <quinot@adacore.com>
9719 * sem_ch6.adb: Update comment.
9720 * sem_ch12.adb: Minor reformatting.
9722 2011-08-04 Bob Duff <duff@adacore.com>
9724 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
9725 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
9726 race condition whose symptom is to fail to lock Parent. That, in turn,
9727 causes Parent.Awake_Count to be accessed without locking Parent, which
9728 causes another race condition whose symptom is that Parent.Awake_Count
9729 can be off by 1 (either too high or too low). The solution is to lock
9730 Parent unconditionally, and then lock Acceptor, before reading
9731 Acceptor.Terminate_Alternative.
9733 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9735 * debug.adb: Update comment.
9737 2011-08-04 Robert Dewar <dewar@adacore.com>
9739 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
9740 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
9741 exp_ch6.adb: Minor reformatting.
9743 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9745 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
9748 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9750 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
9752 2011-08-04 Thomas Quinot <quinot@adacore.com>
9754 * sinfo.ads: Minor reformatting.
9756 2011-08-04 Emmanuel Briot <briot@adacore.com>
9758 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
9759 even if there is no location.
9761 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9763 * sem_res.adb, sem_ch4.adb: move check for restriction
9764 No_Task_Hierarchy to resolve_allocator.
9766 2011-08-04 Thomas Quinot <quinot@adacore.com>
9768 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
9769 This flag of N_Pragma nodes is not used, remove it as well as all of
9770 the associated circuitry.
9772 2011-08-04 Javier Miranda <miranda@adacore.com>
9774 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
9775 runtime check on duplicated externa tags
9776 * debug.adb Document switch -gnatdQ.
9778 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9780 * a-fihema.ads: Minor typo fix.
9782 2011-08-04 Yannick Moy <moy@adacore.com>
9784 * sem_ch10.adb: Minor comment update.
9786 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9788 * einfo.adb: Update the node field usage to reflect the renaming of
9789 Return_Flag to Return_ Flag_Or_Transient_Decl.
9790 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
9791 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
9792 (Write_Field15_Name): Change Return_Flag to
9793 Return_Flag_Or_Transient_Decl.
9794 * einfo.ads: Rename node field Return_Flag to
9795 Return_Flag_Or_Transient_Decl. Update the associated comment and all
9796 occurrences in entities.
9797 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
9798 associated Inline pragma.
9799 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
9800 associated Inline pragma.
9801 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
9803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
9804 Return_Flag and Set_Return_Flag.
9805 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
9806 objects generated for controlled transients declared inside an
9807 Exception_With_Actions. Update the calls to Return_Flag.
9808 (Process_Object_Declaration): Add code to add a null guard for hook
9809 objects generated for controlled transients declared inside an
9810 Exception_With_Actions. Update related comment.
9811 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
9812 objects generated for controlled transients declared inside an
9813 Exception_With_Actions. Update the calls to Return_Flag.
9814 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
9816 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9818 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
9819 positional aggregate.
9821 2011-08-04 Vincent Celier <celier@adacore.com>
9823 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
9824 SLOC only for pragmas.
9826 2011-08-04 Emmanuel Briot <briot@adacore.com>
9828 * projects.texi: Minor typo fix.
9830 2011-08-04 Emmanuel Briot <briot@adacore.com>
9832 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
9833 on case-sensitive file systems.
9835 2011-08-04 Thomas Quinot <quinot@adacore.com>
9837 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
9838 nested in a disabled pragma.
9839 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
9840 enclosing pragma, if any, for X decisions.
9842 2011-08-04 Thomas Quinot <quinot@adacore.com>
9844 * sem_prag.adb: Minor reformatting.
9846 2011-08-04 Vincent Celier <celier@adacore.com>
9848 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
9849 allowed in no run time mode.
9851 2011-08-04 Vincent Celier <celier@adacore.com>
9853 * make.adb (Check): When -gnatc is used, check for the source file
9854 inside the ALI file with a canonical case file name.
9856 2011-08-04 Emmanuel Briot <briot@adacore.com>
9858 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
9859 overriding the separator.
9861 2011-08-04 Robert Dewar <dewar@adacore.com>
9863 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
9864 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
9866 2011-08-04 Robert Dewar <dewar@adacore.com>
9868 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
9870 2011-08-04 Yannick Moy <moy@adacore.com>
9872 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
9873 'Result only appears in postcondition of function.
9875 2011-08-04 Thomas Quinot <quinot@adacore.com>
9877 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9878 external tag, include the value of the external tag in the exception
9881 2011-08-04 Yannick Moy <moy@adacore.com>
9883 * sem_attr.adb (Result): modify error message for misplaced 'Result
9885 2011-08-04 Sergey Rybin <rybin@adacore.com>
9887 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9888 clear that the second argument must be an identifier.
9890 2011-08-04 Thomas Quinot <quinot@adacore.com>
9892 * exp_ch9.adb (Build_Barrier_Function): When compiling with
9893 -fpreserve-control-flow, insert an IF statement on the barrier
9894 condition to ensure that a conditional branch instruction is generated.
9896 2011-08-04 Emmanuel Briot <briot@adacore.com>
9898 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9899 (Processing_Flags.Ignore_Missing_With): new flag.
9901 2011-08-04 Emmanuel Briot <briot@adacore.com>
9903 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9904 Source_List_File on case-insensitive systems where the file is actually
9905 on a case-sensitive file system (NFS,...).
9907 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9909 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9910 function return contains a controlled [extension] aggregate and the
9911 return statement is not part of a handled sequence of statements, wrap
9912 the return in a block. This ensures that all controlled temporaries
9913 generated during aggregate resolution will be picked up by the
9914 finalization machinery.
9916 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9918 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9919 components, freeze type before resolution, to ensure that default
9920 initializations are present for all components.
9921 * sem_res.adb (Resolve_Actuals): the designated object of an
9922 accces-to-constant type is a legal actual in a call to an
9923 initialization procedure.
9925 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9927 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9928 N_Unchecked_Type_Conversion to the possible containers of a renamed
9931 2011-08-04 Yannick Moy <moy@adacore.com>
9933 * par-ch13.adb (Aspect_Specifications_Present): recognize
9934 "with Identifier'Class =>" as an aspect, so that a meaningful warning
9935 is issued in Strict mode.
9936 * par.adb: Fix typos in comments.
9938 2011-08-04 Yannick Moy <moy@adacore.com>
9940 * sem_attr.adb (Result): modify error message to take into account Post
9941 aspect when compiling Ada 2012 (or newer) code.
9943 2011-08-04 Nicolas Roche <roche@adacore.com>
9945 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9946 remove need for GCC exceptions.
9948 2011-08-04 Vincent Celier <celier@adacore.com>
9950 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9951 project, not the source file name.
9952 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9953 excluded, continue looking. This excluded source will only be returned
9954 if there is no other source with the same base name that is not locally
9957 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9959 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9960 private and one of the operands is a real literal, use a qualified
9961 expression rather than a conversion which is not meaningful to the
9964 2011-08-04 Yannick Moy <moy@adacore.com>
9966 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9967 corresponding aspect X'Class are allowed, proceed with analysis of the
9968 aspect instead of skipping it.
9970 2011-08-04 Tristan Gingold <gingold@adacore.com>
9972 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9973 This will allow to have an Ada implementation for the subprogram.
9975 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9977 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9978 completion and aspects are present, apply them to the entity for the
9979 type which is currently the partial view, but which is the one that
9981 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9982 applies to a partial view, indicate that the full view has predicates
9983 and delayed aspects.
9984 (Replace_Type_Reference): Handle properly predicates that apply to the
9985 full view of a private completion.
9987 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9989 * layout.adb (Layout_Type): For composite types, do not set Esize.
9990 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9992 (Size_Known): Look at the RM size of components instead of the Esize.
9993 (Freeze_Record_Type): Look at the RM size instead of the Esize to
9994 issue warning and activate Implicit_Packing.
9995 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
9996 if the Esize is not known.
9997 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9998 for elementary types only.
9999 (Analyze_Record_Representation_Clause): Look at the RM size instead
10000 of the Esize to issue errors.
10001 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
10003 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
10005 Look at the RM size instead of the Esize for types if the latter is
10007 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
10009 2011-08-04 Ed Schonberg <schonberg@adacore.com>
10011 * sem_type.adb: proper handling of equality not involving anonymous
10014 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10016 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
10017 Vis_Decls. When creating a library-level finalizer for a package spec,
10018 both the declaration and body of the finalizer are inserted either in
10019 the visible or private declarations of the package spec.
10021 2011-08-04 Javier Miranda <miranda@adacore.com>
10023 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
10024 use of the full-view of a type when invoking Is_Ancestor.
10025 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
10026 the full-view of private parents is requested, then use also the
10027 full-view of the parent of the first derivation.
10029 2011-08-04 Tristan Gingold <gingold@adacore.com>
10031 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
10032 instead of the locally imported procedure.
10033 * s-taprop-mingw.adb (Enter_Task): Ditto.
10034 * s-valrea.adb (Scan_Real): Ditto.
10035 * s-imgrea.adb (Set_Image_Real): Ditto.
10036 * s-flocon.ads: Make the package pure.
10038 2011-08-04 Thomas Quinot <quinot@adacore.com>
10040 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
10041 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
10042 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
10043 New subprogram, moved here from...
10044 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
10045 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
10046 rewriting of the last argument into a procedure call statement here...
10047 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
10050 2011-08-04 Thomas Quinot <quinot@adacore.com>
10052 * par_sco.adb: Minor reformatting.
10054 2011-08-04 Robert Dewar <dewar@adacore.com>
10056 * erroutc.adb: Minor reformatting.
10058 2011-08-04 Thomas Quinot <quinot@adacore.com>
10060 * par_sco.adb: Comment update.
10062 2011-08-04 Tristan Gingold <gingold@adacore.com>
10064 * s-flocon.ads: New file.
10065 * g-flocon.ads: Now a renaming of s-flocon.
10066 * Makefile.rtl: Add s-flocon.o
10068 2011-08-04 Javier Miranda <miranda@adacore.com>
10070 * exp_strm.adb (Build_Array_Input_Function): if the array type is
10071 constrained, do not attempt to build a subtype of it.
10073 2011-08-04 Yannick Moy <moy@adacore.com>
10075 * errout.ads Change comments: remove 'R'M as an example where quotes
10076 are needed; add ALFA as another case where quotes are not needed
10077 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
10078 case where quotes are not needed.
10079 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
10080 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
10081 Remove all occurrences of 'A'L'F'A
10083 2011-08-04 Ed Schonberg <schonberg@adacore.com>
10085 * sem_ch13.adb: check legality of invariant pragma.
10087 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
10089 * bindgen.adb: Add comments.
10091 2011-08-04 Yannick Moy <moy@adacore.com>
10093 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
10095 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
10096 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
10098 2011-08-04 Robert Dewar <dewar@adacore.com>
10100 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
10101 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
10102 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
10104 2011-08-04 Thomas Quinot <quinot@adacore.com>
10106 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
10108 2011-08-04 Thomas Quinot <quinot@adacore.com>
10111 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
10114 2011-08-04 Robert Dewar <dewar@adacore.com>
10116 * einfo.ads, exp_ch4.adb: Minor reformatting.
10118 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
10120 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
10122 2011-08-04 Ed Schonberg <schonberg@adacore.com>
10124 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
10125 type in all cases to compute list of primitive operations, because full
10126 view may be an itype that is not attached to the list of declarations.
10128 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
10130 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
10131 library has already been finalized.
10132 (Gen_Adafinal_C): Likewise.
10133 (Gen_Adainit_Ada): Generate an early return if the library has
10134 already been elaborated.
10135 (Gen_Adainit_C): Likewise.
10136 (Gen_Output_File_Ada): Generate an elaboration flag.
10137 (Gen_Output_File_C): Likewise.
10139 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10141 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
10142 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
10143 built in the first place.
10144 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
10145 for CodePeer because Finalize_Address was not built to begin with.
10146 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
10148 2011-08-04 Pascal Obry <obry@adacore.com>
10150 * adaint.c (__gnat_tmp_name): Use current process id to create temp
10151 filenames, this ensures unicity of filenames across processes.
10153 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10155 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
10156 Raise_Controlled to Raise_From_Controlled_Operation. Update the
10157 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
10158 Add False as the actual to From_Abort in the generated call to
10159 Raise_From_Controlled_Operation.
10161 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
10163 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
10164 so that the ali file name can be retrieved from outside of this package.
10165 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
10166 doing nothing in the general case, but used to update the object file
10167 timestamp if directly generated by the backend.
10168 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
10169 to a later time than the ali file one.
10171 2011-08-04 Yannick Moy <moy@adacore.com>
10173 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
10174 entities whose body contains an Annotate pragma which forces formal
10175 proof on this body.
10176 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10177 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
10178 Mark_Non_ALFA_Subprogram to pass in a message and node.
10179 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
10180 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
10181 surrounding subprogram.
10182 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
10183 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
10184 as not in ALFA is annotated with Formal_Proof being On, then an error
10185 is issued based on the additional parameters for message and node.
10186 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
10187 * gcc-interface/Make-lang.in: Update dependencies.
10189 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10191 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
10192 Finalize_Address when CodePeer is enabled.
10194 2011-08-04 Pascal Obry <obry@adacore.com>
10196 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
10197 the latter returns a pointer to a static buffer which is deallocated
10198 at the end of the routine.
10200 2011-08-04 Yannick Moy <moy@adacore.com>
10202 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
10203 after index creation; mark unconstrained base array type generated as
10204 being in/not in ALFA as well
10205 (Make_Index): mark subtype created as in/not in ALFA
10206 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
10207 over a loop as in/not in ALFA, depending on its type and form of loop
10210 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10212 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
10213 directly to False on .NET and JVM.
10215 2011-08-04 Yannick Moy <moy@adacore.com>
10217 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
10218 constraint that subtype must come from source code to be in ALFA, so
10219 that anonymous subtypes can be in ALFA too.
10221 2011-08-04 Yannick Moy <moy@adacore.com>
10223 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
10224 reference for ALFA mode.
10225 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
10226 procedure public so as to use it from formal verification back-end.
10228 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
10230 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
10231 invalid checks of the Parameter, making Remove_Switch not working
10234 2011-08-04 Arnaud Charlet <charlet@adacore.com>
10236 * targparm.ads: Update header: no run-time exception is needed on this
10239 2011-08-04 Vincent Celier <celier@adacore.com>
10241 * a-fihema.adb: Use System.IO instead of GNAT.IO
10243 2011-08-04 Thomas Quinot <quinot@adacore.com>
10245 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
10246 are forbidden in Compiler_Unit mode.
10248 2011-08-04 Robert Dewar <dewar@adacore.com>
10250 * sem_util.adb: Minor reformatting.
10252 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10254 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
10255 library-level finalizers.
10256 (Gen_Finalize_Library_C): Update the import string for library-level
10258 (Gen_Finalize_Library_Defs_C): Update the definition name of a
10259 library-level finalizer.
10260 * exp_ch7.adb: Remove with and use clauses for Stringt.
10261 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
10262 Spec_Decl. Add local variable Body_Id. The names of library-level
10263 finalizers are now manually fully qualified and are no longer external.
10264 A single name is now capable of servicing .NET, JVM and non-VM targets.
10265 Pragma Export is no longer required to provide visibility for the name.
10266 (Create_Finalizer_String): Removed.
10267 (New_Finalizer_Name): New routine which mimics New_..._Name.
10269 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
10271 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
10272 elaboration counter to Standard_Short_Integer.
10273 * sem_util.adb (Build_Elaboration_Entity): Likewise.
10274 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
10275 (Gen_Elab_Externals_C): Likewise.
10277 2011-08-04 Ed Falis <falis@adacore.com>
10279 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
10280 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
10281 system-vxworks-mips.ads, system-vxworks-x86.ads
10282 (Always_Compatible_Rep): set to False for all VxWorks targets.
10284 2011-08-04 Robert Dewar <dewar@adacore.com>
10286 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
10287 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
10288 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
10289 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
10290 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
10291 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
10292 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
10293 Minor reformatting and code reorganization.
10295 2011-08-04 Emmanuel Briot <briot@adacore.com>
10297 * projects.texi: Added doc for aggregate projects.
10299 2011-08-04 Emmanuel Briot <briot@adacore.com>
10301 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
10302 Add support for overriding the Project_Path in aggregate projects.
10304 2011-08-04 Robert Dewar <dewar@adacore.com>
10306 * a-cofove.ads: Minor reformatting.
10308 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
10310 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
10311 on the generated code.
10312 (Build_Finalize_Statements): Update the comment on the generated code.
10313 (Build_Initialize_Statements): Update the comment on the generated code.
10314 (Build_Object_Declarations): Add local variable Result. The object
10315 declarations are now built in sequence.
10316 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
10319 2011-08-04 Robert Dewar <dewar@adacore.com>
10321 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
10323 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
10325 * einfo.ads (Elaboration_Entity): Document new definition and use.
10326 (Elaboration_Entity_Required): Adjust to above change.
10327 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
10328 * exp_ch12.adb: And with and use for Snames.
10329 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
10330 * exp_util.adb (Set_Elaboration_Flag): Likewise.
10331 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
10332 <Check_Unit_Name>: Deal with N_Expanded_Name.
10333 <Attribute_Elaborated>: Extend to all unit names.
10334 * sem_elab.adb: And with and use for Uintp.
10335 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
10336 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
10337 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
10338 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
10339 from Gen_Adainit_Ada.
10340 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
10341 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
10342 case, do not call System.Standard_Library.Adafinal; instead call
10343 finalize_library if needed.
10344 (Gen_Adafinal_C): Likewise.
10345 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
10346 non-main program case.
10347 (Gen_Adainit_C): Generate a couple of external declarations here.
10348 In the main program case, set SSL.Finalize_Library_Objects.
10349 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
10350 (Gen_Elab_Calls_C): Likewise.
10351 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
10352 (Gen_Finalize_Library_C): Likewise. Generate a full function.
10353 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
10355 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
10356 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
10358 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
10359 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
10360 of external declarations. Call Gen_Finalize_Library_C.
10362 2011-08-04 Emmanuel Briot <briot@adacore.com>
10364 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
10365 Compute_Compilation_Phases): new subprogram.
10366 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
10367 The number of mains as well as the various compilation phases that
10368 need to be run are now project tree specific, since various
10369 aggregated trees might have different requirements. In particular,
10370 they do not all require bind or link phases.
10372 2011-08-04 Emmanuel Briot <briot@adacore.com>
10374 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
10375 (Project_Tree_Appdata): New type.
10376 It is now possible to associate application-specific data to a project
10377 tree. In particular, this is used in the gprbuild builder to avoid a
10378 number of global tables and htables, especially now that there can be
10379 several project trees loaded at once because of aggregate projects.
10380 (Debug_Name): new procedure.
10381 * projects.texi: Clarify syntax of "**" for Source_Dirs
10383 2011-08-03 Emmanuel Briot <briot@adacore.com>
10385 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
10386 the "roots" for a main.
10387 (Fill_From_Project): add support for aggregate projects. Main units
10388 in aggregated projects are now automatically added in the list of
10389 files to build (although this fails later on in gprbuild, because
10390 these files are not using the root proejct tree, so this needs
10392 * gcc-interface/Make-lang.in: Update dependencies.
10394 2011-08-03 Yannick Moy <moy@adacore.com>
10396 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
10397 conditional expression in ALFA.
10398 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
10399 expressions as not in ALFA.
10401 2011-08-03 Robert Dewar <dewar@adacore.com>
10403 * a-cofove.adb: Minor reformatting.
10405 2011-08-03 Emmanuel Briot <briot@adacore.com>
10407 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
10408 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
10410 These packages are more logically placed in the Queue package, since
10411 they manipulate the queue. It is also likely that they can be adapted
10412 for gnatmake, thus sharing more code.
10413 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
10414 that we could move the above.
10416 2011-08-03 Emmanuel Briot <briot@adacore.com>
10418 * errutil.adb (Finalize): clean up the list of error messages on exit.
10419 Calling this subprogram multiple times will no longer show duplicate
10420 error messages on stderr.
10422 2011-08-03 Emmanuel Briot <briot@adacore.com>
10424 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
10425 Getopt_Switches when we have already define a command line
10428 2011-08-03 Yannick Moy <moy@adacore.com>
10430 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
10431 in ALFA. Instead, they are considered as assertions to prove.
10432 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
10433 nodes as not in ALFA. Instead, include conditional expressions in ALFA
10434 if they have no ELSE part, or if they occur in pre- and postconditions,
10435 where the Condition cannot have side-effects in ALFA
10436 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
10437 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
10438 Instead, include type conversion between scalar types in ALFA.
10439 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
10440 if-and-only-if its type is in ALFA.
10442 2011-08-03 Thomas Quinot <quinot@adacore.com>
10444 * scos.adb, get_scos.adb, put_scos.adb
10445 New code letter for decisions: G (entry guard)
10447 (Traverse_Subprogram_Body): Rename to...
10448 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
10449 (Traverse_Protected_Body): New subprogram
10450 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
10451 protected bodies and entry bodies.
10453 2011-08-03 Yannick Moy <moy@adacore.com>
10455 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
10456 entities with get/set subprograms, which is set on procedure entities
10457 generated by the compiler for a postcondition.
10458 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
10459 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
10460 entity for a declaration
10461 (Get_Unique_Entity_For_Decl): new function returning an entity which
10462 represents a declaration, so that matching spec and body have the same
10465 2011-08-03 Robert Dewar <dewar@adacore.com>
10467 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
10468 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
10470 2011-08-03 Yannick Moy <moy@adacore.com>
10472 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
10473 library-level because retriction No_Implicit_Dynamic_Code in the
10474 front-end prevents its definition as a local subprogram
10475 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
10476 for reuse in other contexts
10477 (Traverse_Declarations_Or_Statements,
10478 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
10479 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
10480 procedures take a callback parameter to be called on all declarations
10482 (Traverse_All_Compilation_Units): new generic function to traverse a
10483 compilation unit and call a callback parameter on all declarations
10485 2011-08-03 Javier Miranda <miranda@adacore.com>
10487 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
10488 in Java since they are always enclosed in a namespace that
10489 differentiates them, and overloaded entities are supported by the VM.
10491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10493 * checks.adb (Determine_Range): If a computed bound of an operation is
10494 outside the range of the base type of the expression, and overflow
10495 checks are enabled, the result is unknown and cannot be used for any
10496 subsequent constant folding.
10497 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
10498 unknown, so is the result of the comparison.
10500 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10502 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
10503 From_Abort. When finalization was triggered by an abort, propagate
10504 Standard'Abort_Signal rather than Program_Error.
10505 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
10507 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
10508 From_Abort. When finalization was triggered by an abort, propagate
10509 Standard'Abort_Signal rather than Program_Error.
10510 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
10512 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
10513 Abort_Id. Update the calls to Build_Object_Declarations and
10514 Build_Raise_Statement to include Abort_Id.
10515 (Build_Adjust_Statements): New local variable Abort_Id. Update the
10516 calls to Build_Object_Declarations and Build_Raise_Statement to include
10518 (Build_Finalize_Statements): New local variable Abort_Id. Update the
10519 calls to Build_Object_Declarations and Build_Raise_Statement to include
10521 (Build_Components): Create an entity for Abort_Id when exceptions are
10522 allowed on the target.
10523 (Build_Finalizer): New local variable Abort_Id.
10524 (Build_Initialize_Statements): New local variable Abort_Id. Update the
10525 calls to Build_Object_Declarations and Build_Raise_Statement to include
10527 (Build_Object_Declarations): Add new formal Abort_Id. Create the
10528 declaration of flag Abort_Id to preserve the original abort status
10529 before finalization code is executed.
10530 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
10531 runtime routine Raise_From_Controlled_Operation.
10532 (Create_Finalizer): Update the call to Build_Raise_Statement to include
10533 Abort_Id. Update the call to Build_Object_Declarations to include
10534 Abort_Id. Update the layout of the finalizer body.
10535 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
10536 (Process_Transient_Objects): New local variable Abort_Id. Remove the
10537 clunky code to create all flags and objects related to
10538 exception propagation and replace it with a call to
10539 Build_Object_Declarations. Update the call to Build_Raise_Statement to
10541 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
10542 Add new formal Abort_Id and associated comment on its use.
10543 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
10545 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
10546 Remove the clunky code to create all flags and objects related to
10547 exception propagation and replace it with a call to
10548 Build_Object_Declarations. Update the call to Build_Raise_Statement.
10550 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10552 * s-tassta.adb: Fix minor typos.
10554 2011-08-03 Robert Dewar <dewar@adacore.com>
10556 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
10557 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
10559 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10561 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
10562 to packages. This ensures that the finalizer body will not end up
10563 inside the freeze node.
10564 (Process_Declarations): Add code to detect whether a freeze node has a
10565 nested finalization collection.
10567 2011-08-03 Pascal Obry <obry@adacore.com>
10569 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
10570 (Current_Session): Return a not null access to Session_Type.
10571 (Default_Session): Likewise.
10573 2011-08-03 Robert Dewar <dewar@adacore.com>
10575 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
10576 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
10578 2011-08-03 Pascal Obry <obry@adacore.com>
10580 * g-awk.ads: Minor comment fix.
10582 2011-08-03 Sergey Rybin <rybin@adacore.com>
10584 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10585 the tree structure related to discriminant constraints.
10586 Original_Discriminant cannot be used any more for computing the
10587 defining name for the reference to a discriminant.
10589 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10591 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
10592 function is not visibly tagged, this is not a dispatching call and
10593 therfore is not Tag_Indeterminate, even if the function is marked as
10594 dispatching on result.
10596 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10598 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
10599 (Expand_N_Free_Statement): Add a guard to protect against run-times
10600 which do not support controlled types.
10601 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
10602 against run-times which do not support controlled types.
10603 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
10604 against run-times which do not support controlled types.
10605 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
10606 against run-times which do not support controlled types.
10607 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
10608 protect against run-times which do not support controlled types.
10610 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10612 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
10613 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
10615 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10617 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
10618 modified in the source, to prevent spurious warnings when compiling
10621 2011-08-03 Thomas Quinot <quinot@adacore.com>
10623 * a-except-2005.adb: Minor reformatting.
10625 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10627 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
10628 is a renaming declaration in the private part of a package, do not emit
10629 a warning that the with_clause could be moved because the renaming may
10630 be used in the body or in a child unit.
10632 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10634 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10635 Propagate the Comes_From_Source attribute from the original return
10636 object to the renaming.
10638 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10640 * exp_ch7.adb (Build_Raise_Statement): Do not call
10641 Raise_From_Controlled_Operation when this routine is not present in
10642 the run-time library.
10643 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
10644 libraries (Ravenscar), tasks are non-terminating, and protected objects
10645 and tasks can only appear at library level, so we do not want
10646 finalization of protected objects nor tasks.
10647 * exp_intr.adb: Minor clarification in comment.
10648 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
10649 Gen_Output_File_C): Remove references to finalization of library-level
10650 objects when using restricted run-time libraries.
10652 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10654 * sem_ch3.adb (Build_Discriminant_Constraints): Set
10655 Original_Discriminant only if the parent type is a generic formal.
10657 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10659 * exp_ch13.adb: Add with and use clause for Targparm;
10660 (Expand_N_Free_Statement): Prevent the generation of a custom
10661 Deallocate on .NET/JVM targets since this requires pools and address
10663 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
10664 .NET/JVM targets, attach the newly allocated object to the access
10665 type's finalization collection. Do not generate a call to
10666 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
10667 exist in the runtime.
10668 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
10669 create a custom Allocate for object that do not require initialization.
10670 Attach a newly allocated object to the access type's finalization
10671 collection on .NET/JVM.
10672 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
10673 assignment of controlled types on .NET/JVM. The two hidden pointers
10674 Prev and Next and stored and later restored after the assignment takes
10676 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
10677 kludge for .NET/JVM to recognize a particular piece of code coming from
10678 Heap_Management and change the call to Finalize into Deep_Finalize.
10679 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
10680 finalization collections on .NET/JVM only for types derived from
10681 Controlled. Separate the association of storage pools with a collection
10682 and only allow it on non-.NET/JVM targets.
10683 (Make_Attach_Call): New routine.
10684 (Make_Detach_Call): New routine.
10685 (Process_Object_Declarations): Suppress the generation of
10686 build-in-place return object clean up code on .NET/JVM since it uses
10688 * exp_ch7.ads (Make_Attach_Call): New routine.
10689 (Make_Detach_Call): New routine.
10690 * exp_intr.adb Add with and use clause for Targparm.
10691 (Expand_Unc_Deallocation): Detach a controlled object from a collection
10692 on .NET/JVM targets.
10693 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
10694 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
10695 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
10696 names used in finalization.
10698 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10700 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
10701 (Attach, Detach): Lock the current task when chaining an object onto a
10704 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10706 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
10707 Rewritten to create the message strings when the exception is not
10708 raised by an abort during finalization.
10709 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
10710 Raise_From_Controlled_Operation and update its associated comment.
10711 * a-fihema.ads, a-fihema.adb: New GNAT unit.
10712 Ada.Finalization.Heap_Management provides key functionality
10713 associated with controlled objects on the heap, their creation,
10714 finalization and reclamation. Type Finalization_Collection is
10715 effectively a wrapper which sits ontop of a storage pool and performs
10716 all necessary bookkeeping for all the objects it contains. Each
10717 access-to-controlled or access-to-class-wide type receives a collection
10718 as part of its expansion. The compiler generates buffer code and
10719 invokes Allocate / Deallocate to create and destroy allocated
10720 controlled objects.
10721 * a-finali.adb ("="): Removed.
10722 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
10723 fields Prev and Next.
10724 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
10725 A library unit with at least one controlled object on the library level
10726 has a special finalizer which is invoked by the binder. To signal this,
10727 ali files carry field PF.
10728 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
10729 associated comment on field usage.
10730 * a-tags.adb (Get_RC_Offset): Removed.
10731 (Needs_Finalization): New routine.
10732 * a-tags.ads: Update the structure of the GNAT dispatch tables.
10733 Dispatch tables now carry field Needs_Finalization which provides
10734 runtime indication whether a type is controlled or has controlled
10735 components or both. Remove field RC_Offset.
10736 (Get_RC_Offset): Removed along with its associated pragma Export.
10737 Since tagged types with controlled components no longer carry hidden
10738 field _controller, the special mechanism to retrieve its location is no
10740 (Needs_Finalization): New routine.
10741 * atree.ads, atree.adb (Elist24): New routine.
10742 (Set_Elist24): New routine.
10743 * atree.h: Add a define clause for Elist24.
10744 * bindgen.adb New library-level variable Lib_Final_Built.
10745 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
10746 presence of a VM target, the routine generates calls to the proper
10747 library finalization routine.
10748 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
10749 targets. Set the correct library finalization routine depending on
10750 whether the library has controlled objects or this is a VM compilation.
10751 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
10752 to library-level finalizers of compiled units in reverse order of
10753 elaboration. It also produces exception management code and reraises a
10754 potential exception after all units have been finalized.
10755 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
10756 library-level finalizers of compiled units in reverse order of
10758 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
10759 definitions of all library-level finalizers available to the compilation
10760 (Gen_Main_Ada): Directly call Adafinal which now contails all target
10762 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
10763 System.Standard_Library.Adafinal directly. If the library needs
10764 finalization actions, create the sequence of finalization calls.
10765 (Gen_Output_File_Ada): Alphabetize local variables and constants.
10766 Generate a with clause for System.Soft_Links when compiling for a VM.
10767 Remove the code which imports System.Standard_Library.Adafinal as
10768 Do_Finalize. Generate the library finalization routine.
10769 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
10770 If the library needs finalization actions, create all the definitions
10771 of library- level finalizers.
10772 (Has_Finalizer): New routine. Determines whether at least one compiled
10773 unit has a library-level finalizer.
10774 Add type Qualification_Mode.
10775 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
10776 * einfo.adb: New usage of field 15 as Return_Flag.
10777 Remove Finalization_Chain_Entity from the usages of field 19.
10778 Remove Associated_Final_Chain from the usages of field 23.
10779 New usage of field 23 as Associated_Collection.
10780 New usage of field 24 as Finalizer.
10781 New usage of flag 252 as Is_Processed_Transient.
10782 (Associated_Final_Chain): Removed.
10783 (Associated_Collection): New routine.
10784 (Finalization_Chain_Entity): Removed.
10785 (Finalizer): New routine.
10786 (Is_Finalizer): New routine.
10787 (Is_Processed_Transient): New routine.
10788 (Return_Flag): New routine.
10789 (Set_Associated_Final_Chain): Removed.
10790 (Set_Associated_Collection): New routine.
10791 (Set_Finalization_Chain_Entity): Removed.
10792 (Set_Finalizer): New routine.
10793 (Set_Is_Processed_Transient): New routine.
10794 (Set_Return_Flag): New routine.
10795 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
10797 (Write_Field8_Name): Alphabetize the output.
10798 (Write_Field11_Name): Alphabetize the output.
10799 (Write_Field12_Name): Alphabetize the output.
10800 (Write_Field13_Name): Alphabetize the output.
10801 (Write_Field14_Name): Alphabetize the output.
10802 (Write_Field15_Name): Alphabetize the output.
10803 (Write_Field16_Name): Alphabetize the output.
10804 (Write_Field17_Name): Alphabetize the output.
10805 (Write_Field18_Name): Alphabetize the output.
10806 (Write_Field19_Name): Alphabetize the output. Remove the output of
10807 Finalization_Chain_Entity.
10808 (Write_Field20_Name): Alphabetize the output.
10809 (Write_Field21_Name): Alphabetize the output.
10810 (Write_Field22_Name): Alphabetize the output.
10811 (Write_Field23_Name): Alphabetize the output. Remove the output of
10812 Associated_Final_Chain. Add output for Associated_Collection.
10813 (Write_Field24_Name): Alphabetize the output.
10814 (Write_Field25_Name): Add output for Finalizer.
10815 (Write_Field26_Name): Alphabetize the output.
10816 (Write_Field27_Name): Alphabetize the output.
10817 (Write_Field28_Name): Alphabetize the output.
10818 * einfo.ads: Add new field description for Associated_Collection and
10820 Remove Associated_Final_Chain and its uses in nodes.
10821 Remove Finalization_Chain_Entity and its uses in nodes.
10822 Add new field description for Finalizer and its uses in nodes.
10823 Add new synthesized attribute Is_Finalizer.
10824 Add new flag description for Is_Processed_Transient and its uses in
10826 Add new field description for Return_Flag and its uses in nodes.
10827 (Associated_Final_Chain): Removed along with its pragma Inline.
10828 (Associated_Collection): New routine and pragma Inline.
10829 (Finalization_Chain_Entity): Removed along with its pragma Inline.
10830 (Finalizer): New routine and pragma Inline.
10831 (Is_Finalizer): New routine and pragma Inline.
10832 (Is_Processed_Transient): New routine and pragma Inline.
10833 (Return_Flag): New routine and pragma Inline.
10834 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
10835 (Set_Associated_Collection): New routine and pragma Inline.
10836 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
10837 (Set_Finalizer): New routine and pragma Inline.
10838 (Set_Is_Processed_Transient): New routine and pragma Inline.
10839 (Set_Return_Flag): New routine and pragma Inline.
10840 * exp_aggr.adb: Alphabetize subprograms.
10841 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
10842 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
10843 associated comments. Remove local variables External_Final_List and
10845 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
10846 Ancestor. Remove the retrieval of finalization lists. Update the call to
10848 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
10849 lists. Update the call to Late_Expansion.
10850 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
10851 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
10852 (Gen_Assign): Remove the retrieval of the finalization list used to
10853 build the assignment. Update the calls to Make_Init_Call and
10855 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
10856 Remove the mechanism to determine attachment levels and finalization
10857 list retrieval. Remove the processing for coextensions.
10858 (Init_Controller): Removed. Controllers no longer exist.
10859 (Late_Expansion): Remove formals Flist and Obj along with their
10860 associated comments. Update the calls to Build_Record_Aggr_Code and
10861 Build_Array_Aggr_Code.
10862 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
10863 (Expand_N_Freeze_Entity): Add special processing for finalizers which
10864 appear in entry bodies, protected subprograms and task bodies.
10865 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
10866 * exp_ch3.adb (Add_Final_Chain): Removed.
10867 (Build_Array_Init_Proc): Alphabetize local variables.
10868 (Build_Assignment): Alphabetize local variables. Update the call to
10870 (Build_Class_Wide_Master): Rename local variables to better reflect
10872 (Build_Discriminant_Assignments): Code reformatting.
10873 (Build_Init_Call_Thru): Code reformatting.
10874 (Build_Init_Procedure): Code reformatting. Generate a special version
10875 of Deep_Finalize which is capable of finalizing all initialized
10876 components and ignore the rest.
10877 (Build_Init_Statements): Rename local variables to better reflect their
10879 Reimplement the mechanism to include the creation and update of an index
10880 variable called a "counter". It is used as a bookmark for tracing
10881 initialized and non-initialized components.
10882 (Build_Initialization_Call): Remove local variable Controller_Typ.
10883 Alphabetize all local variables. Remove the initialization of the
10884 record controller and update the call to Make_Init_Call.
10885 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10886 New local variable Counter.
10887 (Constrain_Array): Alphabetize.
10888 (Expand_Freeze_Array_Type): Create a collection instead of a
10890 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10891 Finalize_Address which is used in conjunction with allocated controlled
10893 (Expand_N_Object_Declaration): Remove the creation of a finalization
10894 list for anonymous access types. Update the calls to Make_Init_Call and
10896 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10897 retrieval of finalization lists. Remove the expansion of the record
10898 controller. Create TSS primitive Finalize_Address used in conjunction
10899 with controlled objects on the heap. Create finalization collections
10900 for access-to-controlled record components.
10901 (Expand_Record_Controller): Removed.
10902 (Freeze_Type): Remove the freezing of record controllers. Freezing of
10903 class-wide types now requires additional processing. Create
10904 finalization collections for access-to-controlled types.
10905 (Increment_Counter): New routine.
10906 (Make_Counter): New routine.
10907 (Make_Eq_If): Remove the mention of Name_uController.
10908 (Make_Predefined_Primitive_Specs): There is no longer need to skip
10909 types coming from System.Finalization_Root.
10910 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10911 (Predefined_Primitive_Bodies): There is no longer need to skip types
10912 coming from System.Finalization_Root.
10913 (Stream_Operation_OK): Do not generate stream routines for
10914 type Ada.Finalization.Heap_Management.Finalization_Collection.
10915 * exp_ch3.ads: Alphabetize subprograms.
10916 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10917 Add with and use clause for Lib.
10918 (Complete_Coextension_Finalization): Removed.
10919 (Complete_Controlled_Allocation): New routine. Create a finalization
10920 collection for anonymous access-to-controlled types. Create a custom
10921 Allocate which interfaces with the back end and the machinery in
10923 (Expand_Allocator_Expression): Add necessary calls to
10924 Complete_Controlled_Allocation. Remove the retrieval of finalization
10925 lists. Update the calls to Make_Adjust_Call. Generate a call to
10926 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10927 the associated collection.
10928 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10929 Code clean up. Remove the retrieval of finalization lists and
10931 Update the call to Make_Init_Call. Generate a call to
10932 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10933 the associated collection.
10934 (Get_Allocator_Final_List): Removed. Finalization lists are not
10936 (Suitable_Element): Remove the mention of Name_uController.
10937 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10938 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10939 the left hand side, carry out the assignment and adjust the left hand
10941 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10942 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10943 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10944 BIP_Collection and BIPcollection.
10945 (Build_Heap_Allocator): New routine used to allocate the return object
10946 of a build-in-place function onto a collection.
10947 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10948 (Expand_Call): Do not replace direct calls to Deep routines with their
10950 (Expand_N_Extended_Return_Statement): Give all variables shorter names
10951 and update their occurrences. Add a special return flag to monitor the
10952 [ab]normal execution of the function. The flag is set right before the
10954 Rewrite the mechanism used to allocate a build-in-place return object
10955 on the heap or on a storage pool.
10956 (Is_Direct_Deep_Call): New routine.
10957 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10958 build-in-place function call instead of a final list. Build a call to
10959 Set_Finalize_Address_Ptr to decorate the associated collection.
10960 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10961 order to name the build-in-place function call's result for later
10962 finalization. Add a collection to a build-in-place function call
10963 instead of a final list.
10964 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10965 build-in-place function call instead of a final list. Remove the code
10966 which moves one final list and transforms it into the actual in a
10967 nested build-in-place call.
10968 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10969 build-in-place function call instead of a final list.
10970 (Move_Final_List): Removed.
10971 (Needs_BIP_Collection): New routine.
10972 (Needs_BIP_Final_List): Removed.
10973 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10974 enumeration type BIP_Formal_Kind.
10975 Update the related comment.
10976 (Needs_BIP_Collection): New routine.
10977 (Needs_BIP_Final_List): Removed.
10978 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10979 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10980 majority of subprograms in this unit. Add Name_Finalize_Address to
10981 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10982 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10983 statements for an array type.
10984 (Build_Adjust_Statements): Create the adjust statements for a record
10986 (Build_Cleanup_Statements): New routine. A procedure which given any
10987 construct containing asynchronous calls, references to _master, or is a
10988 task body, a task allocation or a protected body produces the necessary
10989 runtime calls to clean up these constructs.
10990 (Build_Exception_Handler): New routine.
10991 (Build_Final_List): Removed.
10992 (Build_Finalization_Collection): New routine. A core procedure which
10993 creates a collection to service heap allocated controlled objects
10994 associated with an access-to-controlled type.
10995 (Build_Finalize_Statements): Create the finalization statements for a
10997 (Build_Finalizer): New routine. A core procedure which given any
10998 construct with declarations and/or statements detects all objects which
10999 need any type of clean up (controlled objects, protected objects) and
11000 generates all necessary code to clean up the said objects in the proper
11002 (Build_Finalizer_Call): New routine.
11003 (Build_Initialize_Statements): Create the initialization statements for
11004 an array type. The generated routine contains code to finalize partially
11005 initialized arrays.
11006 (Build_Object_Declarations): New routine.
11007 (Build_Raise_Statement): New routine.
11008 (Clean_Simple_Protected_Objects): Removed.
11009 (Controller_Component): Removed.
11010 (Enclosing_Function): New routine.
11011 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
11012 either declarations or statements or both.
11013 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
11014 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
11016 (Find_Final_List): Removed.
11017 (Global_Flist_Ref): Removed.
11018 (In_Finalization_Root): Removed.
11019 (Insert_Actions_In_Scope_Around): Determine the range of the transient
11020 scope in terms of tree nodes. Process all transient variables within
11022 (Make_Adjust_Call): Rewritten. There is no longer an attach call
11023 generated after the adjust.
11024 (Make_Attach_Call): Removed.
11025 (Make_Call): New routine.
11026 (Make_Clean): Removed.
11027 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
11029 (Make_Deep_Proc): Rewritten to generate the new profile signature used
11031 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
11033 (Make_Final_Call): Modified to simply create a call to either
11034 Deep_Finalize or Finalize.
11035 (Make_Finalize_Address_Body): New routine.
11036 (Make_Finalize_Address_Stmts): New routine. A function which produces
11037 TSS primitive Finalize_Address used in conjunction with heap allocated
11038 controlled objects.
11039 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
11040 (Make_Init_Call): Rewritten. There is no longer an attach call
11041 generated after initialization.
11042 (Make_Local_Deep_Finalize): New routine.
11043 (Make_Set_Finalize_Address_Ptr_Call): New routine.
11044 (Make_Transient_Block): Remove the finalization list retrieval and
11046 (Needs_Finalization): Moved to Exp_Util.
11047 (Parent_Field_Type): New routine.
11048 (Preprocess_Components): New routine.
11049 (Process_Transient_Objects): New routine.
11050 (Wrap_HSS_In_Block): New routine.
11051 (Wrap_Transient_Declaration): Remove finalization list management and
11052 controller insertion.
11053 (Wrap_Transient_Expression): Code reformatting.
11054 (Wrap_Transient_Statement): Code reformatting.
11055 * exp_ch7.ads (Build_Final_List): Removed.
11056 (Build_Finalization_Collection): New routine.
11057 (Build_Raise_Statement): New routine.
11058 (Controller_Component): Removed.
11059 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
11060 (Find_Final_List): Removed.
11061 (In_Finalization_Root): Removed.
11062 (Is_Simple_Protected_Type): Update related comment.
11063 (Make_Adjust_Call): New parameter profile and associated comments.
11064 (Make_Attach_Call): Removed.
11065 (Make_Final_Call): New parameter profile and associated comments.
11066 (Make_Finalize_Address_Body): New routine.
11067 (Make_Init_Call): New parameter profile and associated comments.
11068 (Make_Local_Deep_Finalize): New routine.
11069 (Make_Set_Finalize_Address_Ptr_Call): New routine.
11070 (Needs_Finalization): Moved to Exp_Util.
11071 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
11072 (Expand_N_Protected_Body): Remove the handling of finalization lists.
11073 (Find_Protection_Type): Moved to Exp_Util.
11074 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
11075 (Make_DT): Update sequence of dispatch table initialization. Remove the
11076 initialization of field RC_Offset. Add initialization of field Needs_
11078 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
11079 Reimplement how an object is first finalized, then deallocated.
11080 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
11082 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
11083 Register TSS_Finalize_Address with type TSS_Names.
11084 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
11085 procedure provides the interface between an allocation / deallocation
11086 and the support machinery in Ada.Finalization.Heap_Management.
11087 (Find_Init_Call): Code reformatting.
11088 (Find_Init_Call_In_List): Code reformatting.
11089 (Find_Protection_Type): Moved from Exp_Ch9.
11090 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
11091 (Has_Controlled_Coextensions): Removed.
11092 (Has_Controlled_Objects): New routine.
11093 (In_Library_Level_Package_Body): New routine.
11094 (Insert_Action_After): New routine.
11095 (Is_Finalizable_Transient): New routine. This predicate determines
11096 whether an object declaration is one of the many variants of controlled
11098 (Is_Null_Access_BIP_Func_Call): New routine.
11099 (Is_Non_BIP_Func_Call): New routine.
11100 (Is_Related_To_Func_Return): New routine.
11101 (Needs_Finalization): Moved from Exp_Ch7.
11102 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
11103 (Find_Protection_Type): Moved from Exp_Ch9.
11104 (Has_Controlled_Coextensions): Removed.
11105 (Has_Controlled_Objects): New routine.
11106 (In_Library_Level_Package_Body): New routine.
11107 (Insert_Action_After): New routine.
11108 (Is_Finalizable_Transient): New routine.
11109 (Is_Null_Access_BIP_Func_Call): New routine.
11110 (Is_Non_BIP_Func_Call): New routine.
11111 (Is_Related_To_Func_Return): New routine.
11112 (Needs_Finalization): Moved from Exp_ch7.
11113 * expander.adb (Expand): Add a case for N_Free_Statement.
11114 * freeze.adb (Freeze_All): Replace the generation of a finalization
11115 list with a collection for access-to-controlled types.
11116 (Freeze_Entity): Code reformatting.
11117 (Freeze_Record_Type): Remove the freezing of a record controller
11119 (Freeze_Subprogram): Code reformatting.
11120 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
11122 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
11123 has a library-level finalizer.
11124 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
11125 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
11126 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
11127 files. Add a-fihema to the list of object files.
11129 Alphabetize the associations in type Is_Parameterless_Attribute.
11130 * rtsfind.ads: Ada.Finalization_List.Controller and
11131 System.Finalization_Implementation are no longer a GNAT unit.
11132 Update the range of type Ada_Finalization_Child. Remove the following
11133 recoverable entities:
11135 RE_Attach_To_Final_List
11139 RE_Finalizable_Ptr_Ptr
11140 RE_Global_Final_List
11141 RE_Limited_Record_Controller
11144 RE_Record_Controller
11145 RE_Simple_List_Controller
11147 Add the following recoverable entities:
11149 RE_Add_Offset_To_Address
11153 RE_Exception_Identity
11154 RE_Finalization_Collection
11155 RE_Finalization_Collection_Ptr
11156 RE_Needs_Finalization
11157 RE_Save_Library_Occurrence
11158 RE_Set_Finalize_Address_Ptr
11159 RE_Set_Storage_Pool_Ptr
11161 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
11163 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
11164 (First_Stored_Discriminant): Remove the mention of Name_uController.
11165 * sem_aux.ads: Comment reformatting.
11166 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
11167 to redecorate an already existing class-wide type.
11168 (Decorate_Tagged_Type): New parameter profile and associated comment.
11169 Create a "shadow class-wide type" for a shadow entity.
11170 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
11171 of the final chain along with the associated comment.
11172 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
11173 Full_Desig and set it to the full view of the designated type.
11174 Initialize the finalization collection to empty.
11175 (Build_Derived_Record_Type): Alphabetize local variables. Code
11177 (Collect_Fixed_Components): Remove the mention of Name_uController.
11178 (Create_Constrained_Components): Remove the mention of Name_uController.
11179 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
11180 class-wide type of a shadow entity.
11181 (Process_Full_View): Update the machinery which marks type
11182 Limited_Controlled's entity as limited.
11183 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
11184 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
11185 list, instead make a collection build-in-place formal.
11186 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
11187 a designated type in order to establish a match between the renaming
11188 and the renamed entity.
11189 (Find_Selected_Component): Add guard to prevent spurious exceptions
11190 from being raised on .NET/JVM.
11191 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
11192 to the list of primitive that need special processing. Update arrays
11193 C_Names and D_Names.
11194 (Replace_Types): Handle class-wide types.
11195 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
11196 different parameter profile, look at the first formal.
11197 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
11198 use clauses for Exp_Util.
11199 * sem_res.adb: Remove with and use clauses for Elists.
11200 (Propagate_Coextensions): Removed.
11201 (Resolve_Allocator): Do not propagate the list of coextensions from one
11202 allocator to another.
11203 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
11204 Deaccessed_T to Desig_Typ.
11205 (Enter_Name): Remove the mention of Name_uController.
11206 (Gather_Components): Remove the mention of Name_uController.
11207 (Incomplete_Or_Private_View): New routine.
11208 (Is_Coextension_Root): Removed.
11209 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
11210 * sem_util.ads (Incomplete_Or_Private_View): New routine.
11211 (Is_Coextension_Root): Removed.
11212 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
11213 Controlled types are now derived from a null tagged record. Remove
11214 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
11215 * sinfo.adb (Coextensions): Removed.
11216 (Set_Coextensions): Removed.
11217 * sinfo.ads: Remove Coextensions from the explanation of node fields
11218 and its uses in nodes.
11219 Update the field usage of N_Allocator.
11220 (Coextensions): Removed along with its pragma Inline.
11221 (Set_Coextensions): Removed along with its pragma Inline.
11222 * snames.ads-tmpl: Remove names
11227 Name_uLocal_Final_List
11228 Name_Finalization_Root
11235 Name_Finalize_Address
11236 * s-pooglo.adb (Allocate): Add overriding indicator.
11237 (Deallocate): Add overriding indicator.
11238 (Storage_Size): Add overriding indicator.
11239 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
11240 than Finalize_Global_List.
11241 (Null_Finalize_Global_List): Removed.
11242 (Save_Library_Occurrence): New routine.
11243 * s-soflin.ads: Remove variable Finalize_Global_List along with its
11244 initialization. Add variable Finalize_Library_Objects along with its
11245 pragma Export. Add variables Library_Exception and
11246 Library_Exception_Set along with their pragma Export.
11247 (Null_Finalize_Global_List): Removed.
11248 (Save_Library_Occurrence): New routine.
11249 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
11250 rather than Finalize_Global_List.
11251 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
11252 of the constructed node.
11254 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11256 * link.c: Include "auto-host.h" before system headers.
11258 2011-08-03 Vincent Celier <celier@adacore.com>
11260 * make.adb (Gnatmake): Add to table Library_Projs only library projects
11261 that are not extended. Do not check if a library project that is
11262 extended should be regenerated. Do not add to table Library_Paths the
11263 libraries that are in extended projects. Link only with libraries that
11264 are in libray projects that are not extended.
11265 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
11266 for a library project that is extended.
11268 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11270 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
11271 conforming subprogram renamings that appear to be completions if they
11272 are not fully conformant.
11273 Such renamings are homographs but not completions.
11274 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
11275 names in a subprogram renaming that appears in an instance.
11277 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11279 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
11280 not immutably limited, build actual subtype from expression to provide
11281 proper bounds to caller.
11283 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11285 * sem_ch8.adb: Minor comment correction.
11287 2011-08-03 Thomas Quinot <quinot@adacore.com>
11289 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
11290 returning a limited array, use an extended return statement.
11292 2011-08-03 Vincent Celier <celier@adacore.com>
11294 * make.adb (Initialize): If --subdirs= is used, but no project file is
11295 specified, attempt to create the specify subdir if it does not already
11296 exist and use it as the object directory as if -D had been specified.
11298 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11300 * s-tpopsp-vms.adb: New file.
11301 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
11302 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
11304 2011-08-03 Emmanuel Briot <briot@adacore.com>
11306 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
11309 2011-08-03 Yannick Moy <moy@adacore.com>
11311 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
11312 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
11313 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
11314 detect that an array has static bounds.
11316 2011-08-03 Thomas Quinot <quinot@adacore.com>
11318 * exp_dist.adb: Minor reformatting.
11320 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11322 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
11323 (ATCB_Key): Removed, not always used.
11325 2011-08-03 Emmanuel Briot <briot@adacore.com>
11327 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
11328 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
11329 most remaining global variables.
11331 2011-08-03 Robert Dewar <dewar@adacore.com>
11333 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
11334 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
11337 2011-08-03 Javier Miranda <miranda@adacore.com>
11339 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
11340 that must be passed by copy in VM targets.
11342 2011-08-03 Emmanuel Briot <briot@adacore.com>
11344 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
11345 duplicates a similar htable now in the project tree.
11347 2011-08-03 Claire Dross <dross@adacore.com>
11349 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
11350 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
11351 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
11352 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
11353 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
11354 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
11355 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
11358 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11360 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
11361 (ATCB_Key): Removed, not always used.
11362 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
11363 s-taprop-posix.adb.
11364 * s-tpopsp-tls.adb: New file.
11365 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
11366 x86/x64/ia64/powerpc/sparc Linux.
11368 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11370 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
11371 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
11373 2011-08-03 Thomas Quinot <quinot@adacore.com>
11375 * rtsfind.ads, exp_dist.adb, exp_dist.ads
11376 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
11377 Fix type selection for mapping integer types to PolyORB types.
11379 2011-08-03 Bob Duff <duff@adacore.com>
11381 * sem_ch7.adb: Minor comment clarification.
11383 2011-08-03 Bob Duff <duff@adacore.com>
11385 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
11386 an error analyzing a choice, skip further processing. Further
11387 processing could cause a crash or cascade errors.
11389 2011-08-03 Emmanuel Briot <briot@adacore.com>
11391 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
11392 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
11393 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
11394 prj-env.ads (Shared_Project_Tree_Data): new type
11395 An aggregate project and its aggregated trees need to share the common
11396 data structures used for lists of strings, packages,... This makes the
11397 code simpler since otherwise we have to pass the root tree (also used
11398 for the configuration file data) in addition to the current project
11399 tree. This also avoids ambiguities as to which tree should be used.
11400 And finally this saves a bit of memory.
11401 (For_Every_Project_Imported): new parameter Tree.
11402 Since aggregated projects are using a different tree, we need to let
11403 the caller know which tree to use to manipulate the returned project.
11405 2011-08-03 Robert Dewar <dewar@adacore.com>
11407 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
11408 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
11409 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
11410 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
11412 2011-08-03 Javier Miranda <miranda@adacore.com>
11414 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
11415 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
11417 2011-08-03 Bob Duff <duff@adacore.com>
11419 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
11422 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
11424 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
11425 g-sehash.ads: Fix typo. Update header.
11427 2011-08-03 Thomas Quinot <quinot@adacore.com>
11429 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
11432 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11434 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
11435 prefixes of private types along with records, since the selector may be
11437 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
11438 private types along with records, since the selector may be a
11441 2011-08-03 Emmanuel Briot <briot@adacore.com>
11443 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
11445 2011-08-03 Javier Miranda <miranda@adacore.com>
11447 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
11448 Tagged_Type_Expansion.
11450 2011-08-03 Yannick Moy <moy@adacore.com>
11452 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
11453 violation when the argument of concatenation is the name of a
11456 2011-08-03 Emmanuel Briot <briot@adacore.com>
11458 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
11459 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
11460 (Process_Declarative_Items): new parameter Child_Env.
11462 2011-08-03 Yannick Moy <moy@adacore.com>
11464 * alfa.ads: Update format of ALFA section in ALI file in order to
11465 add a mapping from bodies to specs when both are present.
11466 (ALFA_Scope_Record): Add components for spec file/scope.
11467 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
11469 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
11470 collected, fill in the spec information when relevant.
11471 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
11474 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11476 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
11477 code unit to decide whether to add internally generated subprograms.
11479 2011-08-03 Javier Miranda <miranda@adacore.com>
11481 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
11482 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
11483 be handled by copy in VM targets.
11485 2011-08-03 Emmanuel Briot <briot@adacore.com>
11487 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
11488 code with Makeutl.Get_Switches.
11489 * prj-tree.adb: Update comment.
11491 2011-08-03 Thomas Quinot <quinot@adacore.com>
11493 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
11494 subprogram with a limited formal that does not support external
11497 2011-08-03 Yannick Moy <moy@adacore.com>
11499 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
11501 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
11502 not from current unit in two phases, because it is not possible to
11503 change the table while iterating over its content.
11504 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
11506 2011-08-03 Sergey Rybin <rybin@adacore.com>
11508 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
11509 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
11511 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11513 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
11514 and the component type is composite, this is ambiguous for predefined
11515 concatenation, but if the node is not overloaded and the entity is a use
11516 -defined function its profile can be used to resolve that aggregate.
11518 2011-08-03 Robert Dewar <dewar@adacore.com>
11520 * exp_ch4.adb: Minor code cleanup.
11522 2011-08-03 Thomas Quinot <quinot@adacore.com>
11524 * exp_dist.adb: Do not generate distribution stubs if serious errors
11525 have been diagnosed.
11527 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11529 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
11530 the first formal of a primitive operation, go to the base type to
11531 handle properly an access to a derived type with constrained
11533 * sem_type.adb (Disambiguate): an immediately visible operator hides a
11534 user-defined function that is only use-visible.
11536 2011-08-03 Robert Dewar <dewar@adacore.com>
11538 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
11539 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
11540 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
11541 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
11542 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
11543 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
11544 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
11545 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
11547 2011-08-03 Robert Dewar <dewar@adacore.com>
11549 * repinfo.adb (List_Mechanism): Add handling of
11550 Convention_Ada_Pass_By_XXX.
11551 * sem_mech.adb (Set_Mechanism): Ditto.
11552 * sem_prag.adb (Process_Convention): Add entries for
11553 Convention_Ada_Pass_By_XXX.
11554 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
11556 2011-08-03 Pascal Obry <obry@adacore.com>
11558 * makeutl.adb: Minor reformatting.
11560 2011-08-03 Vincent Celier <celier@adacore.com>
11563 (Get_File_Name) If the file cannot be found when there are no config
11564 pragmas file and May_Fail is True, return No_File instead of the file
11565 name, to be consistent.
11567 2011-08-03 Pascal Obry <obry@adacore.com>
11569 * adaint.c (__gnat_is_executable_file_attr): Avoid access
11572 2011-08-03 Javier Miranda <miranda@adacore.com>
11575 (Same_Representation): In VM targets the representation of arrays with
11576 aliased components differs from arrays with non-aliased components.
11578 2011-08-03 Emmanuel Briot <briot@adacore.com>
11580 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
11581 not systematically lower case attribute indexes that contain no "."
11582 Fix definition of several Naming attributes, which take
11583 a unit name as index and therefore should be case insensitive.
11584 Minor refactoring (reduce length of variable names).
11586 2011-08-03 Emmanuel Briot <briot@adacore.com>
11588 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
11590 2011-08-03 Emmanuel Briot <briot@adacore.com>
11592 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
11593 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
11594 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
11595 prj-tree.ads (Prj.Tree.Environment): new type.
11597 2011-08-03 Emmanuel Briot <briot@adacore.com>
11599 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
11600 prj-tree.adb, prj-tree.ads (Environment): new type.
11602 2011-08-03 Emmanuel Briot <briot@adacore.com>
11604 * prj-tree.ads: Remove unused variable.
11606 2011-08-03 Yannick Moy <moy@adacore.com>
11608 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
11609 issuing messages related to SPARK restriction violation.
11611 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11613 * sem_ch6.adb: guard against error nodes in return statements.
11615 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11617 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
11618 a warning can only appear on a configuration file, so emit warning
11619 without further checks.
11621 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11623 * s-interr.ads: add overriding keyword.
11625 2011-08-03 Geert Bosch <bosch@adacore.com>
11627 * exp_attr.adb: Fix minor typo.
11629 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11631 * par-ch4.adb: improve error recovery.
11633 2011-08-03 Emmanuel Briot <briot@adacore.com>
11635 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
11636 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
11637 to Errout_Handling.
11639 2011-08-03 Emmanuel Briot <briot@adacore.com>
11641 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
11642 "external" as an attribute name in aggregate projects.
11644 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11646 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
11647 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
11648 from 0, so we need to adjust.
11650 2011-08-03 Emmanuel Briot <briot@adacore.com>
11652 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
11653 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
11655 2011-08-03 Yannick Moy <moy@adacore.com>
11657 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
11658 restriction on overloaded entity if the entity is not an operator.
11660 2011-08-03 Yannick Moy <moy@adacore.com>
11662 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
11663 restrict.ads: Rename remaining Check_Formal_Restriction* into
11664 Check_SPARK_Restriction*.
11666 2011-08-03 Emmanuel Briot <briot@adacore.com>
11668 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
11669 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
11671 (Project_Empty): removed
11672 (Empty_Project): new parameter Qualifier
11673 This is used to have fields specific to aggregate projects, cleaner
11674 New field to store the list of aggregated projects.
11675 (Check_Aggregate_Project): removed
11676 (Process_Aggregated_Projects, Free): new subprograms.
11678 2011-08-03 Olivier Hainque <hainque@adacore.com>
11680 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
11682 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11684 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
11685 explicit dereference of an unconstrained type, create a constrained
11686 subtype for it, as is done for function calls that return an
11687 unconstrained type.
11689 2011-08-03 Thomas Quinot <quinot@adacore.com>
11691 * g-pehage.adb (Finalize): Avoid possible double-free.
11693 2011-08-03 Steve Baird <baird@adacore.com>
11695 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
11696 Elab_Spec/Body attrs in CodePeer_Mode.
11698 2011-08-03 Javier Miranda <miranda@adacore.com>
11700 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
11701 low bound is not known at compile time but they have no others choice.
11702 Done because in this case the bounds can be obtained directly from the
11705 2011-08-03 Ed Falis <falis@adacore.com>
11707 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
11708 on VxWorks SMP. Remove unusable constant ANY_CPU.
11710 2011-08-03 Emmanuel Briot <briot@adacore.com>
11712 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
11713 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
11714 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
11715 Prj.Env.Initialize_Empty): new subprograms
11716 (Get_Env, Find_Project): remove parameter Target_Name.
11718 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11720 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
11721 as a condition for the delayed call to Derived_Subprograms done for the
11722 case of the rewriting of a derived type that constrains the
11723 discriminants of its parent type.
11724 Avoids redundant subprogram derivations for private subtype derivations.
11726 2011-08-03 Javier Miranda <miranda@adacore.com>
11728 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
11729 Build_Record_Aggr_Code.
11730 (Build_Record_Aggr_Code): Add missing support to initialize hidden
11731 discriminants in extension aggregates.
11733 2011-08-03 Emmanuel Briot <briot@adacore.com>
11735 * prj-pp.adb (Print): also output project qualifiers, since in
11736 particular "aggregate" is mandatory in an aggregate project.
11738 2011-08-03 Emmanuel Briot <briot@adacore.com>
11740 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
11741 (Debug_Output): new function.
11743 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11745 * gnat_ugn.texi: Document -Wstack-usage.
11746 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
11748 2011-08-03 Thomas Quinot <quinot@adacore.com>
11750 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
11751 have keyword LIMITED.
11753 2011-08-03 Yannick Moy <moy@adacore.com>
11755 * alfa.adb, alfa.ads, alfa_test.adb: New files.
11756 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
11757 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
11758 section (does not happen in compiler, only if code directly calls
11760 * get_alfa.adb, get_alfa.ads: New files.
11761 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
11763 * lib-xref-alfa.adb: New file.
11764 * lib-xref.adb, lib-xref.ads
11765 (Xref_Entry): redefine information needed in cross-references for ALFA.
11766 Push ALFA treatments in separated local package.
11767 (Enclosing_Subpragram_Or_Package): treat specially subprogram
11768 identifiers. Return entity of package body instead of spec. Return
11769 Empty for a scope with no location.
11770 (Generate_Reference): adapt to new components for ALFA information.
11771 Remove the need for D references on definitions.
11772 (Is_Local_Reference): moved to ALFA local package
11773 (Output_References): extract subfunction as Extract_Source_Name
11774 (Output_Local_References): remove procedure, replaced by filtering of
11775 cross-references in package ALFA and printing in Put_ALFA.
11776 (Write_Entity_Name): remove procedure
11777 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
11778 print exact name of entity as it appears in source file
11779 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
11780 * put_alfa.adb, put_alfa.ads: New files.
11781 * xref_lib.adb (Search_Xref): protect read of cross-references against
11782 reading other sections of the ALI file, in gnatxref
11783 (Search): protect read of cross-references against reading other
11784 sections of the ALI file, in gnatfind.
11785 * gcc-interface/Make-lang.in: Update dependencies.
11787 2011-08-03 Thomas Quinot <quinot@adacore.com>
11789 * sem_ch3.adb: Minor reformatting.
11791 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11793 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
11794 raising an exception.
11796 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11798 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
11799 type, always use 1 as the lower bound or string, even if lower bound of
11800 context is not static, to handle properly null strings in a non-static
11803 2011-08-03 Bob Duff <duff@adacore.com>
11805 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
11806 always legal on the right-hand side of an assignment statement; there
11807 is always an applicable index constraint in this case. Therefore, the
11808 check for Pkind = N_Assignment_Statement is now unconditional -- it
11809 doesn't depend on whether Is_Constrained (Typ).
11811 2011-08-03 Robert Dewar <dewar@adacore.com>
11813 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
11815 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11817 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
11818 for an itype created within a generic unit.
11820 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11822 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
11823 suppresses all inlining.
11825 2011-08-03 Robert Dewar <dewar@adacore.com>
11827 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
11828 exp_aggr.adb: Minor reformatting.
11830 2011-08-03 Thomas Quinot <quinot@adacore.com>
11832 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
11833 tagged assignment when discriminant checks are suppressed. This is
11834 useless and extremely costly in terms of static stack usage.
11836 2011-08-03 Bob Duff <duff@adacore.com>
11838 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
11839 of generics, because this leads to the wrong entity in the wrong scope,
11840 causing (e.g.) pragma Export_Procedure to get an error if the entity is
11842 (Process_Interface_Name): Follow Alias for instances of generics, to
11843 correct for the above change.
11845 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11847 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
11848 is an integer literal it is always safe to replace the reference. In
11849 addition, if the reference appears in the generated code for an object
11850 declaration it is necessary to copy because otherwise the reference
11851 might be to the uninitilized value of the discriminant of the object
11854 2011-08-03 Pascal Obry <obry@adacore.com>
11856 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
11857 ACL used, in this case we want to check for ending .exe, not .exe
11858 anywhere in the path.
11860 2011-08-03 Sergey Rybin <rybin@adacore.com>
11862 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
11863 the tree structure (semantic decoration of references to record
11866 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11868 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
11869 choices of a named array aggregate, bail out when any choices are
11870 marked as Errors_Posted.
11872 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11874 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
11875 in which entity is frozen, to handle properly loop variables in
11878 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11880 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11881 subtype is not static, compute the upper bound using attributes, to
11882 handle properly index types that are not integer types.
11884 2011-08-03 Bob Duff <duff@adacore.com>
11886 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11887 Update copyright notice.
11889 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11891 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11892 Original_Discriminant if within an instance.
11893 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11895 2011-08-03 Thomas Quinot <quinot@adacore.com>
11897 * einfo.ads: Minor reformatting.
11899 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11901 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11902 composite type with an unfrozen subcomponent, in the profile of a
11903 primitive operation.
11905 2011-08-03 Robert Dewar <dewar@adacore.com>
11907 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11909 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11911 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11912 unconstrained type with discriminants is initialized with an aggregate,
11913 use the constrained subtype of the aggregate as the type of the object,
11914 because it is immutable, and this allows the back-end to generate no
11915 code for the object declaration.
11917 2011-08-03 Robert Dewar <dewar@adacore.com>
11919 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11920 comparison operand is variable, and turns out to be zero or negative.
11922 2011-08-03 Javier Miranda <miranda@adacore.com>
11925 (Expand_Dispatching_Constructor_Call): Disable expansion of
11926 code required for native targets. Done to avoid generating
11927 references to unavailable runtime entities in VM targets.
11929 (Expand_N_Object_Declaration): Add missing support to handle
11930 the explicit initialization of class-wide interface objects.
11933 2011-08-03 Matthew Heaney <heaney@adacore.com>
11935 * a-cobove.adb (Merge): Move source onto target, instead of using
11938 2011-08-03 Matthew Heaney <heaney@adacore.com>
11940 * a-cbdlli.adb (Splice): Move source items from first to last.
11942 2011-08-03 Yannick Moy <moy@adacore.com>
11944 * sem_util.ads: Add comment.
11946 2011-08-03 Javier Miranda <miranda@adacore.com>
11949 (Expand_Record_Aggregate): In VM targets disable the expansion into
11950 assignments of aggregates whose type is not known at compile time.
11952 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11954 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11955 protected entries and task entries, to build the proper renaming
11956 declaration for entry formals, used in debugging.
11957 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11958 parameters in the same way.
11960 2011-08-02 Robert Dewar <dewar@adacore.com>
11962 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11963 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11964 code reorganization.
11966 2011-08-02 Robert Dewar <dewar@adacore.com>
11968 * debug.adb: Debug flag d.P to suppress length comparison optimization
11969 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11970 comparison of Length by comparing First/Last instead.
11972 2011-08-02 Matthew Heaney <heaney@adacore.com>
11974 * a-cobove.ads: Code clean up.
11976 2011-08-02 Vincent Celier <celier@adacore.com>
11978 * adaint.c (file_names_case_sensitive_cache): New static int.
11979 (__gnat_get_file_names_case_sensitive): Cache the return value in
11980 file_names_case_sensitive_cache at the first invocation, to avoid
11981 multiple calls to getenv.
11983 2011-08-02 Bob Duff <duff@adacore.com>
11985 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11987 2011-08-02 Yannick Moy <moy@adacore.com>
11989 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11990 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11991 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11992 indicate that we are in a precondition or postcondition. This is used in
11993 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11994 decide whether to flag the spec or body of the current subprogram as
11997 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
11999 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
12001 * a-extiin.ads: New file.
12003 2011-08-02 Bob Duff <duff@adacore.com>
12005 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
12006 now raises Name_Error instead of Use_Error in certain cases. The other
12007 parts of this AI were already implemented properly.
12009 2011-08-02 Vincent Celier <celier@adacore.com>
12011 * link.c: Only import "auto-host.h" when building the gnattools.
12013 2011-08-02 Yannick Moy <moy@adacore.com>
12015 * sem_util.adb: Inter-unit inlining does not work for a subprogram
12016 which calls a local subprogram, so extract subprogram
12017 from Mark_Non_ALFA_Subprogram_Body.
12019 2011-08-02 Javier Miranda <miranda@adacore.com>
12022 (Extract_Dispatching_Call): If the type of the dispatching object is an
12023 access type then return an explicit dereference in the Object out-mode
12026 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12028 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
12029 compatibility checks for all indexes of an array subtype, not just the
12030 first. Reset Has_Dynamic_Range_Check on the subtype before each
12031 potential check to ensure that Insert_Range_Checks will not elide any
12032 of the dynamic checks.
12034 2011-08-02 Yannick Moy <moy@adacore.com>
12036 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
12037 SPARK restriction at parsing time.
12038 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
12039 directive only if the SPARK restriction is set for this unit.
12041 2011-08-02 Yannick Moy <moy@adacore.com>
12043 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
12044 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
12045 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
12046 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
12047 Mark_Non_ALFA_Subprogram_Body.
12048 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
12051 2011-08-02 Yannick Moy <moy@adacore.com>
12053 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
12056 2011-08-02 Robert Dewar <dewar@adacore.com>
12058 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
12059 exp_ch3.adb: Minor reformatting.
12061 2011-08-02 Emmanuel Briot <briot@adacore.com>
12063 * adaint.c (__gnat_locate_exec_on_path): only returns executable
12064 files, not any regular file.
12065 (__gnat_locate_file_with_predicate): new subprogram.
12067 2011-08-02 Yannick Moy <moy@adacore.com>
12069 * sinfo.adb, sinfo.ads: Restrict the use of flags
12070 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
12071 nodes, plus N_Subtype_Declaration for the 2nd one.
12073 2011-08-02 Sergey Rybin <rybin@adacore.com>
12075 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12076 - fix bugs in the description of Source_Trace;
12077 - get rid of UNIT_NAME;
12079 2011-08-02 Javier Miranda <miranda@adacore.com>
12082 (Build_Dispatching_Requeue): Adding support for VM targets
12083 since we cannot directly reference the Tag entity.
12084 * exp_sel.adb (Build_K): Adding support for VM targets.
12085 (Build_S_Assignment): Adding support for VM targets.
12087 (Default_Prim_Op_Position): In VM targets do not restrict availability
12088 of predefined interface primitives to compiling in Ada 2005 mode.
12089 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12090 restricted to compiling in Ada 2005 mode.
12091 (Make_VM_TSD): Generate code that declares and initializes the OSD
12092 record. Needed to support dispatching calls through synchronized
12095 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12096 primitives associated with synchronized interfaces.
12097 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12098 primitives associated with synchronized interfaces.
12100 2011-08-02 Yannick Moy <moy@adacore.com>
12102 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12103 statements hidden in SPARK if preceded by the HIDE directive
12104 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12105 exception handlers as hidden in SPARK if preceded by the HIDE directive
12106 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12107 if starting with the HIDE directive
12108 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12109 starting with the HIDE directive; mark the declarations in a private
12110 part as hidden in SPARK if the private part starts with the HIDE
12112 * restrict.adb, restrict.ads
12113 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12114 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12115 argument node belongs to a part which is hidden in SPARK
12116 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12117 parts in SPARK; protect the possibly costly call to
12118 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12119 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12120 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12121 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12123 (Scan): recognize special comment starting with '#' and followed by
12124 SPARK keyword "hide" as a HIDE directive.
12126 2011-08-02 Yannick Moy <moy@adacore.com>
12128 * types.ads, erroutc.ads: Minor reformatting.
12130 2011-08-02 Vincent Celier <celier@adacore.com>
12132 * link.c: Add response file support for cross platforms.
12134 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12136 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12137 in an association, set parent field of copy before partial analysis.
12138 * sem_res.adb (Resolve_Slice): create reference to itype only when
12139 expansion is enabled.
12141 2011-08-02 Yannick Moy <moy@adacore.com>
12143 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12144 for new flag denoting which subprogram bodies are in ALFA
12145 * restrict.adb, sem_ch7.adb: Update comment
12146 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12147 sem_ch9.adb, sem_res.adb: Add calls to
12148 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12149 * sem_ch6.adb (Analyze_Function_Return): add calls to
12150 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12151 middle of the body, and extended return.
12152 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12153 False when missing return.
12154 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12155 to True for subprograms whose spec is in ALFA. Remove later on the flag
12156 on the entity used for a subprogram body when there exists a separate
12158 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12159 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12160 False, otherwise do nothing.
12162 2011-08-02 Robert Dewar <dewar@adacore.com>
12164 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12166 2011-08-02 Yannick Moy <moy@adacore.com>
12168 * sem_ch4.ads: minor formatting.
12170 2011-08-02 Yannick Moy <moy@adacore.com>
12172 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12173 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12174 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12175 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12176 opt.ads: cleanup of SPARK mode
12178 2011-08-02 Yannick Moy <moy@adacore.com>
12180 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12182 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12183 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12185 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12186 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12187 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12188 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12190 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12192 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12193 functions whose return type is not in ALFA.
12194 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12196 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12197 parameter's type is not in ALFA.
12198 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12201 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12203 * sem_ch6 (Analyze_Expression_Function): treat the function as
12204 Inline_Always, and introduce a subprogram declaration for it when it is
12206 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12207 expression functions, so that the back-end can determine whether they
12208 can in fact be inlined.
12209 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12210 a function body comes from an expression function.
12212 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12214 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12215 null exclusions to test Can_Never_Be_Null on the anonymous access types
12216 of the formals rather than testing the formals themselves. Exclude this
12217 check in cases where the Old_Formal is marked as a controlling formal,
12218 to avoid issuing spurious errors for bodies completing dispatching
12219 operations (due to the flag not getting set on controlling access
12220 formals in body specs).
12221 (Find_Corresponding_Spec): When checking full and subtype conformance of
12222 subprogram bodies in instances, pass Designated and E in that order, for
12223 consistency with the expected order of the formals (New_Id followed by
12226 2011-08-02 Robert Dewar <dewar@adacore.com>
12228 * sem_ch8.adb: Minor reformatting.
12230 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12232 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12233 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12234 primitive operations of class-wide actuals.
12236 2011-08-02 Javier Miranda <miranda@adacore.com>
12238 * exp_atag.ads, exp_atag.adb
12239 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12240 since its value is implicitly passed in argument Typ.
12241 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12242 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12243 Build_Common_Dispatching_Select_Statements.
12245 2011-08-02 Robert Dewar <dewar@adacore.com>
12247 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12248 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12249 Minor reformatting.
12251 2011-08-02 Robert Dewar <dewar@adacore.com>
12253 * sem_res.adb: Minor reformatting.
12254 * sem_prag.adb: Minor reformatting.
12256 2011-08-02 Javier Miranda <miranda@adacore.com>
12258 * exp_atag.adb, exp_atags.ads
12259 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12260 by the tagged type Entity. Required to use this routine in the VM
12261 targets since we do not have available the Tag entity in the VM
12264 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12265 Ada.Tags has not been previously loaded.
12267 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12268 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12270 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12271 view of enclosing scopes. Required to handle enclosing scopes that
12272 are synchronized types whose full view is a task type.
12274 (Build_VM_TSDs): Minor code improvement to avoid generating and
12275 analyzing lists with empty nodes.
12276 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12277 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12278 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12279 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12280 (Make_Select_Specific_Data_Table): Add support for VM targets.
12281 (Make_VM_TSD): Generate code to initialize the SSD structure of
12284 2011-08-02 Yannick Moy <moy@adacore.com>
12286 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12287 cross-references section in ALI.
12288 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12289 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12291 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12292 subprogram or package entity of a node
12293 (Is_Local_Reference_Type): new function returns True for references
12294 selected in local cross-references.
12295 (Lt): function extracted from Lt in Output_References
12296 (Write_Entity_Name): function extracted from Output_References
12297 (Generate_Definition): generate reference with type 'D' for definition
12298 of objects (object declaration and parameter specification), with
12299 appropriate locations and units, for use in local cross-references.
12300 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12301 references of type 'I' for initialization in object definition.
12302 (Output_References): move part of function Lt and procedure
12303 Write_Entity_Name outside of the body. Ignore references of types 'D'
12304 and 'I' introduced for local cross-references.
12305 (Output_Local_References): new procedure to output the local
12306 cross-references sections.
12307 (Lref_Entity_Status): new array defining whether an entity is a local
12308 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12309 with 'I' type when initialization expression is present.
12310 * get_scos.adb, get_scos.ads: Correct comments and typos
12312 2011-08-02 Javier Miranda <miranda@adacore.com>
12314 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12316 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12318 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12321 2011-08-02 Vincent Celier <celier@adacore.com>
12323 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12324 (No_Space_Img): New function
12325 (Find_Excluded_Sources): When reading from a file, record the file name
12326 and the line number for each excluded source.
12327 (Mark_Excluded_Sources): When reporting an error, if the excluded
12328 sources were read from a file, include file name and line number in
12331 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12333 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12335 2011-08-02 Robert Dewar <dewar@adacore.com>
12337 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12339 2011-08-02 Javier Miranda <miranda@adacore.com>
12341 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12342 generation of TSDs to the DOTNET compiler.
12343 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12344 generation of TSDs to the DOTNET compiler.
12346 2011-08-02 Javier Miranda <miranda@adacore.com>
12348 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12349 record of all the tagged types declared inside library level package
12350 declarations, library level package bodies or library level subprograms.
12351 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12352 associated with a given tagged type.
12353 (Build_VM_TSDs): New subprogram.
12354 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12355 compilation units that are subprograms.
12356 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12357 compilation units that are package bodies.
12358 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12359 units that are a package declaration or a package instantiation.
12360 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12361 reorganization to improve the error generated by the frontend when the
12362 function Ada.Tags.Secondary_Tag is not available.
12363 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12364 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12366 2011-08-02 Javier Miranda <miranda@adacore.com>
12368 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12370 2011-08-02 Robert Dewar <dewar@adacore.com>
12372 * s-imenne.ads: Minor reformatting.
12374 2011-08-02 Robert Dewar <dewar@adacore.com>
12376 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12377 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12378 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12380 2011-08-02 Robert Dewar <dewar@adacore.com>
12382 * einfo.ads (Materialize_Entity): Document this is only for renamings
12383 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12384 required debug information in the case where we transform the object
12385 declaration into a renaming declaration.
12386 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12388 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12389 Materialize_Entity.
12391 2011-08-02 Robert Dewar <dewar@adacore.com>
12393 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12394 Suppress_Init_Procs.
12395 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12396 Suppress_Initialization/Initialization_Suppressed.
12397 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12398 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12399 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12400 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12402 2011-08-02 Robert Dewar <dewar@adacore.com>
12404 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12405 Minor reformatting.
12407 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12409 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12410 only have inheritable classwide pre/postconditions.
12412 2011-08-02 Javier Miranda <miranda@adacore.com>
12414 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12415 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12416 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12417 checks if the external tag of a type is the same as the external tag
12418 of some other declaration.
12420 2011-08-02 Thomas Quinot <quinot@adacore.com>
12422 * s-taskin.ads: Minor reformatting.
12424 2011-08-02 Emmanuel Briot <briot@adacore.com>
12426 * g-comlin.adb (Display_Help): swap the order in which it prints the
12427 short help and the general usage.
12429 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12431 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12432 the aspect declarations and attach them to the generic copy for
12433 subsequent analysis.
12434 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12435 declarations of the generic tree to the new subprogram declarations.
12436 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12437 conditions that apply to a subprogram instance.
12439 2011-08-02 Robert Dewar <dewar@adacore.com>
12441 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12443 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12445 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12446 private type with a tagged full view is not derived in the immediate
12447 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12449 2011-08-02 Robert Dewar <dewar@adacore.com>
12451 * exp_ch4.adb: Minor reformatting.
12453 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12455 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12456 Ada2012 iterator, the loop will be rewritten during expansion into a
12457 while loop with a cursor and an element declaration. Do not analyze the
12458 body in this case, because if the container is for indefinite types the
12459 actual subtype of the elements will only be determined when the cursor
12460 declaration is analyzed.
12462 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12464 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12465 size/alignment related attributes in CodePeer_Mode.
12467 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12469 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12470 Prepend_Element, since this can result in the operation getting the
12471 wrong slot in the full type's dispatch table if the full type has
12472 inherited operations. The incomplete type's operation will get added
12473 to the proper position in the full type's primitives
12474 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12475 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12476 dispatching operations, since there are cases where nonprimitive
12477 subprograms can get added to the list of incomplete dependents (such
12478 as subprograms in nested packages).
12479 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12480 private part when determining whether to add a primitive with a
12481 parameter of a tagged incomplete type to the Private_Dependents list.
12482 Such primitives can also occur in the visible part, and should not have
12483 been excluded from being private dependents.
12484 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12485 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12486 list of a Taft-amendment incomplete type is a primitive before issuing
12487 an error that the full type must appear in the same unit. There are
12488 cases where nonprimitives can be in the list (such as subprograms in
12490 * sem_disp.adb (Derives_From): Use correct condition for checking that
12491 a formal's type is derived from the type of the corresponding formal in
12492 the parent subprogram (the condition was completely wrong). Add
12493 checking that was missing for controlling result types being derived
12494 from the result type of the parent operation.
12496 2011-08-02 Yannick Moy <moy@adacore.com>
12498 * errout.adb (First_Node): minor renaming
12499 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12502 2011-08-02 Yannick Moy <moy@adacore.com>
12504 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12505 before accessing operands.
12506 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12507 decide whether an initialization expression respects SPARK rules, as
12508 the plain node is the expanded one. This allows for more valid warnings
12510 * gnat_rm.texi: Minor update.
12512 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12514 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12517 2011-08-02 Robert Dewar <dewar@adacore.com>
12519 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12521 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12523 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12524 loop statements and the element renaming declaration with a block when
12525 the element type is controlled.
12527 2011-08-02 Yannick Moy <moy@adacore.com>
12529 * sinfo.ads: Minor formatting.
12531 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12533 * sem_aggr.adb (Add_Association): if the association has a box and no
12534 expression, use the Sloc of the aggregate itself for the new
12536 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12539 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12541 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12542 When a container is provided via a function call, generate a renaming
12543 of the function result. This avoids the creation of a transient scope
12544 and the premature finalization of the container.
12545 * exp_ch7.adb (Is_Container_Cursor): Removed.
12546 (Wrap_Transient_Declaration): Remove the supression of the finalization
12547 of the list controller when the declaration denotes a container cursor,
12550 2011-08-02 Yannick Moy <moy@adacore.com>
12552 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12553 node is from source, instead of the original node being from source.
12555 (Resolve_Array_Aggregate): refine the check for a static expression, to
12556 recognize also static ranges
12557 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12558 Array_Type_Declaration): postpone the test for the type being a subtype
12559 mark after the type has been resolved, so that component-selection and
12560 expanded-name are discriminated.
12561 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12562 to distinguish the case of an iteration scheme, so that an error is
12563 issed on a non-static range in SPARK except in an iteration scheme.
12564 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12565 In_Iter_Schm = True.
12566 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12567 user-defined operators so that they are allowed in renaming
12569 (Find_Selected_Component): refine the check for prefixing of operators
12570 so that they are allowed in renaming. Move the checks for restrictions
12571 on selector name after analysis discriminated between
12572 component-selection and expanded-name.
12573 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12574 concatenation argument of string type if it is static.
12575 * sem_util.adb, sem_util.ads
12576 (Check_Later_Vs_Basic_Declarations): add a new function
12577 Is_Later_Declarative_Item to decice which declarations are allowed as
12578 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12579 mode, add that renamings are considered as later items.
12580 (Enclosing_Package): new function to return the enclosing package
12581 (Enter_Name): correct the rule for homonyms in SPARK
12582 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12583 from source (result of expansion) to avoid issuing wrong warnings.
12585 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12587 * errout.adb: On anything but an expression First_Node returns its
12590 2011-08-02 Pascal Obry <obry@adacore.com>
12592 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12594 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12596 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12597 Set the associated loop as the related expression of internally
12599 * exp_ch7.adb (Is_Container_Cursor): New routine.
12600 (Wrap_Transient_Declaration): Supress the finalization of the list
12601 controller when the declaration denotes a container cursor.
12603 2011-08-02 Yannick Moy <moy@adacore.com>
12605 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12607 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12608 expression is a simple expression. This check cannot be performed in
12609 the semantics, so just drop it.
12610 (P_Index_Or_Discriminant_Constraint): move check that the index or
12611 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12612 semantics. Other cases were previously checked in the semantics.
12613 * par-ch4.adb (P_Name): move checks that a selector name is not
12614 character literal or an operator symbol to Find_Selected_Component in
12616 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12617 declarations are not placed after later declarations in a separate
12618 procedure in Sem_Util (possibly not the best choice?), to be used both
12619 during parsing, for Ada 83 mode, and during semantic analysis, for
12621 * par-endh.adb (Check_End): move check that end label is not missing
12622 to Process_End_Label in the semantics
12623 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12624 the special case for SPARK restriction
12625 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12626 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12627 parameter Force to issue the error message even on internal node (used
12628 for generated end label). Call Check_Restriction to check when an error
12629 must be issued. In SPARK mode, issue an error message even if the
12630 restriction is not set.
12631 (Check_Restriction): new procedure with an additional out parameter to
12632 inform the caller that a message has been issued
12633 * sem_aggr.adb: Minor modification of message
12634 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12635 instead of issuing an error message directly
12636 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12637 declarations are not placed after later declarations, by calling
12638 Check_Later_Vs_Basic_Declarations
12639 (Analyze_Subtype_Declaration): move here the check that an index or
12640 discriminant constraint must be a subtype mark. Change the check that
12641 a subtype of String must start at one so that it works on subtype marks.
12642 * sem_ch4.adb (Analyze_Call): move here the check that a named
12643 association cannot follow a positional one in a call
12644 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12645 instead of issuing an error message directly
12646 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12647 selector name is not a character literal or an operator symbol. Move
12648 here the check that the prefix of an expanded name cannot be a
12649 subprogram or a loop statement.
12650 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12651 procedure called from parsing and semantics to check that basic
12652 declarations are not placed after later declarations
12653 (Process_End_Label): move here the check that end label is not missing
12655 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12657 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12658 representation clause in codepeer mode, since it confuses CodePeer and
12659 does not bring useful info.
12661 2011-08-02 Ed Falis <falis@adacore.com>
12663 * init.c: initialize fp hw on MILS.
12665 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12667 * errout.adb (First_Node): for bodies, return the node itself (small
12668 optimization). For other nodes, do not check source_unit if the node
12669 comes from Standard.
12671 2011-08-02 Robert Dewar <dewar@adacore.com>
12673 * exp_ch3.adb: Minor comment additions.
12674 * sem_ch13.adb: Minor reformatting.
12676 2011-08-02 Pascal Obry <obry@adacore.com>
12678 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12680 2011-08-02 Robert Dewar <dewar@adacore.com>
12682 * sem_attr.adb: Minor reformatting.
12684 2011-08-02 Robert Dewar <dewar@adacore.com>
12686 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12687 (Has_Default_Component_Value): Removed
12688 * einfo.ads Comment updates
12689 (Has_Default_Aspect): Replaces Has_Default_Value
12690 (Has_Default_Component_Value): Removed
12692 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12694 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12695 (Get_Simple_Init_Val): Handle Default_Value aspect
12696 (Needs_Simple_Initialization): Handle Default_Value aspect
12697 * exp_ch3.ads: Needs_Simple_Initialization
12698 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12699 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12701 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12702 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12703 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12705 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12707 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12708 package containing iteration primitives.
12709 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12711 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12713 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12714 "of", pre-analyze expression in case it is a function call with
12715 finalization actions that must be placed ahead of the loop.
12716 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12717 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12719 2011-08-02 Geert Bosch <bosch@adacore.com>
12721 * cstand.adb (Create_Float_Types): Only consider C's long double for
12722 Long_Long_Float, in addition to double.
12724 2011-08-02 Robert Dewar <dewar@adacore.com>
12726 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12727 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12728 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12729 Minor reformatting.
12731 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12733 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12736 2011-08-02 Javier Miranda <miranda@adacore.com>
12738 * einfo.ads, einfo.adb
12739 (Original_Access_Type): Move this attribute to Node26 since there was
12740 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12741 which causes conflicts and breaks the generation of the .NET compiler.
12742 (Interface_Name): Add missing documentation on JGNAT only uses of
12745 2011-08-02 Geert Bosch <bosch@adacore.com>
12747 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12748 (Find_Back_End_Float_Type): Likewise
12749 (Create_Back_End_Float_Types): Likewise
12750 (Create_Float_Types): Likewise
12751 (Register_Float_Type): Likewise
12752 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12753 Nlist and split out type selection in new local Find_Base_Type function.
12754 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12756 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12758 2011-08-02 Robert Dewar <dewar@adacore.com>
12760 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12762 * opt.ads: Minor comment change.
12763 * sem_ch12.adb: Minor code reorganization.
12765 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12767 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12768 subtype's list of rep items to the list on the full subtype in the case
12769 where the lists are the same.
12771 2011-08-02 Geert Bosch <bosch@adacore.com>
12773 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12774 using the one from System.Strings, which also deallocates all strings.
12776 2011-08-02 Geert Bosch <bosch@adacore.com>
12778 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12780 * gcc-interface/Make-lang.in: Update dependencies.
12782 2011-08-02 Olivier Hainque <hainque@adacore.com>
12784 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12787 2011-08-02 Javier Miranda <miranda@adacore.com>
12789 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12790 associated with anonymous access to subprograms.
12792 2011-08-02 Geert Bosch <bosch@adacore.com>
12795 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12796 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12797 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12798 (Add_Symbol_Definition): Move to switch-c.adb
12799 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12800 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12801 (Add_Symbol_Definition): Move to switch-c.adb.
12802 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12804 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12805 Move to warnsw.adb.
12806 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12807 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12808 Move to warnsw.adb.
12809 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12810 (Add_Symbol_Definition): Moved from Prepcomp.
12811 * switch-c.ads: Update copyright notice. Use String_List instead of
12812 Argument_List, removing dependency on System.OS_Lib.
12814 2011-08-02 Yannick Moy <moy@adacore.com>
12816 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12817 mode on initialization expression which does not respect SPARK
12819 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12820 if the tree referenced by its argument represents an initialization
12821 expression in SPARK, suitable for initializing an object in an object
12824 2011-08-02 Javier Miranda <miranda@adacore.com>
12826 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12827 internally generated access to subprogram with its associated protected
12829 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12831 2011-08-02 Geert Bosch <bosch@adacore.com>
12833 * cstand.adb (Register_Float_Type): Print information about type to
12834 register, if the Debug_Flag_Dot_B is set.
12835 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12836 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12837 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12838 with a requested precision of more than Max_Digits digits and no more
12839 than Max_Base_Digits digits, if a range specification is present and the
12840 Predefined_Float_Types list has a suitable type to derive from.
12841 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12842 case of type completion with pragma Import
12844 (Process_Import_Predefined_Type): Processing to complete a type
12845 with pragma Import. Currently supports floating point types only.
12846 (Set_Convention_From_Pragma): Do nothing without underlying type.
12847 (Process_Convention): Guard against absence of underlying type,
12848 which may happen when importing incomplete types.
12849 (Process_Import_Or_Interface): Handle case of importing predefined
12850 types. Tweak error message.
12852 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12854 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12855 functions to previous change. Reorganize code slightly.
12857 2011-08-02 Geert Bosch <bosch@adacore.com>
12859 * back_end.ads (Register_Type_Proc): New call back procedure type for
12860 allowing the back end to provide information about available types.
12861 (Register_Back_End_Types): New procedure to register back end types.
12862 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12864 * cstand.adb (Back_End_Float_Types): New list for floating point types
12865 supported by the back end.
12866 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12867 (Copy_Float_Type): New procedure to make new copies of predefined types.
12868 (Register_Float_Type): New call back procedure to populate the BEFT list
12869 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12870 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12871 (Create_Float_Types): New procedure to create entities for floating
12872 point types predefined in Standard, and put these and any remaining
12873 BEFTs on the Predefined_Float_Types list.
12874 * stand.ads (Predefined_Float_Types): New list for predefined floating
12875 point types that do not have declarations in package Standard.
12877 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12879 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12880 entity node for the unit containing the parameter.
12881 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12882 (Add_Inlined_Subprogram): Likewise.
12883 * gcc-interface/Make-lang.in: Update dependencies.
12885 2011-08-02 Thomas Quinot <quinot@adacore.com>
12887 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12890 2011-08-02 Geert Bosch <bosch@adacore.com>
12892 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12894 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12896 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12897 computed value of Base_Type.
12899 2011-08-02 Yannick Moy <moy@adacore.com>
12901 * restrict.adb (Check_Restriction): issue an error for any use of
12902 class-wide, even if the No_Dispatch restriction is not set.
12903 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12904 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12905 when completing a private extension, the type named in the private part
12906 is not the same as that named in the visible part.
12907 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12908 of an inherited primitive operations of a tagged type or type extension
12909 that returns the tagged type.
12910 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12911 function which returns True for an implicit operation inherited by the
12912 derived type declaration for the argument type.
12913 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12916 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12918 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12919 Process_Bounds, to perform analysis with expansion of a range or an
12920 expression that is the iteration scheme for a loop.
12921 (Analyze_Iterator_Specification): If domain of iteration is given by a
12922 function call with a controlled result, as is the case if call returns
12923 a predefined container, ensure that finalization actions are properly
12925 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12927 2011-08-02 Javier Miranda <miranda@adacore.com>
12929 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12930 * gcc-interface/Make-lang.in: Update dependencies.
12932 2011-08-02 Javier Miranda <miranda@adacore.com>
12934 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12935 determine if the analysis is performed using N or Original_Node (N).
12936 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12937 functionality of routine Is_Variable avoids code duplication.
12938 * checks.adb (Determine_Range): Handle temporaries generated by
12939 Remove_Side_Effects.
12941 2011-08-02 Javier Miranda <miranda@adacore.com>
12943 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12944 expansion of the condition. Required since the previous analysis was
12945 done with expansion disabled (see Resolve_Quantified_Expression) and
12946 hence checks were not inserted and record comparisons have not been
12949 2011-08-02 Ed Falis <falis@adacore.com>
12951 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12954 2011-08-02 Bob Duff <duff@adacore.com>
12956 * opt.ads: Minor comment fix.
12958 2011-08-02 Bob Duff <duff@adacore.com>
12960 * sem_ch12.adb (Analyze_Package_Instantiation,
12961 Analyze_Subprogram_Instantiation): Turn off style checking while
12962 analyzing an instance. Whatever style checks that apply to the generic
12963 unit should apply, so it makes no sense to apply them in an instance.
12964 This was causing trouble when compiling an instance of a runtime
12965 unit that violates the -gnatyO switch.
12966 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12967 one of the two case statements, causing spurious errors.
12969 2011-08-02 Robert Dewar <dewar@adacore.com>
12971 * uname.adb: Minor reformatting.
12972 * gnatcmd.adb: Minor reformatting.
12973 * exp_attr.adb: Minor reformatting.
12975 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12977 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12978 No_Dispatching_Calls, do not look for the Assign primitive, because
12979 predefined primitives are not created in this case.
12981 2011-08-02 Bob Duff <duff@adacore.com>
12983 * stylesw.ads: Minor comment fixes.
12985 2011-08-02 Robert Dewar <dewar@adacore.com>
12987 * freeze.adb (Add_To_Result): New procedure.
12989 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12991 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12992 time, if the specific run-time routines for handling streams of strings
12993 are not available, use the default mechanism.
12995 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12997 * s-regpat.ads: Fix typo.
12999 2011-08-02 Vincent Celier <celier@adacore.com>
13001 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13002 not null, call it to create the in memory config project file without
13003 parsing an existing default config project file.
13005 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13007 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13011 * sem_elim.adb: an abstract subprogram does not need an eliminate
13012 pragma for its descendant to be eliminable.
13014 2011-08-02 Ed Falis <falis@adacore.com>
13016 * init.c: revert to handling before previous checkin for VxWorks
13017 * s-intman-vxworks.adb: delete unnecessary declarations related to
13018 using Ada interrupt facilities for handling signals.
13019 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13020 * s-intman-vxworks.ads: Import __gnat_install_handler as
13021 Initialize_Interrupts.
13022 * s-taprop-vxworks.adb: Delete Signal_Mask.
13023 (Abort_Handler): change construction of mask to unblock exception
13026 2011-08-02 Jerome Guitton <guitton@adacore.com>
13028 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13029 Debug_Raise_Exception before propagation starts.
13031 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13033 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13034 to Restriction_Check_Required.
13035 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13036 * sem_res.adb (Resolve_Call): Likewise.
13037 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13039 2011-08-02 Bob Duff <duff@adacore.com>
13041 * stylesw.ads: Update comment.
13042 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13043 * errout.ads: Remove obsolete comment.
13045 2011-08-02 Javier Miranda <miranda@adacore.com>
13047 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13048 (Set_Is_Safe_To_Reevaluate): new procedure.
13049 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13050 assignment is allowed on safe-to-reevaluate variables.
13051 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13052 temporary created to remove side effects in expressions that use
13053 the secondary stack as safe-to-reevaluate.
13054 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13055 variables that are not true constants.
13057 2011-08-02 Robert Dewar <dewar@adacore.com>
13059 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13060 sem_res.adb, sem_ch6.adb: Minor reformatting.
13062 2011-08-02 Jerome Guitton <guitton@adacore.com>
13064 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13068 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13069 not set Overridden_Operation if subprogram is an initialization
13072 2011-08-02 Yannick Moy <moy@adacore.com>
13074 * par-ch6.adb: Correct obsolete name in comments
13075 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13076 which takes two message arguments (existing function takes one), with
13077 second message used for continuation.
13078 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13079 block statements that originate from a source block statement, not
13080 generated block statements
13081 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13082 symmetry with procedure case
13083 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13084 function to issue an error in formal mode if a package specification
13085 contains more than one tagged type or type extension.
13086 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13087 parameters matching formals of tagged types are objects (or ancestor
13088 type conversions of objects), not general expressions. Issue an error
13089 on view conversions that are not involving ancestor conversion of an
13091 (Resolve_Type_Conversion): in formal mode, issue an error on the
13092 operand of an ancestor type conversion which is not an object
13093 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13094 procedure so that it works also for actuals of function calls
13095 (Is_Actual_Tagged_Parameter): new function which determines if its
13096 argument is an actual parameter of a formal of tagged type in a
13098 (Is_SPARK_Object_Reference): new function which determines if the tree
13099 referenced by its argument represents an object in SPARK
13101 2011-08-02 Robert Dewar <dewar@adacore.com>
13103 * sem_ch3.adb: Minor reformatting
13104 Minor comment addition
13105 Minor error msg text change
13107 2011-08-02 Javier Miranda <miranda@adacore.com>
13109 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13110 function. Used to be more precise when we generate a variable plus one
13111 assignment to remove side effects in the evaluation of the Bound
13113 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13114 of the bound expression to force its re-analysis and thus expand the
13115 associated transient scope (if required). Code cleanup replacing the
13116 previous code that declared the constant entity by an invocation to
13117 routine Force_Evaluation which centralizes this work in the frontend.
13119 2011-08-02 Robert Dewar <dewar@adacore.com>
13121 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13122 (Base_Type): Now uses improved Is_Base_Type function
13123 * einfo.ads (Base_Type): Inline this function
13125 2011-08-02 Robert Dewar <dewar@adacore.com>
13127 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13128 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13130 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13132 * gcc-interface/Make-lang.in: Update dependencies.
13133 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13136 2011-08-02 Yannick Moy <moy@adacore.com>
13138 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13139 non-simple expression used in delta constraint
13140 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13141 index constraint which is not a subtype mark
13142 * par.adb: With and use Restrict
13143 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13144 mode on component type which is not a subtype mark and default
13145 expression on component
13146 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13147 of string which does not have a lower index bound equal to 1
13148 (Array_Type_Declaration): issue an error in formal mode on index or
13149 component type which is not a subtype mark, and on aliased keyword on
13151 (Derived_Type_Declaration): issue an error in formal mode on interface,
13152 limited or abstract type
13153 (Record_Type_Declaration): issue an error in formal mode on interface
13154 (Record_Type_Definition): issue an error in formal mode on tagged types
13155 and type extensions not declared in the specification of a library unit
13156 package; on null non-tagged record; on variant part
13158 2011-08-02 Vincent Celier <celier@adacore.com>
13160 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13161 not declared for qualified library project when Library_Name is not
13162 declared, but Library_Dir is.
13164 2011-08-02 Robert Dewar <dewar@adacore.com>
13166 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13167 pragmas (affects aspects [Component_]Default_Value
13168 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13169 component type for the resolution
13171 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13173 * einfo.adb (Base_Type): Tune implementation for speed.
13175 2011-08-02 Robert Dewar <dewar@adacore.com>
13177 * freeze.adb: Minor reformatting.
13179 2011-08-02 Thomas Quinot <quinot@adacore.com>
13181 * scos.ads: Update comments.
13183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13185 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13186 base type, because the parent may be a subtype of a private type whose
13187 convention is established in a private part.
13189 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13191 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13192 statement in a block when the expansion of the return expression has
13193 created a finalization chain.
13194 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13195 with the parent node.
13196 Add N_Extended_Return_Statement to handle the case where a transient
13197 object declaration appears in the Return_Object_Declarations list of
13198 an extended return statement.
13200 2011-08-02 Matthew Gingell <gingell@adacore.com>
13202 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13203 unused parameter 'name'.
13205 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13207 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13208 inherited operation, check whether its alias, which is the source
13209 operastion that it renames, has been marked eliminated.
13211 2011-08-02 Javier Miranda <miranda@adacore.com>
13213 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13214 in-mode parameter whose type is an access type since it can be used to
13215 modify its designated object. Enforce code that handles as safe an
13216 access type that is not access-to-constant but it is the result of a
13217 previous removal of side-effects.
13218 (Remove_Side_Effects): Minor code reorganization of cases which require
13219 no action. Done to incorporate documentation on new cases uncovered
13220 working in this ticket: no action needed if this routine was invoked
13221 too early and the nodes are not yet decorated.
13222 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13223 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13224 were issued with actuals that are implicitly provided by
13227 2011-08-02 Robert Dewar <dewar@adacore.com>
13229 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13231 2011-08-02 Yannick Moy <moy@adacore.com>
13233 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13234 to issue an error in formal mode on attribute not supported in this mode
13235 (Analyze_Attribute): issue errors on standard attributes not supported
13237 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13238 comment, and issue error in formal mode on modulus which is not a power
13240 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13242 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13244 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13245 operator on modular type (except 'not').
13247 2011-08-02 Robert Dewar <dewar@adacore.com>
13249 * gnat_rm.texi: Minor reformatting.
13251 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13253 * s-osinte-linux.ads: Minor comment update and reformatting.
13254 * i-cexten.ads: Make this unit pure, as for its parent.
13255 Will allow its usage in more contexts if needed.
13257 2011-08-02 Robert Dewar <dewar@adacore.com>
13259 * s-utf_32.ads: Minor comment fix.
13261 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13263 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13264 operation of a tagged synchronized type, handle the case where the
13265 controlling argument is overloaded.
13267 2011-08-02 Yannick Moy <moy@adacore.com>
13269 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13270 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13271 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13272 SPARK mode and formal verification mode on processing SPARK restriction
13273 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13274 requiring consistency checking.
13276 2011-08-02 Robert Dewar <dewar@adacore.com>
13278 * sem_res.adb: Minor reformatting.
13280 2011-08-02 Robert Dewar <dewar@adacore.com>
13282 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13283 a-cforse.ads: Remove unneeded with of Ada.Containers
13284 Remove commented out pragma Inline's
13285 Move specifications of new subprograms to the actual specs
13287 2011-08-02 Yannick Moy <moy@adacore.com>
13289 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13290 a-cforse.ads: Update comments.
13292 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13294 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13296 2011-08-02 Robert Dewar <dewar@adacore.com>
13298 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13299 a-cforse.ads, a-cofove.ads: Minor reformatting.
13301 2011-08-02 Claire Dross <dross@adacore.com>
13303 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13304 a-cofove.ads: Add comments.
13306 2011-08-02 Yannick Moy <moy@adacore.com>
13308 * gnat_rm.texi: Document formal containers.
13310 2011-08-02 Emmanuel Briot <briot@adacore.com>
13312 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13313 are empty sections.
13315 2011-08-02 Robert Dewar <dewar@adacore.com>
13317 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13320 2011-08-02 Robert Dewar <dewar@adacore.com>
13322 * aspects.adb: New aspects Default_Value and Default_Component_Value
13323 New format of Aspect_Names table checks for omitted entries
13324 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13325 handling of boolean aspects for derived types.
13326 New aspects Default_Value and Default_Component_Value
13327 New format of Aspect_Names table checks for omitted entries
13328 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13329 (Has_Default_Value): New flag
13330 (Has_Default_Component_Value): New flag
13331 (Has_Default_Value): New flag
13332 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13334 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13335 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13336 Default_Value and Default_Component_Value
13337 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13338 New aspects Default_Value and Default_Component_Value
13339 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13340 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13342 2011-08-02 Vincent Celier <celier@adacore.com>
13344 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13345 inherit library kind.
13347 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13349 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13350 Minor reformatting.
13352 2011-08-02 Robert Dewar <dewar@adacore.com>
13354 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13356 2011-08-02 Yannick Moy <moy@adacore.com>
13358 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13360 2011-08-02 Robert Dewar <dewar@adacore.com>
13362 * impunit.adb: Add comment.
13364 2011-08-02 Yannick Moy <moy@adacore.com>
13366 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13367 qualification of aggregates in formal mode
13368 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13370 (Resolve_Aggregate): complete the test that an aggregate is adequately
13371 qualified in formal mode
13373 2011-08-02 Pascal Obry <obry@adacore.com>
13375 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13376 * mlib-prj.adb: Supress warning when compiling binder generated file.
13377 (Build_Library): Supress all warnings when compiling the binder
13380 2011-08-02 Yannick Moy <moy@adacore.com>
13382 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13384 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13385 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13386 Add with/use clauses to make Check_Formal_Restriction visible
13388 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13390 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13391 in-parameters when type of the generic formal is private in the generic
13392 spec and non-private in the body.
13394 2011-08-02 Claire Dross <dross@adacore.com>
13396 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13397 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13398 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13399 * impunit.adb, Makefile.rtl: Take new files into account.
13401 2011-08-02 Robert Dewar <dewar@adacore.com>
13403 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13404 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13406 2011-08-02 Yannick Moy <moy@adacore.com>
13408 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13410 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13411 matching static array bounds, taking into account the special case of
13413 * sem_ch3.adb: Typo in comment.
13415 2011-08-02 Yannick Moy <moy@adacore.com>
13417 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13418 which issues an error in formal mode if its argument node is originally
13420 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13421 has a discriminant specification so that it does not include the case
13423 (Derived_Type_Declaration): move here the test that a derived type has a
13424 discriminant specification
13425 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13426 first element of a component association before accessing its choices
13427 (presence of component association is not enough)
13428 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13429 declaration is a library item before accessing the next element in a
13430 list, as library items are not member of lists
13431 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13432 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13433 Check_Formal_Restriction whenever possible.
13435 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13437 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13438 reference when needed.
13440 2011-08-02 Bob Duff <duff@adacore.com>
13442 * gnat_ugn.texi: Fix typo.
13444 2011-08-02 Vincent Celier <celier@adacore.com>
13446 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13447 archive file name. Do not use the full path name of archives for Open
13450 2011-08-02 Robert Dewar <dewar@adacore.com>
13452 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13453 Analyze_Aspect_Specifications
13455 (Analyze_Aspect_Specifications): New handling for boolean aspects
13456 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13457 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13458 sequence for Analyze_Aspect_Specifications
13459 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13460 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13462 2011-08-02 Robert Dewar <dewar@adacore.com>
13464 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13465 aspects, since these no longer exist.
13467 2011-08-02 Robert Dewar <dewar@adacore.com>
13469 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13470 semicolon, do not try to see if there are aspects following it.
13471 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13474 2011-08-02 Robert Dewar <dewar@adacore.com>
13476 * sem_ch8.adb, aspects.ads: Minor reformatting.
13478 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13480 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13481 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13483 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13485 2011-08-02 Yannick Moy <moy@adacore.com>
13487 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13488 mode on subprogram declaration outside of package specification, unless
13489 it is followed by a pragma Import
13490 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13491 Access_Type_Declaration): issue error in formal mode on access type
13492 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13494 (Analyze_Object_Declaration): issue error in formal mode on object
13495 declaration which does not respect SPARK restrictions
13496 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13497 declaration which does not respect SPARK restrictions
13498 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13499 error in formal mode on digits or delta constraint
13500 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13501 decimal fixed point type
13502 (Derived_Type_Declaration): issue error in formal mode on derived type
13503 other than type extensions of tagged record types
13504 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13505 with check on access definition
13506 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13507 mode on protected definition.
13508 (Analyze_Task_Definition): issue error in formal mode on task definition
13510 2011-08-02 Robert Dewar <dewar@adacore.com>
13512 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13514 2011-08-02 Javier Miranda <miranda@adacore.com>
13516 * sem_ch6.adb (Can_Override_Operator): New function.
13517 (Verify_Overriding_Indicator): Add missing code to check overriding
13518 indicator in operators. Fixes regression.
13519 (Check_Overriding_Indicator): Minor reformating after replacing the
13520 code that evaluates if the subprogram can override an operator by
13521 invocations to the above new function.
13523 (Write_Field26_Name): Add missing code to ensure that, following
13524 the documentation in einfo.ads, this field is not shown as attribute
13525 "Static_Initialization" on non-dispatching functions.
13527 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13529 * sem_res.adb (Resolve_Call): A call to
13530 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13531 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13532 i.e., when the second parameter is of type Time_Span.
13534 2011-08-02 Vincent Celier <celier@adacore.com>
13536 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13537 with an archive instead of -L<library dir> -l<library name>.
13539 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13541 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13542 mark the base types In_Use in addition to making the operations
13545 2011-08-02 Ed Falis <falis@adacore.com>
13547 * init.c: add and setup __gnat_signal_mask for the exception signals
13548 * s-inmaop-vxworks.adb: new file.
13549 * s-intman-vxworks.adb: remove unnecessary initializations and
13551 * s-intman-vxworks.ads: remove unnecessary variable
13552 * s-taprop-vxworks.adb: simplify signal initialization
13554 2011-08-02 Robert Dewar <dewar@adacore.com>
13556 * sem_ch8.adb: Minor code reorganization, comment updates.
13558 2011-08-02 Robert Dewar <dewar@adacore.com>
13560 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13561 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13563 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13564 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13568 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13569 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13570 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13571 use_type_clauses, to handle more efficiently use_type and use_all_type
13573 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13574 Ada2012 Use_All_Type clause.
13575 (Use_Class_Wide_Operations): new procedure.
13577 2011-08-02 Robert Dewar <dewar@adacore.com>
13579 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13580 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13581 expression to expression function.
13583 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13585 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13586 if types are compatible.
13588 2011-08-02 Yannick Moy <moy@adacore.com>
13590 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13591 returns True if its argument array types have same dimension and same
13592 static bounds at each index.
13593 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13594 OUT or IN OUT paramaters which are not view conversions in SPARK.
13595 (Resolve_Arithmetic_Op): issue an error in formal mode on
13596 multiplication or division with operands of fixed point types which are
13597 not qualified or explicitly converted.
13598 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13599 Boolean or array type (except String) operands.
13600 (Resolve_Equality_Op): issue an error in formal mode on equality
13601 operators for array types other than String with non-matching static
13603 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13604 for array types with non-matching static bounds. Factorize the code in
13605 Matching_Static_Array_Bounds.
13606 (Resolve_Qualified_Expression): issue an error in formal mode on
13607 qualified expressions for array types with non-matching static bounds.
13608 (Resolve_Type_Conversion): issue an error in formal mode on type
13609 conversion for array types with non-matching static bounds
13611 2011-08-02 Robert Dewar <dewar@adacore.com>
13613 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13615 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13617 * par-ch9.adb: save location of entry for proper error message.
13619 2011-08-02 Javier Miranda <miranda@adacore.com>
13621 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13622 (Use_Full_View) which permits this routine to climb through the
13623 ancestors using the full-view of private parents.
13624 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13625 Use_Full_View to true in calls to Is_Ancestor.
13626 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13627 true in call to Is_Ancestor.
13628 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13629 Use_Full_View to true in call to Is_Ancestor.
13630 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13631 call to Is_Ancestor.
13632 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13633 Use_Full_View to true in calls to Is_Ancestor.
13634 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13635 Make_Select_Specific_Data_Table, Register_Primitive,
13636 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13637 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13638 to true in call to Is_Ancestor.
13639 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13640 Use_Full_View to true in calls to Is_Ancestor.
13642 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13643 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13645 2011-08-02 Robert Dewar <dewar@adacore.com>
13647 * gnat_rm.texi: Minor reformatting.
13648 * sem_prag.adb: Minor reformatting.
13650 2011-08-02 Tristan Gingold <gingold@adacore.com>
13652 * vms_data.ads: Add VMS qualifier for -gnateP.
13654 2011-08-02 Robert Dewar <dewar@adacore.com>
13656 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13657 * par-ch7.adb (P_Package): Proper placement of aspects for package
13658 decl/instantiation.
13659 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13660 (End_Statements): Add Is_Sloc parameterr
13661 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13662 (Check_End): Ad Is_Sloc parameter
13663 (End_Statements): Add Is_Sloc parameterr
13665 2011-08-02 Vincent Celier <celier@adacore.com>
13667 * ug_words: Add VMS qualifier equivalent to -gnateP:
13668 /SYMBOL_PREPROCESSING.
13670 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13672 * gnat-style.texi: For hexadecimal numeric literals the typical
13673 grouping of digits is 4 to represent 2 bytes.
13674 A procedure spec which is split into several lines is indented two
13677 2011-08-02 Yannick Moy <moy@adacore.com>
13679 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13680 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13681 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13683 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13684 choice in array aggregate
13685 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13687 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13688 positional and named aggregate for record, or others in record
13689 aggregate, or multiple choice in record aggregate
13690 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13691 array operands to logical operations AND, OR and XOR do not have the
13692 same static lower and higher bounds
13693 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13695 2011-08-01 Robert Dewar <dewar@adacore.com>
13697 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13698 Replaces Last_Source_Node_In_Sequence.
13699 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13700 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13701 parens and blank in string (this was inconsistently implemented).
13703 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13704 blank in string (this was inconsistently implemented).
13706 (Set_Global_Switches): Set formal mode switches appropriately
13707 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13709 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13710 call Set_Error_Msg_Lang to set "spark" as language name.
13711 * par.adb: Remove unnecessary call to set formal language for errout
13712 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13713 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13715 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13716 calls to it, moved after resolution so that types are known
13717 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13718 result of concatenation is not of type String
13719 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13720 concatenation is not properly restricted
13721 * gnat_rm.texi: Add doc on pragma Spark_95.
13722 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13723 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13724 * gcc-interface/Make-lang.in: Update dependencies.
13726 2011-08-01 Javier Miranda <miranda@adacore.com>
13728 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13729 condition that detects if the overridden operation must replace an
13732 2011-08-01 Javier Miranda <miranda@adacore.com>
13734 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13735 code declarations inserted by Insert_Actions in each alternative of the
13736 N_Case_Expression node.
13738 2011-08-01 Robert Dewar <dewar@adacore.com>
13740 * sem_ch6.adb: Minor code reorganization.
13741 * sem_util.adb: Minor reformatting.
13743 2011-08-01 Pascal Obry <obry@adacore.com>
13745 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13746 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13748 2011-08-01 Yannick Moy <moy@adacore.com>
13750 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13751 literal or operator symbol which is prefixed
13752 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13753 mode on access attributes.
13754 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13755 that concatenation operands are properly restricted in formal mode
13756 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13757 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13758 result of the concatenation has a type different from String.
13759 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13760 Analyze_Quantified_Expression, Analyze_Slice,
13761 Analyze_Null): issue an error in formal mode on unsupported constructs
13763 (Analyze_Block_Statement): only issue error on source block statement
13764 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13765 function which returns the last node in a list of nodes for which
13766 Comes_From_Source returns True, if any
13767 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13768 Last_Source_Node_In_Sequence
13769 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13770 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13771 mode on unsupported constructs
13772 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13773 rest of the actions may be needed later on since the error is marked as
13775 * sinfo.ads: Typos in comments.
13777 2011-08-01 Pascal Obry <obry@adacore.com>
13779 * projects.texi: Minor editing.
13781 2011-08-01 Yannick Moy <moy@adacore.com>
13783 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13784 insertion character ~~
13785 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13786 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13787 with insertion character ~~
13788 (Set_Msg_Text): treat insertion character ~~
13789 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13790 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13791 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13792 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13793 errors related to the formal language restriction not serious
13794 (insertion character |).
13795 * par.adb (Par): set formal language for error messages if needed
13796 * sem_ch6.adb (Check_Missing_Return): take into account possible
13797 generated statements at the end of the function
13798 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13799 enumeration value to define a new pragma SPARK_95
13800 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13801 SPARK_Version): new type and variables to store the SPARK version
13803 (SPARK_Mode): return True when SPARK_Version is set
13804 * par-prag.adb: Correct indentation
13805 (Prag): take Pragma_SPARK_95 into account
13806 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13809 2011-08-01 Robert Dewar <dewar@adacore.com>
13811 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13812 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13813 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13815 2011-08-01 Pascal Obry <obry@adacore.com>
13817 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13818 Target_Name to Get_Path call.
13819 (Parse_Single_Project): Likewise.
13820 (Post_Parse_Context_Clause): Likewise.
13821 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13822 Call Initialise_Project_Path with the proper Target_Name.
13823 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13825 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13826 with the proper Target_Name.
13827 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13828 Part.Parse routine.
13829 (Parse_Project_And_Apply_Config): Likewise.
13830 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13831 This is fine as this part of the code is supporting only native
13833 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13834 is fine as this part of the code is supporting only native compilation.
13836 2011-08-01 Yannick Moy <moy@adacore.com>
13838 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13839 of homonym, unless the homonym is one of the cases allowed in SPARK
13840 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13841 package declaration occurring after a body.
13843 2011-08-01 Robert Dewar <dewar@adacore.com>
13845 * checks.adb, exp_ch4.adb: Minor reformatting.
13847 2011-08-01 Javier Miranda <miranda@adacore.com>
13849 * einfo.ads (Access_Disp_Table): Fix documentation.
13850 (Dispatch_Table_Wrappers): Fix documentation.
13852 2011-08-01 Pascal Obry <obry@adacore.com>
13854 * prj-env.adb, prj-env.ads: Minor reformatting.
13856 2011-08-01 Yannick Moy <moy@adacore.com>
13858 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13859 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13860 procedures out of these packages.
13861 * errout.ads, errout.adb
13862 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13863 procedures in of this package
13864 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13865 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13866 on misplaced later vs initial declarations, like in Ada 83
13867 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13868 formal mode on attribute of private type whose full type declaration
13870 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13871 package declaration inside a package specification
13872 (Analyze_Full_Type_Declaration): issue error in formal mode on
13873 controlled type or discriminant type
13874 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13875 user-defined operator means that it should come from the source
13876 (New_Overloaded_Entity): issue error in formal mode on overloaded
13878 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13880 2011-08-01 Thomas Quinot <quinot@adacore.com>
13882 * atree.adb: Minor reformatting.
13883 * checks.adb: Minor reformatting.
13885 2011-08-01 Vincent Celier <celier@adacore.com>
13887 * s-parame-vms-ia64.ads: Fix typo in comment
13889 * s-parame-vms-restrict.ads: Removed, unused.
13891 2011-08-01 Javier Miranda <miranda@adacore.com>
13894 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13896 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13897 * sem_ch3.ads, sem_ch3.adb
13898 (Is_Constant_Bound): New extended version of the subprogram that was
13899 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13900 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13901 * sem_aux.ads (Constant_Value): Fix typo in comment.
13902 * checks.adb (Generate_Index_Checks): New implementation which, for
13903 array objects with constant bounds, generates the runtime check
13904 referencing the bounds of the array type. For other cases this routine
13905 provides its previous behavior obtaining such values from the array
13907 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13909 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13910 we cannot have semantic interpretations of the new node.
13912 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13914 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13917 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13919 * sem_ch8.adb: Minor code editing.
13920 * s-vxwext.adb: Remove trailing space.
13921 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13922 consistency with other files.
13924 2011-08-01 Thomas Quinot <quinot@adacore.com>
13926 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13928 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13930 * par-ch10.adb: reject parameterized expressions as compilation unit.
13931 * sem_ch4.adb: handle properly conditional expression with overloaded
13932 then_clause and no else_clause.
13934 2011-08-01 Tristan Gingold <gingold@adacore.com>
13936 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13937 like done by System.Aux_DEC.
13938 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13940 2011-08-01 Yannick Moy <moy@adacore.com>
13942 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13943 missing label at end of declaration (subprogram or package)
13944 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13945 of positional and named parameter association
13946 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13947 Error_Msg_SP which adds a prefix to the error message giving the name
13948 of the formal language analyzed
13949 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13950 access result type in subprogram, unconstrained array as result type,.
13951 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13953 * sem_ch8.adb: Code clean up.
13955 2011-08-01 Javier Miranda <miranda@adacore.com>
13957 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13958 * einfo.ads (Access_Disp_Table): Fix documentation.
13959 (Dispatch_Table_Wrappers): Fix documentation.
13960 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13961 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13962 to enforce the documentation of this attribute.
13963 (Set_Is_Interface): Cleanup the assertion.
13964 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13965 the Underlying_Type entity before reading attribute Access_Disp_Table.
13966 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13967 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13968 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13969 the Underlying_Type entity before reading attribute Access_Disp_Table.
13970 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13971 Locate the Underlying_Type entity before reading attribute
13974 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13976 * s-poosiz.ads: Additional overriding indicators.
13978 2011-08-01 Yannick Moy <moy@adacore.com>
13980 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13982 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13983 parameter specification does not include a subtype mark.
13984 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13985 formal mode on abstract subprogram.
13986 (Analyze_Subprogram_Specification): issue error in formal mode on
13987 user-defined operator.
13988 (Process_Formals): issue error in formal mode on access parameter and
13989 default expression.
13990 * sem_ch9.adb (Analyze_Abort_Statement,
13991 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13992 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13993 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13994 Analyze_Requeue, Analyze_Selective_Accept,
13995 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13996 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13997 issue error in formal mode on user-defined raise statement.
13999 2011-08-01 Thomas Quinot <quinot@adacore.com>
14001 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14002 declaration being hidden when overriding an implicit inherited
14004 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14005 (-gnats), do not complain about a source file that contains only a
14008 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14010 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14011 variable if already set.
14013 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14015 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14016 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14017 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14018 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14019 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14020 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14021 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14022 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14023 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14024 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14025 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14026 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14027 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14028 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14029 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14030 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14031 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14032 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14033 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14034 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14035 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14036 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14037 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14038 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14039 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14040 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14041 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14042 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14043 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14044 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14045 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14046 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14047 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14048 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14049 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14050 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14051 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14052 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14053 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14054 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14055 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14056 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14057 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14058 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14059 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14060 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14061 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14062 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14063 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14064 Use GNAT instead of GNARL.
14066 2011-08-01 Bob Duff <duff@adacore.com>
14068 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14069 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14070 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14073 2011-08-01 Yannick Moy <moy@adacore.com>
14075 * debug.adb (d.D) reverve flag for the SPARK mode
14076 (d.E) reverve flag for SPARK generation mode
14077 (d.F) reverve flag for Why generation mode
14078 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14079 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14080 functions which return True when the corresponding modes are set
14081 (Formal_Language): return "spark" or "alfa" when in formal verification
14083 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14084 Error_Msg to prefix the error message with a tag giving the formal
14086 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14087 message with a tag giving the formal language
14088 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14090 (Analyze_Case_Statement): issue error in formal mode on case statement
14091 with a single "others" case alternative
14092 (Analyze_Exit_Statement): issue errors in formal mode on exit
14093 statements which do not respect SPARK restrictions
14094 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14095 (Check_Unreachable_Code): always issue an error (not a warning) in
14096 formal mode on unreachable code (concerns both code after an infinite
14097 loop and after an unconditional jump, both not allowed in SPARK)
14098 * sem_ch6.adb (Analyze_Return_Statement): add call to
14099 Set_Return_Present for a procedure containing a return statement
14100 (already done for functions in Analyze_Function_Return)
14101 (Analyze_Function_Return): issue error in formal mode on extended
14102 return or if return is not last statement in function
14103 (Check_Missing_Return): issue error in formal mode if function does
14104 not end with return or if procedure contains a return
14105 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14106 function to detect if there is an inner scope of its parameter S which
14109 2011-08-01 Thomas Quinot <quinot@adacore.com>
14111 * sem_ch6.ads: Minor reformatting.
14113 2011-08-01 Javier Miranda <miranda@adacore.com>
14115 * sem_util.adb (Abstract_Interface_List): Complete condition when
14116 processing private type declarations to avoid reading unavailable
14118 (Is_Synchronized_Tagged_Type): Complete condition when processing
14119 private extension declaration nodes to avoid reading unavailable
14122 2011-08-01 Thomas Quinot <quinot@adacore.com>
14124 * sem_ch3.adb: Minor reformatting.
14126 2011-08-01 Thomas Quinot <quinot@adacore.com>
14128 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14129 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14130 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14131 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14132 for VMS, instead parametrize the common implementation with
14133 System.Parameters declarations.
14135 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14137 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14139 2011-08-01 Tristan Gingold <gingold@adacore.com>
14141 * seh_init.c: Fix SEH handler installation on win64.
14143 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14145 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14146 double analysis of an anonymous access to subprogram, because it can
14147 lead to improper sharing of profiles and a back-end crash.
14149 2011-08-01 Robert Dewar <dewar@adacore.com>
14151 * make.adb, sem_ch4.adb: Minor reformatting.
14152 * gcc-interface/Make-lang.in: Update dependencies.
14153 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14155 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14157 * gnat_rm.texi: Fix definition of Long_Integer.
14159 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14161 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14162 to prevent storage exhaustion.
14163 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14164 finalized is a function body, insert the cleanup code before the final
14165 return statement, to prevent spurious warnings.
14166 * s-pooglo.ads: add overriding indicator.
14168 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14170 * sem_ch4.adb (Operator_Check): improve error message when both a
14171 with_clause and a use_clause are needed to make operator usage legal.
14172 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14173 determine whether a compilation unit is visible within an other,
14174 either through a with_clause in the current unit, or a with_clause in
14175 its library unit or one one of its parents.
14177 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14179 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14180 over an arbitrary expression of an array or container type.
14181 * lib-xref.adb: clarify comment.
14183 2011-08-01 Bob Duff <duff@adacore.com>
14185 * einfo.ads: Minor reformatting.
14186 * debug.adb: Minor comment improvement.
14188 2011-08-01 Javier Miranda <miranda@adacore.com>
14190 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14191 consider hidden subprograms as valid candidates.
14193 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14195 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14197 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14199 * gnat_ugn.texi: Fix typo.
14201 2011-08-01 Robert Dewar <dewar@adacore.com>
14203 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14204 lib-xref.adb: Minor reformatting
14206 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14208 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14209 when to generate a call to Move_Final_List.
14210 (Has_Controlled_Parts): Remove this function.
14212 2011-08-01 Geert Bosch <bosch@adacore.com>
14214 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14215 "," in choice list.
14217 2011-08-01 Thomas Quinot <quinot@adacore.com>
14219 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14220 explicit raise of a predefined exception as Comes_From_Source if the
14221 original N_Raise_Statement comes from source.
14223 2011-08-01 Robert Dewar <dewar@adacore.com>
14225 * sinfo.ads: Add comment.
14226 * sem_ch6.adb: Minor reformatting.
14228 2011-08-01 Robert Dewar <dewar@adacore.com>
14230 * freeze.adb (Freeze_Entity): Refine check for bad component size
14231 clause to avoid rejecting confirming clause when atomic/aliased present.
14233 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14235 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14236 better determine whether an entity reference is a write.
14237 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14239 * lib-xref.adb (Output_References): Do no suppress a read reference at
14240 the same location as an immediately preceeding modify-reference, to
14241 handle properly in-out actuals.
14243 2011-08-01 Tristan Gingold <gingold@adacore.com>
14245 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14247 2011-08-01 Quentin Ochem <ochem@adacore.com>
14249 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14250 heap to compute the result.
14252 2011-08-01 Robert Dewar <dewar@adacore.com>
14254 * atree.ads: Minor reformatting.
14256 2011-08-01 Emmanuel Briot <briot@adacore.com>
14258 * g-expect.adb (Get_Command_Output): Fix memory leak.
14260 2011-08-01 Geert Bosch <bosch@adacore.com>
14262 * cstand.adb (P_Float_Type): New procedure to print the definition of
14263 predefined fpt types.
14264 (P_Mixed_Name): New procedure to print a name using mixed case
14265 (Print_Standard): Use P_Float_Type for printing floating point types
14266 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14267 precision IEEE float.
14269 2011-08-01 Thomas Quinot <quinot@adacore.com>
14271 * sem_ch3.adb: Minor reformatting.
14273 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14275 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14276 the completion of a generic function, insert the new body rather than
14277 rewriting the original.
14279 2011-08-01 Yannick Moy <moy@adacore.com>
14281 * sinfo.ads, errout.ads: Typos in comments.
14283 2011-08-01 Robert Dewar <dewar@adacore.com>
14285 * par-endh.adb: Minor reformatting.
14287 2011-08-01 Robert Dewar <dewar@adacore.com>
14289 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14290 (Pre_Post_Aspects): New subtype.
14291 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14292 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14293 * par-ch7.adb (P_Package): Remove Decl parameter
14294 (P_Package): Handle new syntax for aspects (before IS)
14295 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14297 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14298 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14299 (P_Package): Remove Decl parameter
14300 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14302 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14304 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14305 * sinfo.ads: Document new syntax for aspects in packages etc.
14306 * sprint.adb: Handle new syntax of aspects before IS in package
14308 2011-08-01 Thomas Quinot <quinot@adacore.com>
14310 * atree.ads: Minor reformatting.
14311 * sem_prag.adb: Minor reformatting.
14313 2011-08-01 Robert Dewar <dewar@adacore.com>
14315 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14316 case expr alternative.
14318 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14320 * sem_ch12.adb: Fix typo.
14322 2011-08-01 Geert Bosch <bosch@adacore.com>
14324 * sem_prag.adb (Check_No_Link_Name): New procedure.
14325 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14326 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14327 instead of Standard_Long_Long_Float_Size global. Preparation for
14328 eventual removal of per type constants.
14329 * exp_util.ads (Get_Stream_Size): New function returning the stream
14330 size value of subtype E.
14331 * exp_util.adb (Get_Stream_Size): Implement new function.
14332 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14334 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14336 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14338 2011-08-01 Geert Bosch <bosch@adacore.com>
14340 * cstand.adb: Fix comments.
14341 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14342 count of arguments.
14344 2011-08-01 Robert Dewar <dewar@adacore.com>
14346 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14348 2011-08-01 Geert Bosch <bosch@adacore.com>
14350 * atree.ads: Fix comment.
14352 2011-08-01 Robert Dewar <dewar@adacore.com>
14354 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14355 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14356 * par.adb: Add with for Namet.Sp.
14357 * par-tchk.adb: Minor reformatting.
14359 2011-08-01 Vincent Celier <celier@adacore.com>
14361 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14362 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14363 of the init procedure of a SAL.
14364 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14367 2011-08-01 Thomas Quinot <quinot@adacore.com>
14369 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14372 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14374 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14376 2011-08-01 Thomas Quinot <quinot@adacore.com>
14378 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14379 conformant with its spec (return True only for types that have
14380 an overriding Initialize primitive operation that prevents them from
14381 having preelaborable initialization).
14382 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14383 initialization for controlled types in Ada 2005 or later mode.
14385 2011-08-01 Robert Dewar <dewar@adacore.com>
14387 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14389 (Same_Aspect): New function.
14390 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14391 Type_Invariant, Precondition, Postcondition.
14392 * snames.ads-tmpl: Add Name_Type_Invariant.
14394 2011-08-01 Robert Dewar <dewar@adacore.com>
14396 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14398 (Freeze_All_Ent): Fix error in handling inherited aspects.
14399 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14400 already analyzed, but don't skip entire processing of a declaration,
14401 that's wrong in some cases of declarations being rewritten.
14402 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14403 Don't delay for integer, string literals
14404 Treat predicates in usual manner for delay, remove special case code,
14406 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14407 (Build_Predicate_Function): Update saved expression in aspect
14408 (Build_Invariant_Procedure): Update saved expression in aspect
14409 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14410 of replacement of discriminant references if the reference is simple.
14412 2011-08-01 Robert Dewar <dewar@adacore.com>
14414 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14415 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14416 Static_Predicate and Dynamic_Predicate.
14417 (Build_Predicate_Function): Add processing for Static_Predicate
14418 and Dynamic_Predicate.
14419 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14420 (From_Static_Predicate): New flag
14421 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14423 2011-08-01 Robert Dewar <dewar@adacore.com>
14425 * usage.adb: Documentation cleanup for Ada version modes in usage.
14426 * expander.adb: Minor reformatting.
14428 2011-08-01 Robert Dewar <dewar@adacore.com>
14430 * atree.ads: Minor comment fix.
14431 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14432 a-witeio.ads, sem_prag.adb: Minor reformatting.
14434 2011-08-01 Doug Rupp <rupp@adacore.com>
14436 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14437 pointers. Use descrip.h header file for convenience. Add some
14440 2011-08-01 Robert Dewar <dewar@adacore.com>
14442 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14443 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14444 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14446 (Check_Aspect_At_End_Of_Declarations): New procedure
14447 (Analye_Aspect_Specification): Minor changes for above procedures
14448 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14449 specification node as well.
14451 2011-08-01 Pascal Obry <obry@adacore.com>
14453 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14454 Windows files. Use GetFilesAttributes() in this case to check for file
14455 existence instead of returning with an error code.
14457 2011-08-01 Vincent Celier <celier@adacore.com>
14459 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14460 High is above Source length.
14462 2011-08-01 Robert Dewar <dewar@adacore.com>
14464 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14466 2011-08-01 Robert Dewar <dewar@adacore.com>
14468 * aspects.ads (Boolean_Aspects): New subtype.
14469 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14470 for derived types in cases where the parent type and derived type have
14472 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14473 with aspects when parent type also has aspects.
14474 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14475 boolean expression at this point).
14476 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14477 accordance with final decision on the Ada 2012 feature.
14478 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14480 2011-08-01 Matthew Heaney <heaney@adacore.com>
14482 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14484 2011-08-01 Pascal Obry <obry@adacore.com>
14486 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14487 Fix Replace_Slice when High is above current string size.
14488 (Replace_Slice): Fix DL computation when High is above current
14491 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14493 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14495 2011-08-01 Matthew Heaney <heaney@adacore.com>
14497 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14500 2011-08-01 Pascal Obry <obry@adacore.com>
14502 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14505 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14507 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14508 access to protected subprograms in generic bodies.
14509 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14510 protected type, indicate that the convention of the subprogram is
14511 Convention_Protected, because it may be used in subsequent declarations
14512 within the protected declaration.
14514 2011-08-01 Vincent Celier <celier@adacore.com>
14516 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14517 and "final" procedures when the name of the library is "ada", to avoid
14518 duplicate symbols "adainit" and "adafinal" in executables.
14520 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14522 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14523 quantified expression that appears within a postcondition and uses the
14524 Ada2012 'Result attribute.
14526 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14528 * init.c (__gnat_error_handler): Cast reason to int.
14529 (__gnat_install_handler): Explain sa_sigaction use.
14531 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14533 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14534 subprogram has copy-in copy-out parameters, try to promote the mode of
14535 the return type if it is passed in registers.
14537 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14539 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14540 left operand as addressable.
14542 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14544 * gcc-interface/gigi.h (build_function_stub): Remove.
14545 (build_return_expr): Likewise.
14546 (convert_vms_descriptor): Declare.
14547 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14548 (build_function_stub): Move to...
14549 * gcc-interface/utils2.c (build_return_expr): Move to...
14550 * gcc-interface/trans.c (build_function_stub): ...here.
14551 (build_return_expr): ...here.
14552 (Subprogram_Body_to_gnu): Add local variable for language_function.
14553 Disconnect the parameter attributes cache, if any, once done with it.
14554 Call end_subprog_body only after setting the end_locus.
14555 Build the stub associated with the function, if any, at the very end.
14556 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14557 variables and streamline control flow.
14559 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14562 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14563 g-trasym-dwarf.adb.
14565 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14568 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14569 Assign to act.sa_sigaction.
14570 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14571 current->return_address to char * before arithmetic.
14573 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14575 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14576 Correct argument types.
14577 Extract code from reason.
14578 (__gnat_install_handler): Assign to act.sa_sigaction.
14580 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14582 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14583 (GNAT1_OBJS): ...here.
14585 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14588 * g-socthi-mingw.adb (Fill): Fix formatting.
14590 * gcc-interface/gigi.h: Move around comment.
14592 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14595 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14597 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14600 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14602 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14604 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14605 range comparison if Pmode is SImode.
14607 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14608 Eric Botcazou <ebotcazou@adacore.com>
14610 * adadecode.c: Wrap up in extern "C" block.
14611 * adadecode.h: Likewise.
14612 * adaint.c: Likewise. Remove 'const' keyword.
14613 * adaint.h: Likewise.
14614 * argv.c: Likewise.
14615 * atree.h: Likewise.
14617 * cstreams.c: Likewise.
14619 * exit.c: Likewise.
14621 * final.c: Likewise.
14622 * init.c: Likewise.
14623 * initialize.c: Likewise.
14624 * link.c: Likewise.
14625 * namet.h: Likewise.
14626 * nlists.h: Likewise.
14627 * raise.c: Likewise.
14628 * raise.h: Likewise.
14629 * repinfo.h: Likewise.
14630 * seh_init.c: Likewise.
14631 * targext.c: Likewise.
14632 * tracebak.c: Likewise.
14633 * uintp.h: Likewise.
14634 * urealp.h: Likewise.
14635 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14636 * xsinfo.adb: Likewise.
14637 * xsnamest.adb: Likewise.
14638 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14639 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14640 * gcc-interface/misc.c: Likewise.
14641 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14642 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14643 ada/targext.o here...
14644 (GNAT_ADA_OBJS): ...and not here.
14645 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14646 (GNATBIND_OBJS): Reorder.
14648 2011-07-07 Richard Henderson <rth@redhat.com>
14650 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14651 dwarf2out_frame_init.
14653 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14655 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14657 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14660 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14662 2011-07-06 Richard Guenther <rguenther@suse.de>
14664 * gcc-interface/misc.c (gnat_init): Merge calls to
14665 build_common_tree_nodes and build_common_tree_nodes_2.
14666 Re-initialize boolean_false_node.
14668 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14669 Olivier Hainque <hainque@adacore.com>
14670 Nicolas Setton <setton@adacore.com>
14672 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14673 the type according to the ARTIFICIAL_P parameter.
14674 (create_type_decl): Likewise.
14675 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14677 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14679 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14680 (gnatbind): Likewise.
14682 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14684 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14686 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14688 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14689 local variable throughout. Remove useless call to Base_Type.
14690 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14691 Take it also into account for the volatileness of the field. Set the
14692 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14694 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14696 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14697 on a dereference built for a by-ref object if it has an address clause.
14699 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14701 * einfo.ads (Address_Taken): Document use for the second argument of
14702 Asm_Input and Asm_Output attributes.
14703 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14704 argument is an entity name, then set Address_Taken on it.
14705 <Attribute_Asm_Output>: Likewise.
14706 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14707 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14708 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14709 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14711 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14713 PR middle-end/46500
14714 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14716 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14718 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14719 (ada/utils.o): Update dependencies.
14720 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14721 ../../../libcpp/libcpp.a.
14722 * gcc-interface/utils.c: Include common/common-target.h.
14723 (process_attributes): Use targetm_common.have_named_sections.
14725 2011-06-07 Richard Guenther <rguenther@suse.de>
14727 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14730 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14732 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14733 TREE_THIS_NOTRAP flag.
14735 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14737 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14740 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14742 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14743 constants whose full view has discriminants specially.
14745 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14747 * gcc-interface/utils.c: Include diagnostic.h.
14748 (gnat_write_global_declarations): Output debug information for all
14749 global type declarations before finalizing the compilation unit.
14750 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14752 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14754 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14756 2011-05-25 Kai Tietz <ktietz@redhat.com>
14758 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14759 initialization instead of const/none-const pointer assignment.
14761 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14763 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14764 $(EXTRA_GNAT1_OBJS).
14765 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14766 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14767 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14768 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14769 libcommon-target.a instead of prefix.o.
14771 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14774 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14776 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14778 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14779 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14780 instead of version.o.
14782 2011-05-18 Kai Tietz <ktietz@redhat.com>
14784 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14785 boolean_false_node instead of integer_zero_node.
14786 (convert_with_check): Likewise.
14787 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14789 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14791 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14792 type of the parameter is an unconstrained array, convert the actual to
14793 the type of the formal in the In Out and Out cases as well.
14795 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14797 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14798 call build_function_type_array or build_varargs_function_type_array
14800 (create_subprog_type): Don't call build_function_type; call
14801 build_function_type_vec instead.
14803 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14805 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14806 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14807 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14809 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14811 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14813 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14814 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14816 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14818 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14820 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14822 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14823 instead of accessing TYPE_ARG_TYPES directly.
14824 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14826 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14829 * gcc-interface/gigi.h (get_variant_part): Declare.
14830 * gcc-interface/decl.c (get_variant_part): Make global.
14831 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14832 types have the same constant size, are record types and T1 has a
14833 variant part while T2 doesn't.
14835 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14837 * gcc-interface/utils.c (begin_subprog_body): Do not call
14839 (end_subprog_body): Likewise.
14841 2011-05-04 Richard Guenther <rguenther@suse.de>
14843 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14845 (pos_to_constructor): Likewise.
14847 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14848 Eric Botcazou <ebotcazou@adacore.com>
14850 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14851 of build_function_type. Adjust calls to...
14852 (build_raise_check): ...this. Do not take a void_tree parameter.
14853 Call build_function_type_list instead of build_function_type.
14854 Fix head comment and swap couple of conditional blocks.
14856 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14858 * gnatvsn.ads (Library_Version): Bump to 4.7.
14859 (Current_Year): Bump to 2011.
14861 2011-04-29 Michael Matz <matz@suse.de>
14863 * gcc-interface/misc.c (gnat_handle_option): Set
14864 warn_maybe_uninitialized.
14866 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14868 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14869 the Watson/McCabe paper.
14871 2011-04-23 Jim Meyering <meyering@redhat.com>
14873 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14875 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14877 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14880 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14882 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14884 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14885 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14886 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14887 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14888 <all>: Do not set flags on the reused DECL node coming from an alias.
14889 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14890 don't need debug info here...
14891 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14892 (gigi): Adjust calls to create_subprog_decl.
14893 (build_raise_check): Likewise.
14894 (establish_gnat_vms_condition_handler): Likewise.
14895 (Compilation_Unit_to_gnu): Likewise.
14896 (gnat_to_gnu): Likewise.
14898 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14900 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14901 (NO_REORDER_ADAFLAGS): New variable.
14902 (EXTRA_GNATTOOLS): Always define.
14903 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14904 Clean up and adjust list of files compiled with special options.
14905 * gcc-interface/Make-lang.in: Likewise.
14906 (ada/decl.o): Cosmetical change.
14907 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14909 2011-04-20 Jim Meyering <meyering@redhat.com>
14911 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14913 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14915 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14916 $(CFLAGS) on the link line.
14918 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14920 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14921 padded type built for the return type if it is unconstrained.
14923 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14925 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14927 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14929 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14930 before calling TREE_CHAIN.
14931 * gcc-interface/misc.c (gnat_init_ts): New function.
14932 (LANG_HOOKS_INIT_TS): Define.
14934 2011-04-12 Martin Jambor <mjambor@suse.cz>
14936 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14937 instead of cgraph_node.
14939 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14941 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14942 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14945 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14947 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14948 of aggregate types that contain a placeholder.
14950 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14952 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14954 (handle_type_generic_attribute): Likewise.
14956 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14959 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14961 2011-04-04 Kai Tietz <ktietz@redhat.com>
14964 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14967 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14969 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14970 type case, do not strip a padding type around the array type.
14972 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14974 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14977 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14979 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14980 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14981 code for -feliminate-unused-debug-types.
14982 (gnat_post_options): Likewise.
14984 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14986 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14987 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14990 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14992 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14993 DECL_ARTIFICIAL flag on enumeration types.
14995 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14997 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14998 fat pointer types artificial unconditionally.
14999 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15002 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15004 * gcc-interface/gigi.h (get_dummy_type): Declare.
15005 (build_dummy_unc_pointer_types): Likewise.
15006 (finish_fat_pointer_type): Likewise.
15007 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15008 fat pointer type has been built, complete it in place.
15009 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15010 and thin pointers. Remove useless variable.
15011 (finish_fat_pointer_type): Make global and move to...
15012 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15013 (get_dummy_type): New function.
15014 (build_dummy_unc_pointer_types): Likewise.
15015 (gnat_pushdecl): Propage the name to the anonymous variants only.
15016 (update_pointer_to): Only adjust the pointer types in the unconstrained
15019 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15021 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15022 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15023 if this is a Taft amendment type and the full declaration is available.
15024 * gcc-interface/trans.c (process_type): Likewise.
15025 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15026 (process_freeze_entity): Likewise.
15027 * gcc-interface/utils.c (dummy_global): New static variable.
15028 (gnat_write_global_declarations): If there are types declared as used
15029 at the global level, insert them in the global hash table.
15031 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15033 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15034 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15035 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15037 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15038 flag of the type accordingly.
15039 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15041 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15043 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15044 finalizing types when updating the pointers to the designated type.
15045 <all>: Finalize the deferred types even if we didn't defer processing
15046 of incomplete types in this invocation.
15048 2011-04-01 Olivier Hainque <hainque@adacore.com>
15049 Nicolas Setton <setton@adacore.com>
15050 Eric Botcazou <ebotcazou@adacore.com>
15052 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15053 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15055 2011-03-28 Kai Tietz <ktietz@redhat.com>
15057 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15059 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15060 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15062 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15064 2011-03-28 Tristan Gingold <gingold@adacore.com>
15067 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15068 Use ada output of gnatbind.
15069 (ada/b_gnatb.adb): Ditto.
15070 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15071 (ada.mostlyclean, ada.stage1)
15072 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15073 (ada.stagefeedback): Adjust.
15074 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15075 Use ada output of gnatbind.
15076 (b_gnatm.adb): Ditto.
15077 (b_gnatl.o, b_gnatm.o): New rules.
15079 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15081 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15082 for the padded type built to support a specified size or alignment.
15084 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15086 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15087 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15088 unconditionally to the end of the unit when the designated type is
15090 <all>: Rename local variable. Attempt to un-defer types only and do it
15091 for limited_with'ed types as well.
15092 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15093 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15094 consistently and remove redundant call to finalize_from_with_types.
15096 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15098 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15099 subprograms without a previous spec declared in the same unit.
15100 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15101 subprograms at the end of the unit instead of at the beginning.
15102 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15103 isn't public for the special handling of non-inline functions nested
15104 inside inline external functions.
15106 2011-03-25 Jeff Law <law@redhat.com>
15108 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15110 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15112 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15113 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15114 to compute Set_Size_Depends_On_Discriminant.
15115 (Layout_Type): Call it on array types in back-end layout mode.
15116 * sem_util.adb (Requires_Transient_Scope): Return true for array
15117 types only if the size depends on the value of discriminants.
15118 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15119 type if the RHS is a call to a function that returns an unconstrained
15120 type with default discriminant.
15122 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15124 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15125 non-conversion to the nominal result type at the end.
15127 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15129 * gcc-interface/trans.c (create_temporary): New function taken from...
15130 (create_init_temporary): ...here. Call it.
15131 (call_to_gnu): Create the temporary for the return value early, if any.
15132 Create it for a function with copy-in/copy-out parameters if there is
15133 no target; in other cases of copy-in/copy-out, use another temporary.
15134 Push the new binding level lazily. Add and rename local variables.
15136 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15138 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15140 (set_rm_size): Likewise.
15142 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15144 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15145 for the padded type built in order to support a specified alignment.
15146 Fix incorrect formatting.
15148 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15151 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15153 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15155 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15156 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15157 to the end of the list. Adjust recursive call. Rename local variable.
15158 If REORDER is true, reorder components of the record type.
15159 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15160 components_to_record and adjust the parameter list.
15162 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15164 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15165 disabled, use the variable for bounds of loop iteration scheme.
15167 2011-03-21 Kai Tietz <ktietz@redhat.com>
15170 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15172 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15174 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15175 out whether the expression is read-only. Short-circuit placeholder
15176 case and rename a couple of local variables.
15178 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15180 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15181 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15182 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15183 (convert): Deal with conversions from a smaller form type specially.
15185 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15187 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15188 its argument, except for the special -I- switch.
15190 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15192 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15195 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15197 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15199 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15201 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15203 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15204 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15205 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15206 Do not generate the check directly, instead instantiate the template
15207 check present in the descriptor.
15208 (make_descriptor_field): Move around.
15209 (build_vms_descriptor32): Build a template check in the POINTER field.
15210 (build_vms_descriptor): Remove useless suffixes.
15211 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15213 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15216 * targext.c: Include target files if IN_RTS is defined.
15218 2011-01-26 Richard Guenther <rguenther@suse.de>
15221 * targext.c: Include config.h.
15222 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15225 2011-01-04 Pascal Obry <obry@adacore.com>
15226 Eric Botcazou <ebotcazou@adacore.com>
15228 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15230 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15232 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15233 end-of-case on the end label and its associated gotos, if any.
15235 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15237 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15238 expressions of the parameter cache within the statement group of
15239 the CICO mechanism.
15241 2011-01-04 Olivier Hainque <hainque@adacore.com>
15242 Eric Botcazou <ebotcazou@adacore.com>
15244 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15245 (set_end_locus_from_node): New function.
15246 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15247 make and the function end_locus.
15248 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15249 for the elaboration subprogram.
15250 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15251 set the end_locus of the expression as well.
15253 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15256 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15257 variables that are referenced in exception handlers volatile.
15261 Copyright (C) 2011 Free Software Foundation, Inc.
15263 Copying and distribution of this file, with or without modification,
15264 are permitted in any medium without royalty provided the copyright
15265 notice and this notice are preserved.
15267 * gnat_rm.texi: Ramification of pragma Eliminate documentation
15268 - fix bugs in the description of Source_Trace;
15269 - get rid of UNIT_NAME;
15271 2011-08-02 Javier Miranda <miranda@adacore.com>
15274 (Build_Dispatching_Requeue): Adding support for VM targets
15275 since we cannot directly reference the Tag entity.
15276 * exp_sel.adb (Build_K): Adding support for VM targets.
15277 (Build_S_Assignment): Adding support for VM targets.
15279 (Default_Prim_Op_Position): In VM targets do not restrict availability
15280 of predefined interface primitives to compiling in Ada 2005 mode.
15281 (Is_Predefined_Interface_Primitive): In VM targets this service is not
15282 restricted to compiling in Ada 2005 mode.
15283 (Make_VM_TSD): Generate code that declares and initializes the OSD
15284 record. Needed to support dispatching calls through synchronized
15287 (Make_Predefined_Primitive_Specs): Enable generation of predefined
15288 primitives associated with synchronized interfaces.
15289 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
15290 primitives associated with synchronized interfaces.
15292 2011-08-02 Yannick Moy <moy@adacore.com>
15294 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
15295 statements hidden in SPARK if preceded by the HIDE directive
15296 (Parse_Exception_Handlers): mark each exception handler in a sequence of
15297 exception handlers as hidden in SPARK if preceded by the HIDE directive
15298 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
15299 if starting with the HIDE directive
15300 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
15301 starting with the HIDE directive; mark the declarations in a private
15302 part as hidden in SPARK if the private part starts with the HIDE
15304 * restrict.adb, restrict.ads
15305 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
15306 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
15307 argument node belongs to a part which is hidden in SPARK
15308 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
15309 parts in SPARK; protect the possibly costly call to
15310 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
15311 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
15312 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
15313 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
15315 (Scan): recognize special comment starting with '#' and followed by
15316 SPARK keyword "hide" as a HIDE directive.
15318 2011-08-02 Yannick Moy <moy@adacore.com>
15320 * types.ads, erroutc.ads: Minor reformatting.
15322 2011-08-02 Vincent Celier <celier@adacore.com>
15324 * link.c: Add response file support for cross platforms.
15326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15328 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
15329 in an association, set parent field of copy before partial analysis.
15330 * sem_res.adb (Resolve_Slice): create reference to itype only when
15331 expansion is enabled.
15333 2011-08-02 Yannick Moy <moy@adacore.com>
15335 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
15336 for new flag denoting which subprogram bodies are in ALFA
15337 * restrict.adb, sem_ch7.adb: Update comment
15338 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
15339 sem_ch9.adb, sem_res.adb: Add calls to
15340 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
15341 * sem_ch6.adb (Analyze_Function_Return): add calls to
15342 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
15343 middle of the body, and extended return.
15344 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
15345 False when missing return.
15346 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
15347 to True for subprograms whose spec is in ALFA. Remove later on the flag
15348 on the entity used for a subprogram body when there exists a separate
15350 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
15351 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
15352 False, otherwise do nothing.
15354 2011-08-02 Robert Dewar <dewar@adacore.com>
15356 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15358 2011-08-02 Yannick Moy <moy@adacore.com>
15360 * sem_ch4.ads: minor formatting.
15362 2011-08-02 Yannick Moy <moy@adacore.com>
15364 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
15365 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
15366 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
15367 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
15368 opt.ads: cleanup of SPARK mode
15370 2011-08-02 Yannick Moy <moy@adacore.com>
15372 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
15374 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
15375 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
15377 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
15378 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
15379 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
15380 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
15382 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
15384 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
15385 functions whose return type is not in ALFA.
15386 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
15388 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
15389 parameter's type is not in ALFA.
15390 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
15393 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15395 * sem_ch6 (Analyze_Expression_Function): treat the function as
15396 Inline_Always, and introduce a subprogram declaration for it when it is
15398 * inline.adb (Add_Inlined_Body): recognize bodies that come from
15399 expression functions, so that the back-end can determine whether they
15400 can in fact be inlined.
15401 * sem_util.adb (Is_Expression_Function): predicate to determine whether
15402 a function body comes from an expression function.
15404 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15406 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
15407 null exclusions to test Can_Never_Be_Null on the anonymous access types
15408 of the formals rather than testing the formals themselves. Exclude this
15409 check in cases where the Old_Formal is marked as a controlling formal,
15410 to avoid issuing spurious errors for bodies completing dispatching
15411 operations (due to the flag not getting set on controlling access
15412 formals in body specs).
15413 (Find_Corresponding_Spec): When checking full and subtype conformance of
15414 subprogram bodies in instances, pass Designated and E in that order, for
15415 consistency with the expected order of the formals (New_Id followed by
15418 2011-08-02 Robert Dewar <dewar@adacore.com>
15420 * sem_ch8.adb: Minor reformatting.
15422 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15424 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
15425 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
15426 primitive operations of class-wide actuals.
15428 2011-08-02 Javier Miranda <miranda@adacore.com>
15430 * exp_atag.ads, exp_atag.adb
15431 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
15432 since its value is implicitly passed in argument Typ.
15433 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
15434 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
15435 Build_Common_Dispatching_Select_Statements.
15437 2011-08-02 Robert Dewar <dewar@adacore.com>
15439 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
15440 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
15441 Minor reformatting.
15443 2011-08-02 Robert Dewar <dewar@adacore.com>
15445 * sem_res.adb: Minor reformatting.
15446 * sem_prag.adb: Minor reformatting.
15448 2011-08-02 Javier Miranda <miranda@adacore.com>
15450 * exp_atag.adb, exp_atags.ads
15451 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
15452 by the tagged type Entity. Required to use this routine in the VM
15453 targets since we do not have available the Tag entity in the VM
15456 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
15457 Ada.Tags has not been previously loaded.
15459 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
15460 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
15462 (Enclosing_Dynamic_Scope): Add missing support to handle the full
15463 view of enclosing scopes. Required to handle enclosing scopes that
15464 are synchronized types whose full view is a task type.
15466 (Build_VM_TSDs): Minor code improvement to avoid generating and
15467 analyzing lists with empty nodes.
15468 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
15469 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
15470 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
15471 (Make_Disp_Timed_Select_Body): Add support for VM targets.
15472 (Make_Select_Specific_Data_Table): Add support for VM targets.
15473 (Make_VM_TSD): Generate code to initialize the SSD structure of
15476 2011-08-02 Yannick Moy <moy@adacore.com>
15478 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
15479 cross-references section in ALI.
15480 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
15481 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
15483 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
15484 subprogram or package entity of a node
15485 (Is_Local_Reference_Type): new function returns True for references
15486 selected in local cross-references.
15487 (Lt): function extracted from Lt in Output_References
15488 (Write_Entity_Name): function extracted from Output_References
15489 (Generate_Definition): generate reference with type 'D' for definition
15490 of objects (object declaration and parameter specification), with
15491 appropriate locations and units, for use in local cross-references.
15492 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
15493 references of type 'I' for initialization in object definition.
15494 (Output_References): move part of function Lt and procedure
15495 Write_Entity_Name outside of the body. Ignore references of types 'D'
15496 and 'I' introduced for local cross-references.
15497 (Output_Local_References): new procedure to output the local
15498 cross-references sections.
15499 (Lref_Entity_Status): new array defining whether an entity is a local
15500 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
15501 with 'I' type when initialization expression is present.
15502 * get_scos.adb, get_scos.ads: Correct comments and typos
15504 2011-08-02 Javier Miranda <miranda@adacore.com>
15506 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
15508 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
15510 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
15513 2011-08-02 Vincent Celier <celier@adacore.com>
15515 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
15516 (No_Space_Img): New function
15517 (Find_Excluded_Sources): When reading from a file, record the file name
15518 and the line number for each excluded source.
15519 (Mark_Excluded_Sources): When reporting an error, if the excluded
15520 sources were read from a file, include file name and line number in
15523 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15525 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
15527 2011-08-02 Robert Dewar <dewar@adacore.com>
15529 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
15531 2011-08-02 Javier Miranda <miranda@adacore.com>
15533 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
15534 generation of TSDs to the DOTNET compiler.
15535 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
15536 generation of TSDs to the DOTNET compiler.
15538 2011-08-02 Javier Miranda <miranda@adacore.com>
15540 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
15541 record of all the tagged types declared inside library level package
15542 declarations, library level package bodies or library level subprograms.
15543 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
15544 associated with a given tagged type.
15545 (Build_VM_TSDs): New subprogram.
15546 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
15547 compilation units that are subprograms.
15548 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
15549 compilation units that are package bodies.
15550 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
15551 units that are a package declaration or a package instantiation.
15552 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
15553 reorganization to improve the error generated by the frontend when the
15554 function Ada.Tags.Secondary_Tag is not available.
15555 * rtsfind.ads (RE_Register_TSD): New runtime entity.
15556 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
15558 2011-08-02 Javier Miranda <miranda@adacore.com>
15560 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
15562 2011-08-02 Robert Dewar <dewar@adacore.com>
15564 * s-imenne.ads: Minor reformatting.
15566 2011-08-02 Robert Dewar <dewar@adacore.com>
15568 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
15569 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
15570 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
15572 2011-08-02 Robert Dewar <dewar@adacore.com>
15574 * einfo.ads (Materialize_Entity): Document this is only for renamings
15575 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
15576 required debug information in the case where we transform the object
15577 declaration into a renaming declaration.
15578 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
15580 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
15581 Materialize_Entity.
15583 2011-08-02 Robert Dewar <dewar@adacore.com>
15585 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
15586 Suppress_Init_Procs.
15587 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
15588 Suppress_Initialization/Initialization_Suppressed.
15589 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
15590 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
15591 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
15592 * sem_prag.adb: New processing for pragma Suppress_Initialization.
15594 2011-08-02 Robert Dewar <dewar@adacore.com>
15596 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
15597 Minor reformatting.
15599 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15601 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
15602 only have inheritable classwide pre/postconditions.
15604 2011-08-02 Javier Miranda <miranda@adacore.com>
15606 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
15607 * rtsfind.ads (RE_Check_TSD): New runtime entity.
15608 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
15609 checks if the external tag of a type is the same as the external tag
15610 of some other declaration.
15612 2011-08-02 Thomas Quinot <quinot@adacore.com>
15614 * s-taskin.ads: Minor reformatting.
15616 2011-08-02 Emmanuel Briot <briot@adacore.com>
15618 * g-comlin.adb (Display_Help): swap the order in which it prints the
15619 short help and the general usage.
15621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15623 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
15624 the aspect declarations and attach them to the generic copy for
15625 subsequent analysis.
15626 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
15627 declarations of the generic tree to the new subprogram declarations.
15628 * sem_attr.adb (Check_Precondition_Postcondition): recognize
15629 conditions that apply to a subprogram instance.
15631 2011-08-02 Robert Dewar <dewar@adacore.com>
15633 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
15635 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15637 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
15638 private type with a tagged full view is not derived in the immediate
15639 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
15641 2011-08-02 Robert Dewar <dewar@adacore.com>
15643 * exp_ch4.adb: Minor reformatting.
15645 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15647 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
15648 Ada2012 iterator, the loop will be rewritten during expansion into a
15649 while loop with a cursor and an element declaration. Do not analyze the
15650 body in this case, because if the container is for indefinite types the
15651 actual subtype of the elements will only be determined when the cursor
15652 declaration is analyzed.
15654 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15656 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
15657 size/alignment related attributes in CodePeer_Mode.
15659 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15661 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
15662 Prepend_Element, since this can result in the operation getting the
15663 wrong slot in the full type's dispatch table if the full type has
15664 inherited operations. The incomplete type's operation will get added
15665 to the proper position in the full type's primitives
15666 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
15667 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
15668 dispatching operations, since there are cases where nonprimitive
15669 subprograms can get added to the list of incomplete dependents (such
15670 as subprograms in nested packages).
15671 * sem_ch6.adb (Process_Formals): First, remove test for being in a
15672 private part when determining whether to add a primitive with a
15673 parameter of a tagged incomplete type to the Private_Dependents list.
15674 Such primitives can also occur in the visible part, and should not have
15675 been excluded from being private dependents.
15676 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
15677 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
15678 list of a Taft-amendment incomplete type is a primitive before issuing
15679 an error that the full type must appear in the same unit. There are
15680 cases where nonprimitives can be in the list (such as subprograms in
15682 * sem_disp.adb (Derives_From): Use correct condition for checking that
15683 a formal's type is derived from the type of the corresponding formal in
15684 the parent subprogram (the condition was completely wrong). Add
15685 checking that was missing for controlling result types being derived
15686 from the result type of the parent operation.
15688 2011-08-02 Yannick Moy <moy@adacore.com>
15690 * errout.adb (First_Node): minor renaming
15691 * restrict.adb (Check_Formal_Restriction): put restriction warning on
15694 2011-08-02 Yannick Moy <moy@adacore.com>
15696 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
15697 before accessing operands.
15698 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
15699 decide whether an initialization expression respects SPARK rules, as
15700 the plain node is the expanded one. This allows for more valid warnings
15702 * gnat_rm.texi: Minor update.
15704 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15706 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
15709 2011-08-02 Robert Dewar <dewar@adacore.com>
15711 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
15713 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15715 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
15716 loop statements and the element renaming declaration with a block when
15717 the element type is controlled.
15719 2011-08-02 Yannick Moy <moy@adacore.com>
15721 * sinfo.ads: Minor formatting.
15723 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15725 * sem_aggr.adb (Add_Association): if the association has a box and no
15726 expression, use the Sloc of the aggregate itself for the new
15728 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
15731 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15733 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
15734 When a container is provided via a function call, generate a renaming
15735 of the function result. This avoids the creation of a transient scope
15736 and the premature finalization of the container.
15737 * exp_ch7.adb (Is_Container_Cursor): Removed.
15738 (Wrap_Transient_Declaration): Remove the supression of the finalization
15739 of the list controller when the declaration denotes a container cursor,
15742 2011-08-02 Yannick Moy <moy@adacore.com>
15744 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
15745 node is from source, instead of the original node being from source.
15747 (Resolve_Array_Aggregate): refine the check for a static expression, to
15748 recognize also static ranges
15749 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
15750 Array_Type_Declaration): postpone the test for the type being a subtype
15751 mark after the type has been resolved, so that component-selection and
15752 expanded-name are discriminated.
15753 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
15754 to distinguish the case of an iteration scheme, so that an error is
15755 issed on a non-static range in SPARK except in an iteration scheme.
15756 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
15757 In_Iter_Schm = True.
15758 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
15759 user-defined operators so that they are allowed in renaming
15761 (Find_Selected_Component): refine the check for prefixing of operators
15762 so that they are allowed in renaming. Move the checks for restrictions
15763 on selector name after analysis discriminated between
15764 component-selection and expanded-name.
15765 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
15766 concatenation argument of string type if it is static.
15767 * sem_util.adb, sem_util.ads
15768 (Check_Later_Vs_Basic_Declarations): add a new function
15769 Is_Later_Declarative_Item to decice which declarations are allowed as
15770 later items, in the two different modes Ada 83 and SPARK. In the SPARK
15771 mode, add that renamings are considered as later items.
15772 (Enclosing_Package): new function to return the enclosing package
15773 (Enter_Name): correct the rule for homonyms in SPARK
15774 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
15775 from source (result of expansion) to avoid issuing wrong warnings.
15777 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15779 * errout.adb: On anything but an expression First_Node returns its
15782 2011-08-02 Pascal Obry <obry@adacore.com>
15784 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
15786 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15788 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
15789 Set the associated loop as the related expression of internally
15791 * exp_ch7.adb (Is_Container_Cursor): New routine.
15792 (Wrap_Transient_Declaration): Supress the finalization of the list
15793 controller when the declaration denotes a container cursor.
15795 2011-08-02 Yannick Moy <moy@adacore.com>
15797 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
15799 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
15800 expression is a simple expression. This check cannot be performed in
15801 the semantics, so just drop it.
15802 (P_Index_Or_Discriminant_Constraint): move check that the index or
15803 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
15804 semantics. Other cases were previously checked in the semantics.
15805 * par-ch4.adb (P_Name): move checks that a selector name is not
15806 character literal or an operator symbol to Find_Selected_Component in
15808 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
15809 declarations are not placed after later declarations in a separate
15810 procedure in Sem_Util (possibly not the best choice?), to be used both
15811 during parsing, for Ada 83 mode, and during semantic analysis, for
15813 * par-endh.adb (Check_End): move check that end label is not missing
15814 to Process_End_Label in the semantics
15815 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
15816 the special case for SPARK restriction
15817 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
15818 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
15819 parameter Force to issue the error message even on internal node (used
15820 for generated end label). Call Check_Restriction to check when an error
15821 must be issued. In SPARK mode, issue an error message even if the
15822 restriction is not set.
15823 (Check_Restriction): new procedure with an additional out parameter to
15824 inform the caller that a message has been issued
15825 * sem_aggr.adb: Minor modification of message
15826 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
15827 instead of issuing an error message directly
15828 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
15829 declarations are not placed after later declarations, by calling
15830 Check_Later_Vs_Basic_Declarations
15831 (Analyze_Subtype_Declaration): move here the check that an index or
15832 discriminant constraint must be a subtype mark. Change the check that
15833 a subtype of String must start at one so that it works on subtype marks.
15834 * sem_ch4.adb (Analyze_Call): move here the check that a named
15835 association cannot follow a positional one in a call
15836 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
15837 instead of issuing an error message directly
15838 * sem_ch8.adb (Find_Selected_Component): move here the check that a
15839 selector name is not a character literal or an operator symbol. Move
15840 here the check that the prefix of an expanded name cannot be a
15841 subprogram or a loop statement.
15842 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
15843 procedure called from parsing and semantics to check that basic
15844 declarations are not placed after later declarations
15845 (Process_End_Label): move here the check that end label is not missing
15847 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15849 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
15850 representation clause in codepeer mode, since it confuses CodePeer and
15851 does not bring useful info.
15853 2011-08-02 Ed Falis <falis@adacore.com>
15855 * init.c: initialize fp hw on MILS.
15857 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15859 * errout.adb (First_Node): for bodies, return the node itself (small
15860 optimization). For other nodes, do not check source_unit if the node
15861 comes from Standard.
15863 2011-08-02 Robert Dewar <dewar@adacore.com>
15865 * exp_ch3.adb: Minor comment additions.
15866 * sem_ch13.adb: Minor reformatting.
15868 2011-08-02 Pascal Obry <obry@adacore.com>
15870 * make.adb, makeutl.adb: Removes some superfluous directory separator.
15872 2011-08-02 Robert Dewar <dewar@adacore.com>
15874 * sem_attr.adb: Minor reformatting.
15876 2011-08-02 Robert Dewar <dewar@adacore.com>
15878 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15879 (Has_Default_Component_Value): Removed
15880 * einfo.ads Comment updates
15881 (Has_Default_Aspect): Replaces Has_Default_Value
15882 (Has_Default_Component_Value): Removed
15884 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15886 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15887 (Get_Simple_Init_Val): Handle Default_Value aspect
15888 (Needs_Simple_Initialization): Handle Default_Value aspect
15889 * exp_ch3.ads: Needs_Simple_Initialization
15890 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15891 * par-prag.adb (Pragma_Default[_Component]Value) Removed
15893 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15894 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15895 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15897 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15899 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15900 package containing iteration primitives.
15901 exp_ch5.adb (Expand_Iterator_Loop): ditto.
15903 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15905 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15906 "of", pre-analyze expression in case it is a function call with
15907 finalization actions that must be placed ahead of the loop.
15908 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15909 on an Ada2012 iterator, insert them ahead of the rewritten loop.
15911 2011-08-02 Geert Bosch <bosch@adacore.com>
15913 * cstand.adb (Create_Float_Types): Only consider C's long double for
15914 Long_Long_Float, in addition to double.
15916 2011-08-02 Robert Dewar <dewar@adacore.com>
15918 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15919 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15920 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15921 Minor reformatting.
15923 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15925 * sem_attr.adb: handle properly 'Result when it is a prefix of an
15928 2011-08-02 Javier Miranda <miranda@adacore.com>
15930 * einfo.ads, einfo.adb
15931 (Original_Access_Type): Move this attribute to Node26 since there was
15932 an undocumented use of Node21 in E_Access_Subprogram_Type entities
15933 which causes conflicts and breaks the generation of the .NET compiler.
15934 (Interface_Name): Add missing documentation on JGNAT only uses of
15937 2011-08-02 Geert Bosch <bosch@adacore.com>
15939 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15940 (Find_Back_End_Float_Type): Likewise
15941 (Create_Back_End_Float_Types): Likewise
15942 (Create_Float_Types): Likewise
15943 (Register_Float_Type): Likewise
15944 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15945 Nlist and split out type selection in new local Find_Base_Type function.
15946 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15948 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15950 2011-08-02 Robert Dewar <dewar@adacore.com>
15952 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15954 * opt.ads: Minor comment change.
15955 * sem_ch12.adb: Minor code reorganization.
15957 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15959 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15960 subtype's list of rep items to the list on the full subtype in the case
15961 where the lists are the same.
15963 2011-08-02 Geert Bosch <bosch@adacore.com>
15965 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15966 using the one from System.Strings, which also deallocates all strings.
15968 2011-08-02 Geert Bosch <bosch@adacore.com>
15970 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15972 * gcc-interface/Make-lang.in: Update dependencies.
15974 2011-08-02 Olivier Hainque <hainque@adacore.com>
15976 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15979 2011-08-02 Javier Miranda <miranda@adacore.com>
15981 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15982 associated with anonymous access to subprograms.
15984 2011-08-02 Geert Bosch <bosch@adacore.com>
15987 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15988 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15989 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15990 (Add_Symbol_Definition): Move to switch-c.adb
15991 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15992 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15993 (Add_Symbol_Definition): Move to switch-c.adb.
15994 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15996 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15997 Move to warnsw.adb.
15998 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15999 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
16000 Move to warnsw.adb.
16001 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
16002 (Add_Symbol_Definition): Moved from Prepcomp.
16003 * switch-c.ads: Update copyright notice. Use String_List instead of
16004 Argument_List, removing dependency on System.OS_Lib.
16006 2011-08-02 Yannick Moy <moy@adacore.com>
16008 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
16009 mode on initialization expression which does not respect SPARK
16011 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
16012 if the tree referenced by its argument represents an initialization
16013 expression in SPARK, suitable for initializing an object in an object
16016 2011-08-02 Javier Miranda <miranda@adacore.com>
16018 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
16019 internally generated access to subprogram with its associated protected
16021 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
16023 2011-08-02 Geert Bosch <bosch@adacore.com>
16025 * cstand.adb (Register_Float_Type): Print information about type to
16026 register, if the Debug_Flag_Dot_B is set.
16027 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
16028 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
16029 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
16030 with a requested precision of more than Max_Digits digits and no more
16031 than Max_Base_Digits digits, if a range specification is present and the
16032 Predefined_Float_Types list has a suitable type to derive from.
16033 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
16034 case of type completion with pragma Import
16036 (Process_Import_Predefined_Type): Processing to complete a type
16037 with pragma Import. Currently supports floating point types only.
16038 (Set_Convention_From_Pragma): Do nothing without underlying type.
16039 (Process_Convention): Guard against absence of underlying type,
16040 which may happen when importing incomplete types.
16041 (Process_Import_Or_Interface): Handle case of importing predefined
16042 types. Tweak error message.
16044 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16046 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
16047 functions to previous change. Reorganize code slightly.
16049 2011-08-02 Geert Bosch <bosch@adacore.com>
16051 * back_end.ads (Register_Type_Proc): New call back procedure type for
16052 allowing the back end to provide information about available types.
16053 (Register_Back_End_Types): New procedure to register back end types.
16054 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
16056 * cstand.adb (Back_End_Float_Types): New list for floating point types
16057 supported by the back end.
16058 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
16059 (Copy_Float_Type): New procedure to make new copies of predefined types.
16060 (Register_Float_Type): New call back procedure to populate the BEFT list
16061 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
16062 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
16063 (Create_Float_Types): New procedure to create entities for floating
16064 point types predefined in Standard, and put these and any remaining
16065 BEFTs on the Predefined_Float_Types list.
16066 * stand.ads (Predefined_Float_Types): New list for predefined floating
16067 point types that do not have declarations in package Standard.
16069 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16071 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
16072 entity node for the unit containing the parameter.
16073 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
16074 (Add_Inlined_Subprogram): Likewise.
16075 * gcc-interface/Make-lang.in: Update dependencies.
16077 2011-08-02 Thomas Quinot <quinot@adacore.com>
16079 * s-stusta.adb (Print): Make sure Pos is always initialized to a
16082 2011-08-02 Geert Bosch <bosch@adacore.com>
16084 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
16086 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16088 * sem_type.adb (Covers): Move trivial case to the top and reuse the
16089 computed value of Base_Type.
16091 2011-08-02 Yannick Moy <moy@adacore.com>
16093 * restrict.adb (Check_Restriction): issue an error for any use of
16094 class-wide, even if the No_Dispatch restriction is not set.
16095 * sem_aggr.adb: Correct typos in comments and messages in formal mode
16096 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
16097 when completing a private extension, the type named in the private part
16098 is not the same as that named in the visible part.
16099 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
16100 of an inherited primitive operations of a tagged type or type extension
16101 that returns the tagged type.
16102 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
16103 function which returns True for an implicit operation inherited by the
16104 derived type declaration for the argument type.
16105 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
16108 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16110 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
16111 Process_Bounds, to perform analysis with expansion of a range or an
16112 expression that is the iteration scheme for a loop.
16113 (Analyze_Iterator_Specification): If domain of iteration is given by a
16114 function call with a controlled result, as is the case if call returns
16115 a predefined container, ensure that finalization actions are properly
16117 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
16119 2011-08-02 Javier Miranda <miranda@adacore.com>
16121 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
16122 * gcc-interface/Make-lang.in: Update dependencies.
16124 2011-08-02 Javier Miranda <miranda@adacore.com>
16126 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
16127 determine if the analysis is performed using N or Original_Node (N).
16128 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
16129 functionality of routine Is_Variable avoids code duplication.
16130 * checks.adb (Determine_Range): Handle temporaries generated by
16131 Remove_Side_Effects.
16133 2011-08-02 Javier Miranda <miranda@adacore.com>
16135 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
16136 expansion of the condition. Required since the previous analysis was
16137 done with expansion disabled (see Resolve_Quantified_Expression) and
16138 hence checks were not inserted and record comparisons have not been
16141 2011-08-02 Ed Falis <falis@adacore.com>
16143 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
16146 2011-08-02 Bob Duff <duff@adacore.com>
16148 * opt.ads: Minor comment fix.
16150 2011-08-02 Bob Duff <duff@adacore.com>
16152 * sem_ch12.adb (Analyze_Package_Instantiation,
16153 Analyze_Subprogram_Instantiation): Turn off style checking while
16154 analyzing an instance. Whatever style checks that apply to the generic
16155 unit should apply, so it makes no sense to apply them in an instance.
16156 This was causing trouble when compiling an instance of a runtime
16157 unit that violates the -gnatyO switch.
16158 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
16159 one of the two case statements, causing spurious errors.
16161 2011-08-02 Robert Dewar <dewar@adacore.com>
16163 * uname.adb: Minor reformatting.
16164 * gnatcmd.adb: Minor reformatting.
16165 * exp_attr.adb: Minor reformatting.
16167 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16169 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
16170 No_Dispatching_Calls, do not look for the Assign primitive, because
16171 predefined primitives are not created in this case.
16173 2011-08-02 Bob Duff <duff@adacore.com>
16175 * stylesw.ads: Minor comment fixes.
16177 2011-08-02 Robert Dewar <dewar@adacore.com>
16179 * freeze.adb (Add_To_Result): New procedure.
16181 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16183 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
16184 time, if the specific run-time routines for handling streams of strings
16185 are not available, use the default mechanism.
16187 2011-08-02 Arnaud Charlet <charlet@adacore.com>
16189 * s-regpat.ads: Fix typo.
16191 2011-08-02 Vincent Celier <celier@adacore.com>
16193 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
16194 not null, call it to create the in memory config project file without
16195 parsing an existing default config project file.
16197 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16199 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
16201 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16203 * sem_elim.adb: an abstract subprogram does not need an eliminate
16204 pragma for its descendant to be eliminable.
16206 2011-08-02 Ed Falis <falis@adacore.com>
16208 * init.c: revert to handling before previous checkin for VxWorks
16209 * s-intman-vxworks.adb: delete unnecessary declarations related to
16210 using Ada interrupt facilities for handling signals.
16211 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
16212 * s-intman-vxworks.ads: Import __gnat_install_handler as
16213 Initialize_Interrupts.
16214 * s-taprop-vxworks.adb: Delete Signal_Mask.
16215 (Abort_Handler): change construction of mask to unblock exception
16218 2011-08-02 Jerome Guitton <guitton@adacore.com>
16220 * a-except-2005.adb (Raise_From_Signal_Handler): Call
16221 Debug_Raise_Exception before propagation starts.
16223 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16225 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
16226 to Restriction_Check_Required.
16227 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
16228 * sem_res.adb (Resolve_Call): Likewise.
16229 * sem_attr.adb (Check_Stream_Attribute): Likewise.
16231 2011-08-02 Bob Duff <duff@adacore.com>
16233 * stylesw.ads: Update comment.
16234 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
16235 * errout.ads: Remove obsolete comment.
16237 2011-08-02 Javier Miranda <miranda@adacore.com>
16239 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
16240 (Set_Is_Safe_To_Reevaluate): new procedure.
16241 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
16242 assignment is allowed on safe-to-reevaluate variables.
16243 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
16244 temporary created to remove side effects in expressions that use
16245 the secondary stack as safe-to-reevaluate.
16246 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
16247 variables that are not true constants.
16249 2011-08-02 Robert Dewar <dewar@adacore.com>
16251 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
16252 sem_res.adb, sem_ch6.adb: Minor reformatting.
16254 2011-08-02 Jerome Guitton <guitton@adacore.com>
16256 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
16258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16260 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
16261 not set Overridden_Operation if subprogram is an initialization
16264 2011-08-02 Yannick Moy <moy@adacore.com>
16266 * par-ch6.adb: Correct obsolete name in comments
16267 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
16268 which takes two message arguments (existing function takes one), with
16269 second message used for continuation.
16270 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
16271 block statements that originate from a source block statement, not
16272 generated block statements
16273 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
16274 symmetry with procedure case
16275 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
16276 function to issue an error in formal mode if a package specification
16277 contains more than one tagged type or type extension.
16278 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
16279 parameters matching formals of tagged types are objects (or ancestor
16280 type conversions of objects), not general expressions. Issue an error
16281 on view conversions that are not involving ancestor conversion of an
16283 (Resolve_Type_Conversion): in formal mode, issue an error on the
16284 operand of an ancestor type conversion which is not an object
16285 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
16286 procedure so that it works also for actuals of function calls
16287 (Is_Actual_Tagged_Parameter): new function which determines if its
16288 argument is an actual parameter of a formal of tagged type in a
16290 (Is_SPARK_Object_Reference): new function which determines if the tree
16291 referenced by its argument represents an object in SPARK
16293 2011-08-02 Robert Dewar <dewar@adacore.com>
16295 * sem_ch3.adb: Minor reformatting
16296 Minor comment addition
16297 Minor error msg text change
16299 2011-08-02 Javier Miranda <miranda@adacore.com>
16301 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
16302 function. Used to be more precise when we generate a variable plus one
16303 assignment to remove side effects in the evaluation of the Bound
16305 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
16306 of the bound expression to force its re-analysis and thus expand the
16307 associated transient scope (if required). Code cleanup replacing the
16308 previous code that declared the constant entity by an invocation to
16309 routine Force_Evaluation which centralizes this work in the frontend.
16311 2011-08-02 Robert Dewar <dewar@adacore.com>
16313 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
16314 (Base_Type): Now uses improved Is_Base_Type function
16315 * einfo.ads (Base_Type): Inline this function
16317 2011-08-02 Robert Dewar <dewar@adacore.com>
16319 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
16320 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
16322 2011-08-02 Arnaud Charlet <charlet@adacore.com>
16324 * gcc-interface/Make-lang.in: Update dependencies.
16325 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
16328 2011-08-02 Yannick Moy <moy@adacore.com>
16330 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
16331 non-simple expression used in delta constraint
16332 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
16333 index constraint which is not a subtype mark
16334 * par.adb: With and use Restrict
16335 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
16336 mode on component type which is not a subtype mark and default
16337 expression on component
16338 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
16339 of string which does not have a lower index bound equal to 1
16340 (Array_Type_Declaration): issue an error in formal mode on index or
16341 component type which is not a subtype mark, and on aliased keyword on
16343 (Derived_Type_Declaration): issue an error in formal mode on interface,
16344 limited or abstract type
16345 (Record_Type_Declaration): issue an error in formal mode on interface
16346 (Record_Type_Definition): issue an error in formal mode on tagged types
16347 and type extensions not declared in the specification of a library unit
16348 package; on null non-tagged record; on variant part
16350 2011-08-02 Vincent Celier <celier@adacore.com>
16352 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
16353 not declared for qualified library project when Library_Name is not
16354 declared, but Library_Dir is.
16356 2011-08-02 Robert Dewar <dewar@adacore.com>
16358 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
16359 pragmas (affects aspects [Component_]Default_Value
16360 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
16361 component type for the resolution
16363 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16365 * einfo.adb (Base_Type): Tune implementation for speed.
16367 2011-08-02 Robert Dewar <dewar@adacore.com>
16369 * freeze.adb: Minor reformatting.
16371 2011-08-02 Thomas Quinot <quinot@adacore.com>
16373 * scos.ads: Update comments.
16375 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16377 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
16378 base type, because the parent may be a subtype of a private type whose
16379 convention is established in a private part.
16381 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
16383 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
16384 statement in a block when the expansion of the return expression has
16385 created a finalization chain.
16386 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
16387 with the parent node.
16388 Add N_Extended_Return_Statement to handle the case where a transient
16389 object declaration appears in the Return_Object_Declarations list of
16390 an extended return statement.
16392 2011-08-02 Matthew Gingell <gingell@adacore.com>
16394 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
16395 unused parameter 'name'.
16397 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16399 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
16400 inherited operation, check whether its alias, which is the source
16401 operastion that it renames, has been marked eliminated.
16403 2011-08-02 Javier Miranda <miranda@adacore.com>
16405 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
16406 in-mode parameter whose type is an access type since it can be used to
16407 modify its designated object. Enforce code that handles as safe an
16408 access type that is not access-to-constant but it is the result of a
16409 previous removal of side-effects.
16410 (Remove_Side_Effects): Minor code reorganization of cases which require
16411 no action. Done to incorporate documentation on new cases uncovered
16412 working in this ticket: no action needed if this routine was invoked
16413 too early and the nodes are not yet decorated.
16414 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
16415 to routine Remove_Side_Effects by calls to Force_Evaluation since they
16416 were issued with actuals that are implicitly provided by
16419 2011-08-02 Robert Dewar <dewar@adacore.com>
16421 * sem_ch3.adb, sem_res.adb: Minor reformatting.
16423 2011-08-02 Yannick Moy <moy@adacore.com>
16425 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
16426 to issue an error in formal mode on attribute not supported in this mode
16427 (Analyze_Attribute): issue errors on standard attributes not supported
16429 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
16430 comment, and issue error in formal mode on modulus which is not a power
16432 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
16434 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
16436 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
16437 operator on modular type (except 'not').
16439 2011-08-02 Robert Dewar <dewar@adacore.com>
16441 * gnat_rm.texi: Minor reformatting.
16443 2011-08-02 Arnaud Charlet <charlet@adacore.com>
16445 * s-osinte-linux.ads: Minor comment update and reformatting.
16446 * i-cexten.ads: Make this unit pure, as for its parent.
16447 Will allow its usage in more contexts if needed.
16449 2011-08-02 Robert Dewar <dewar@adacore.com>
16451 * s-utf_32.ads: Minor comment fix.
16453 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16455 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
16456 operation of a tagged synchronized type, handle the case where the
16457 controlling argument is overloaded.
16459 2011-08-02 Yannick Moy <moy@adacore.com>
16461 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
16462 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
16463 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
16464 SPARK mode and formal verification mode on processing SPARK restriction
16465 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
16466 requiring consistency checking.
16468 2011-08-02 Robert Dewar <dewar@adacore.com>
16470 * sem_res.adb: Minor reformatting.
16472 2011-08-02 Robert Dewar <dewar@adacore.com>
16474 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16475 a-cforse.ads: Remove unneeded with of Ada.Containers
16476 Remove commented out pragma Inline's
16477 Move specifications of new subprograms to the actual specs
16479 2011-08-02 Yannick Moy <moy@adacore.com>
16481 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16482 a-cforse.ads: Update comments.
16484 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16486 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
16488 2011-08-02 Robert Dewar <dewar@adacore.com>
16490 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16491 a-cforse.ads, a-cofove.ads: Minor reformatting.
16493 2011-08-02 Claire Dross <dross@adacore.com>
16495 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
16496 a-cofove.ads: Add comments.
16498 2011-08-02 Yannick Moy <moy@adacore.com>
16500 * gnat_rm.texi: Document formal containers.
16502 2011-08-02 Emmanuel Briot <briot@adacore.com>
16504 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
16505 are empty sections.
16507 2011-08-02 Robert Dewar <dewar@adacore.com>
16509 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
16512 2011-08-02 Robert Dewar <dewar@adacore.com>
16514 * aspects.adb: New aspects Default_Value and Default_Component_Value
16515 New format of Aspect_Names table checks for omitted entries
16516 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
16517 handling of boolean aspects for derived types.
16518 New aspects Default_Value and Default_Component_Value
16519 New format of Aspect_Names table checks for omitted entries
16520 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
16521 (Has_Default_Value): New flag
16522 (Has_Default_Component_Value): New flag
16523 (Has_Default_Value): New flag
16524 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
16526 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
16527 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
16528 Default_Value and Default_Component_Value
16529 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
16530 New aspects Default_Value and Default_Component_Value
16531 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
16532 * sprint.adb: Print N_Aspect_Specification node when called from gdb
16534 2011-08-02 Vincent Celier <celier@adacore.com>
16536 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
16537 inherit library kind.
16539 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16541 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
16542 Minor reformatting.
16544 2011-08-02 Robert Dewar <dewar@adacore.com>
16546 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
16548 2011-08-02 Yannick Moy <moy@adacore.com>
16550 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
16552 2011-08-02 Robert Dewar <dewar@adacore.com>
16554 * impunit.adb: Add comment.
16556 2011-08-02 Yannick Moy <moy@adacore.com>
16558 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
16559 qualification of aggregates in formal mode
16560 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
16562 (Resolve_Aggregate): complete the test that an aggregate is adequately
16563 qualified in formal mode
16565 2011-08-02 Pascal Obry <obry@adacore.com>
16567 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
16568 * mlib-prj.adb: Supress warning when compiling binder generated file.
16569 (Build_Library): Supress all warnings when compiling the binder
16572 2011-08-02 Yannick Moy <moy@adacore.com>
16574 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
16576 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
16577 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
16578 Add with/use clauses to make Check_Formal_Restriction visible
16580 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16582 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
16583 in-parameters when type of the generic formal is private in the generic
16584 spec and non-private in the body.
16586 2011-08-02 Claire Dross <dross@adacore.com>
16588 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
16589 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
16590 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
16591 * impunit.adb, Makefile.rtl: Take new files into account.
16593 2011-08-02 Robert Dewar <dewar@adacore.com>
16595 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
16596 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
16598 2011-08-02 Yannick Moy <moy@adacore.com>
16600 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
16602 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
16603 matching static array bounds, taking into account the special case of
16605 * sem_ch3.adb: Typo in comment.
16607 2011-08-02 Yannick Moy <moy@adacore.com>
16609 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
16610 which issues an error in formal mode if its argument node is originally
16612 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
16613 has a discriminant specification so that it does not include the case
16615 (Derived_Type_Declaration): move here the test that a derived type has a
16616 discriminant specification
16617 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
16618 first element of a component association before accessing its choices
16619 (presence of component association is not enough)
16620 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
16621 declaration is a library item before accessing the next element in a
16622 list, as library items are not member of lists
16623 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
16624 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
16625 Check_Formal_Restriction whenever possible.
16627 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16629 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
16630 reference when needed.
16632 2011-08-02 Bob Duff <duff@adacore.com>
16634 * gnat_ugn.texi: Fix typo.
16636 2011-08-02 Vincent Celier <celier@adacore.com>
16638 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
16639 archive file name. Do not use the full path name of archives for Open
16642 2011-08-02 Robert Dewar <dewar@adacore.com>
16644 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
16645 Analyze_Aspect_Specifications
16647 (Analyze_Aspect_Specifications): New handling for boolean aspects
16648 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
16649 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
16650 sequence for Analyze_Aspect_Specifications
16651 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
16652 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
16654 2011-08-02 Robert Dewar <dewar@adacore.com>
16656 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
16657 aspects, since these no longer exist.
16659 2011-08-02 Robert Dewar <dewar@adacore.com>
16661 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
16662 semicolon, do not try to see if there are aspects following it.
16663 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
16666 2011-08-02 Robert Dewar <dewar@adacore.com>
16668 * sem_ch8.adb, aspects.ads: Minor reformatting.
16670 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16672 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
16673 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
16675 (Analyze_Aspect_Specifications): ...here. Call above procedure.
16677 2011-08-02 Yannick Moy <moy@adacore.com>
16679 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
16680 mode on subprogram declaration outside of package specification, unless
16681 it is followed by a pragma Import
16682 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
16683 Access_Type_Declaration): issue error in formal mode on access type
16684 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
16686 (Analyze_Object_Declaration): issue error in formal mode on object
16687 declaration which does not respect SPARK restrictions
16688 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
16689 declaration which does not respect SPARK restrictions
16690 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
16691 error in formal mode on digits or delta constraint
16692 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
16693 decimal fixed point type
16694 (Derived_Type_Declaration): issue error in formal mode on derived type
16695 other than type extensions of tagged record types
16696 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
16697 with check on access definition
16698 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
16699 mode on protected definition.
16700 (Analyze_Task_Definition): issue error in formal mode on task definition
16702 2011-08-02 Robert Dewar <dewar@adacore.com>
16704 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
16706 2011-08-02 Javier Miranda <miranda@adacore.com>
16708 * sem_ch6.adb (Can_Override_Operator): New function.
16709 (Verify_Overriding_Indicator): Add missing code to check overriding
16710 indicator in operators. Fixes regression.
16711 (Check_Overriding_Indicator): Minor reformating after replacing the
16712 code that evaluates if the subprogram can override an operator by
16713 invocations to the above new function.
16715 (Write_Field26_Name): Add missing code to ensure that, following
16716 the documentation in einfo.ads, this field is not shown as attribute
16717 "Static_Initialization" on non-dispatching functions.
16719 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16721 * sem_res.adb (Resolve_Call): A call to
16722 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
16723 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
16724 i.e., when the second parameter is of type Time_Span.
16726 2011-08-02 Vincent Celier <celier@adacore.com>
16728 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
16729 with an archive instead of -L<library dir> -l<library name>.
16731 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16733 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
16734 mark the base types In_Use in addition to making the operations
16737 2011-08-02 Ed Falis <falis@adacore.com>
16739 * init.c: add and setup __gnat_signal_mask for the exception signals
16740 * s-inmaop-vxworks.adb: new file.
16741 * s-intman-vxworks.adb: remove unnecessary initializations and
16743 * s-intman-vxworks.ads: remove unnecessary variable
16744 * s-taprop-vxworks.adb: simplify signal initialization
16746 2011-08-02 Robert Dewar <dewar@adacore.com>
16748 * sem_ch8.adb: Minor code reorganization, comment updates.
16750 2011-08-02 Robert Dewar <dewar@adacore.com>
16752 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
16753 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
16755 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
16756 (Matching_Static_Array_Bounds): Moved here from Sem_Res
16758 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16760 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
16761 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
16762 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
16763 use_type_clauses, to handle more efficiently use_type and use_all_type
16765 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
16766 Ada2012 Use_All_Type clause.
16767 (Use_Class_Wide_Operations): new procedure.
16769 2011-08-02 Robert Dewar <dewar@adacore.com>
16771 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
16772 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
16773 expression to expression function.
16775 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16777 * sem_ch4.adb: transform simple Ada2012 membership into equality only
16778 if types are compatible.
16780 2011-08-02 Yannick Moy <moy@adacore.com>
16782 * sem_res.adb (Matching_Static_Array_Bounds): new function which
16783 returns True if its argument array types have same dimension and same
16784 static bounds at each index.
16785 (Resolve_Actuals): issue an error in formal mode on actuals passed as
16786 OUT or IN OUT paramaters which are not view conversions in SPARK.
16787 (Resolve_Arithmetic_Op): issue an error in formal mode on
16788 multiplication or division with operands of fixed point types which are
16789 not qualified or explicitly converted.
16790 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
16791 Boolean or array type (except String) operands.
16792 (Resolve_Equality_Op): issue an error in formal mode on equality
16793 operators for array types other than String with non-matching static
16795 (Resolve_Logical_Op): issue an error in formal mode on logical operators
16796 for array types with non-matching static bounds. Factorize the code in
16797 Matching_Static_Array_Bounds.
16798 (Resolve_Qualified_Expression): issue an error in formal mode on
16799 qualified expressions for array types with non-matching static bounds.
16800 (Resolve_Type_Conversion): issue an error in formal mode on type
16801 conversion for array types with non-matching static bounds
16803 2011-08-02 Robert Dewar <dewar@adacore.com>
16805 * par-ch10.adb: Minor code reorganization (use Nkind_In).
16807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16809 * par-ch9.adb: save location of entry for proper error message.
16811 2011-08-02 Javier Miranda <miranda@adacore.com>
16813 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
16814 (Use_Full_View) which permits this routine to climb through the
16815 ancestors using the full-view of private parents.
16816 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
16817 Use_Full_View to true in calls to Is_Ancestor.
16818 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
16819 true in call to Is_Ancestor.
16820 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
16821 Use_Full_View to true in call to Is_Ancestor.
16822 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
16823 call to Is_Ancestor.
16824 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
16825 Use_Full_View to true in calls to Is_Ancestor.
16826 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
16827 Make_Select_Specific_Data_Table, Register_Primitive,
16828 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
16829 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
16830 to true in call to Is_Ancestor.
16831 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
16832 Use_Full_View to true in calls to Is_Ancestor.
16834 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
16835 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
16837 2011-08-02 Robert Dewar <dewar@adacore.com>
16839 * gnat_rm.texi: Minor reformatting.
16840 * sem_prag.adb: Minor reformatting.
16842 2011-08-02 Tristan Gingold <gingold@adacore.com>
16844 * vms_data.ads: Add VMS qualifier for -gnateP.
16846 2011-08-02 Robert Dewar <dewar@adacore.com>
16848 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
16849 * par-ch7.adb (P_Package): Proper placement of aspects for package
16850 decl/instantiation.
16851 * par-endh.adb (Check_End): Ad Is_Sloc parameter
16852 (End_Statements): Add Is_Sloc parameterr
16853 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
16854 (Check_End): Ad Is_Sloc parameter
16855 (End_Statements): Add Is_Sloc parameterr
16857 2011-08-02 Vincent Celier <celier@adacore.com>
16859 * ug_words: Add VMS qualifier equivalent to -gnateP:
16860 /SYMBOL_PREPROCESSING.
16862 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16864 * gnat-style.texi: For hexadecimal numeric literals the typical
16865 grouping of digits is 4 to represent 2 bytes.
16866 A procedure spec which is split into several lines is indented two
16869 2011-08-02 Yannick Moy <moy@adacore.com>
16871 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
16872 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
16873 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
16875 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
16876 choice in array aggregate
16877 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16879 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16880 positional and named aggregate for record, or others in record
16881 aggregate, or multiple choice in record aggregate
16882 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16883 array operands to logical operations AND, OR and XOR do not have the
16884 same static lower and higher bounds
16885 * sem_ch5.adb, sinfo.ads: Correct typos in comments
16887 2011-08-01 Robert Dewar <dewar@adacore.com>
16889 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16890 Replaces Last_Source_Node_In_Sequence.
16891 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16892 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16893 parens and blank in string (this was inconsistently implemented).
16895 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16896 blank in string (this was inconsistently implemented).
16898 (Set_Global_Switches): Set formal mode switches appropriately
16899 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16901 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16902 call Set_Error_Msg_Lang to set "spark" as language name.
16903 * par.adb: Remove unnecessary call to set formal language for errout
16904 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16905 appropriately and call Set_Error_Msg_Lang to set "spark" as language
16907 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16908 calls to it, moved after resolution so that types are known
16909 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16910 result of concatenation is not of type String
16911 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16912 concatenation is not properly restricted
16913 * gnat_rm.texi: Add doc on pragma Spark_95.
16914 * gcc-interface/Makefile.in: Remove obsolete target pairs for
16915 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16916 * gcc-interface/Make-lang.in: Update dependencies.
16918 2011-08-01 Javier Miranda <miranda@adacore.com>
16920 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16921 condition that detects if the overridden operation must replace an
16924 2011-08-01 Javier Miranda <miranda@adacore.com>
16926 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16927 code declarations inserted by Insert_Actions in each alternative of the
16928 N_Case_Expression node.
16930 2011-08-01 Robert Dewar <dewar@adacore.com>
16932 * sem_ch6.adb: Minor code reorganization.
16933 * sem_util.adb: Minor reformatting.
16935 2011-08-01 Pascal Obry <obry@adacore.com>
16937 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16938 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16940 2011-08-01 Yannick Moy <moy@adacore.com>
16942 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16943 literal or operator symbol which is prefixed
16944 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16945 mode on access attributes.
16946 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16947 that concatenation operands are properly restricted in formal mode
16948 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16949 Analyze_Concatenation_Operand. Issue an error in formal mode if the
16950 result of the concatenation has a type different from String.
16951 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16952 Analyze_Quantified_Expression, Analyze_Slice,
16953 Analyze_Null): issue an error in formal mode on unsupported constructs
16955 (Analyze_Block_Statement): only issue error on source block statement
16956 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16957 function which returns the last node in a list of nodes for which
16958 Comes_From_Source returns True, if any
16959 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16960 Last_Source_Node_In_Sequence
16961 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16962 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16963 mode on unsupported constructs
16964 * sem_ch9.adb Do not return after issuing error in formal mode, as the
16965 rest of the actions may be needed later on since the error is marked as
16967 * sinfo.ads: Typos in comments.
16969 2011-08-01 Pascal Obry <obry@adacore.com>
16971 * projects.texi: Minor editing.
16973 2011-08-01 Yannick Moy <moy@adacore.com>
16975 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16976 insertion character ~~
16977 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16978 (Set_Error_Msg_Lang): new procedure which fixes the language for use
16979 with insertion character ~~
16980 (Set_Msg_Text): treat insertion character ~~
16981 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16982 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16983 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16984 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16985 errors related to the formal language restriction not serious
16986 (insertion character |).
16987 * par.adb (Par): set formal language for error messages if needed
16988 * sem_ch6.adb (Check_Missing_Return): take into account possible
16989 generated statements at the end of the function
16990 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16991 enumeration value to define a new pragma SPARK_95
16992 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16993 SPARK_Version): new type and variables to store the SPARK version
16995 (SPARK_Mode): return True when SPARK_Version is set
16996 * par-prag.adb: Correct indentation
16997 (Prag): take Pragma_SPARK_95 into account
16998 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
17001 2011-08-01 Robert Dewar <dewar@adacore.com>
17003 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
17004 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
17005 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
17007 2011-08-01 Pascal Obry <obry@adacore.com>
17009 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
17010 Target_Name to Get_Path call.
17011 (Parse_Single_Project): Likewise.
17012 (Post_Parse_Context_Clause): Likewise.
17013 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
17014 Call Initialise_Project_Path with the proper Target_Name.
17015 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
17017 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
17018 with the proper Target_Name.
17019 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
17020 Part.Parse routine.
17021 (Parse_Project_And_Apply_Config): Likewise.
17022 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
17023 This is fine as this part of the code is supporting only native
17025 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
17026 is fine as this part of the code is supporting only native compilation.
17028 2011-08-01 Yannick Moy <moy@adacore.com>
17030 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
17031 of homonym, unless the homonym is one of the cases allowed in SPARK
17032 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
17033 package declaration occurring after a body.
17035 2011-08-01 Robert Dewar <dewar@adacore.com>
17037 * checks.adb, exp_ch4.adb: Minor reformatting.
17039 2011-08-01 Javier Miranda <miranda@adacore.com>
17041 * einfo.ads (Access_Disp_Table): Fix documentation.
17042 (Dispatch_Table_Wrappers): Fix documentation.
17044 2011-08-01 Pascal Obry <obry@adacore.com>
17046 * prj-env.adb, prj-env.ads: Minor reformatting.
17048 2011-08-01 Yannick Moy <moy@adacore.com>
17050 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
17051 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
17052 procedures out of these packages.
17053 * errout.ads, errout.adb
17054 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
17055 procedures in of this package
17056 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
17057 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
17058 on misplaced later vs initial declarations, like in Ada 83
17059 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
17060 formal mode on attribute of private type whose full type declaration
17062 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
17063 package declaration inside a package specification
17064 (Analyze_Full_Type_Declaration): issue error in formal mode on
17065 controlled type or discriminant type
17066 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
17067 user-defined operator means that it should come from the source
17068 (New_Overloaded_Entity): issue error in formal mode on overloaded
17070 * sem_ch6.ads, sem_ch13.ads: typos in comments.
17072 2011-08-01 Thomas Quinot <quinot@adacore.com>
17074 * atree.adb: Minor reformatting.
17075 * checks.adb: Minor reformatting.
17077 2011-08-01 Vincent Celier <celier@adacore.com>
17079 * s-parame-vms-ia64.ads: Fix typo in comment
17081 * s-parame-vms-restrict.ads: Removed, unused.
17083 2011-08-01 Javier Miranda <miranda@adacore.com>
17086 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
17088 (Constrain_Index): Remove side effects in the evaluation of the bounds.
17089 * sem_ch3.ads, sem_ch3.adb
17090 (Is_Constant_Bound): New extended version of the subprogram that was
17091 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
17092 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
17093 * sem_aux.ads (Constant_Value): Fix typo in comment.
17094 * checks.adb (Generate_Index_Checks): New implementation which, for
17095 array objects with constant bounds, generates the runtime check
17096 referencing the bounds of the array type. For other cases this routine
17097 provides its previous behavior obtaining such values from the array
17099 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
17101 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
17102 we cannot have semantic interpretations of the new node.
17104 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17106 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
17109 2011-08-01 Arnaud Charlet <charlet@adacore.com>
17111 * sem_ch8.adb: Minor code editing.
17112 * s-vxwext.adb: Remove trailing space.
17113 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
17114 consistency with other files.
17116 2011-08-01 Thomas Quinot <quinot@adacore.com>
17118 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
17120 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17122 * par-ch10.adb: reject parameterized expressions as compilation unit.
17123 * sem_ch4.adb: handle properly conditional expression with overloaded
17124 then_clause and no else_clause.
17126 2011-08-01 Tristan Gingold <gingold@adacore.com>
17128 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
17129 like done by System.Aux_DEC.
17130 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
17132 2011-08-01 Yannick Moy <moy@adacore.com>
17134 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
17135 missing label at end of declaration (subprogram or package)
17136 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
17137 of positional and named parameter association
17138 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
17139 Error_Msg_SP which adds a prefix to the error message giving the name
17140 of the formal language analyzed
17141 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
17142 access result type in subprogram, unconstrained array as result type,.
17143 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
17145 * sem_ch8.adb: Code clean up.
17147 2011-08-01 Javier Miranda <miranda@adacore.com>
17149 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
17150 * einfo.ads (Access_Disp_Table): Fix documentation.
17151 (Dispatch_Table_Wrappers): Fix documentation.
17152 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
17153 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
17154 to enforce the documentation of this attribute.
17155 (Set_Is_Interface): Cleanup the assertion.
17156 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
17157 the Underlying_Type entity before reading attribute Access_Disp_Table.
17158 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
17159 Locate the Underlying_Type before reading attribute Access_Disp_Table.
17160 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
17161 the Underlying_Type entity before reading attribute Access_Disp_Table.
17162 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
17163 Locate the Underlying_Type entity before reading attribute
17166 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17168 * s-poosiz.ads: Additional overriding indicators.
17170 2011-08-01 Yannick Moy <moy@adacore.com>
17172 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
17174 (Analyze_Iteration_Scheme): issue error in formal mode when loop
17175 parameter specification does not include a subtype mark.
17176 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
17177 formal mode on abstract subprogram.
17178 (Analyze_Subprogram_Specification): issue error in formal mode on
17179 user-defined operator.
17180 (Process_Formals): issue error in formal mode on access parameter and
17181 default expression.
17182 * sem_ch9.adb (Analyze_Abort_Statement,
17183 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
17184 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
17185 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
17186 Analyze_Requeue, Analyze_Selective_Accept,
17187 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
17188 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
17189 issue error in formal mode on user-defined raise statement.
17191 2011-08-01 Thomas Quinot <quinot@adacore.com>
17193 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
17194 declaration being hidden when overriding an implicit inherited
17196 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
17197 (-gnats), do not complain about a source file that contains only a
17200 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17202 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
17203 variable if already set.
17205 2011-08-01 Arnaud Charlet <charlet@adacore.com>
17207 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
17208 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
17209 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
17210 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
17211 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
17212 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
17213 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
17214 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
17215 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
17216 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
17217 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
17218 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
17219 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
17220 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
17221 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
17222 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
17223 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
17224 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
17225 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
17226 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
17227 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
17228 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
17229 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
17230 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
17231 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
17232 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
17233 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
17234 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
17235 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
17236 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
17237 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
17238 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
17239 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
17240 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
17241 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
17242 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
17243 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
17244 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
17245 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
17246 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
17247 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
17248 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
17249 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
17250 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
17251 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
17252 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
17253 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
17254 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
17255 s-osinte-mingw.ads: Update to GPLv3 run-time license.
17256 Use GNAT instead of GNARL.
17258 2011-08-01 Bob Duff <duff@adacore.com>
17260 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
17261 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
17262 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
17265 2011-08-01 Yannick Moy <moy@adacore.com>
17267 * debug.adb (d.D) reverve flag for the SPARK mode
17268 (d.E) reverve flag for SPARK generation mode
17269 (d.F) reverve flag for Why generation mode
17270 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
17271 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
17272 functions which return True when the corresponding modes are set
17273 (Formal_Language): return "spark" or "alfa" when in formal verification
17275 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
17276 Error_Msg to prefix the error message with a tag giving the formal
17278 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
17279 message with a tag giving the formal language
17280 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
17282 (Analyze_Case_Statement): issue error in formal mode on case statement
17283 with a single "others" case alternative
17284 (Analyze_Exit_Statement): issue errors in formal mode on exit
17285 statements which do not respect SPARK restrictions
17286 (Analyze_Goto_Statement): issue error in formal mode on goto statement
17287 (Check_Unreachable_Code): always issue an error (not a warning) in
17288 formal mode on unreachable code (concerns both code after an infinite
17289 loop and after an unconditional jump, both not allowed in SPARK)
17290 * sem_ch6.adb (Analyze_Return_Statement): add call to
17291 Set_Return_Present for a procedure containing a return statement
17292 (already done for functions in Analyze_Function_Return)
17293 (Analyze_Function_Return): issue error in formal mode on extended
17294 return or if return is not last statement in function
17295 (Check_Missing_Return): issue error in formal mode if function does
17296 not end with return or if procedure contains a return
17297 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
17298 function to detect if there is an inner scope of its parameter S which
17301 2011-08-01 Thomas Quinot <quinot@adacore.com>
17303 * sem_ch6.ads: Minor reformatting.
17305 2011-08-01 Javier Miranda <miranda@adacore.com>
17307 * sem_util.adb (Abstract_Interface_List): Complete condition when
17308 processing private type declarations to avoid reading unavailable
17310 (Is_Synchronized_Tagged_Type): Complete condition when processing
17311 private extension declaration nodes to avoid reading unavailable
17314 2011-08-01 Thomas Quinot <quinot@adacore.com>
17316 * sem_ch3.adb: Minor reformatting.
17318 2011-08-01 Thomas Quinot <quinot@adacore.com>
17320 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
17321 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
17322 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
17323 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
17324 for VMS, instead parametrize the common implementation with
17325 System.Parameters declarations.
17327 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
17329 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
17331 2011-08-01 Tristan Gingold <gingold@adacore.com>
17333 * seh_init.c: Fix SEH handler installation on win64.
17335 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17337 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
17338 double analysis of an anonymous access to subprogram, because it can
17339 lead to improper sharing of profiles and a back-end crash.
17341 2011-08-01 Robert Dewar <dewar@adacore.com>
17343 * make.adb, sem_ch4.adb: Minor reformatting.
17344 * gcc-interface/Make-lang.in: Update dependencies.
17345 * sem_util.adb, exp_ch5.adb: Minor reformatting.
17347 2011-08-01 Arnaud Charlet <charlet@adacore.com>
17349 * gnat_rm.texi: Fix definition of Long_Integer.
17351 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17353 * exp_aggr.adb: check limit size of static aggregate unconditionally,
17354 to prevent storage exhaustion.
17355 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
17356 finalized is a function body, insert the cleanup code before the final
17357 return statement, to prevent spurious warnings.
17358 * s-pooglo.ads: add overriding indicator.
17360 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17362 * sem_ch4.adb (Operator_Check): improve error message when both a
17363 with_clause and a use_clause are needed to make operator usage legal.
17364 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
17365 determine whether a compilation unit is visible within an other,
17366 either through a with_clause in the current unit, or a with_clause in
17367 its library unit or one one of its parents.
17369 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17371 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
17372 over an arbitrary expression of an array or container type.
17373 * lib-xref.adb: clarify comment.
17375 2011-08-01 Bob Duff <duff@adacore.com>
17377 * einfo.ads: Minor reformatting.
17378 * debug.adb: Minor comment improvement.
17380 2011-08-01 Javier Miranda <miranda@adacore.com>
17382 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
17383 consider hidden subprograms as valid candidates.
17385 2011-08-01 Arnaud Charlet <charlet@adacore.com>
17387 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
17389 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
17391 * gnat_ugn.texi: Fix typo.
17393 2011-08-01 Robert Dewar <dewar@adacore.com>
17395 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
17396 lib-xref.adb: Minor reformatting
17398 2011-08-01 Gary Dismukes <dismukes@adacore.com>
17400 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
17401 when to generate a call to Move_Final_List.
17402 (Has_Controlled_Parts): Remove this function.
17404 2011-08-01 Geert Bosch <bosch@adacore.com>
17406 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
17407 "," in choice list.
17409 2011-08-01 Thomas Quinot <quinot@adacore.com>
17411 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
17412 explicit raise of a predefined exception as Comes_From_Source if the
17413 original N_Raise_Statement comes from source.
17415 2011-08-01 Robert Dewar <dewar@adacore.com>
17417 * sinfo.ads: Add comment.
17418 * sem_ch6.adb: Minor reformatting.
17420 2011-08-01 Robert Dewar <dewar@adacore.com>
17422 * freeze.adb (Freeze_Entity): Refine check for bad component size
17423 clause to avoid rejecting confirming clause when atomic/aliased present.
17425 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17427 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
17428 better determine whether an entity reference is a write.
17429 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
17431 * lib-xref.adb (Output_References): Do no suppress a read reference at
17432 the same location as an immediately preceeding modify-reference, to
17433 handle properly in-out actuals.
17435 2011-08-01 Tristan Gingold <gingold@adacore.com>
17437 * env.c (__gnat_setenv) [VMS]: Refine previous change.
17439 2011-08-01 Quentin Ochem <ochem@adacore.com>
17441 * i-cstrin.adb (New_String): Changed implementation, now uses only the
17442 heap to compute the result.
17444 2011-08-01 Robert Dewar <dewar@adacore.com>
17446 * atree.ads: Minor reformatting.
17448 2011-08-01 Emmanuel Briot <briot@adacore.com>
17450 * g-expect.adb (Get_Command_Output): Fix memory leak.
17452 2011-08-01 Geert Bosch <bosch@adacore.com>
17454 * cstand.adb (P_Float_Type): New procedure to print the definition of
17455 predefined fpt types.
17456 (P_Mixed_Name): New procedure to print a name using mixed case
17457 (Print_Standard): Use P_Float_Type for printing floating point types
17458 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
17459 precision IEEE float.
17461 2011-08-01 Thomas Quinot <quinot@adacore.com>
17463 * sem_ch3.adb: Minor reformatting.
17465 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17467 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
17468 the completion of a generic function, insert the new body rather than
17469 rewriting the original.
17471 2011-08-01 Yannick Moy <moy@adacore.com>
17473 * sinfo.ads, errout.ads: Typos in comments.
17475 2011-08-01 Robert Dewar <dewar@adacore.com>
17477 * par-endh.adb: Minor reformatting.
17479 2011-08-01 Robert Dewar <dewar@adacore.com>
17481 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
17482 (Pre_Post_Aspects): New subtype.
17483 * par-ch12.adb (P_Generic): New syntax for aspects in packages
17484 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
17485 * par-ch7.adb (P_Package): Remove Decl parameter
17486 (P_Package): Handle new syntax for aspects (before IS)
17487 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
17489 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
17490 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
17491 (P_Package): Remove Decl parameter
17492 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
17494 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
17496 * sem_util.ads, sem_util.adb (Static_Boolean): New function
17497 * sinfo.ads: Document new syntax for aspects in packages etc.
17498 * sprint.adb: Handle new syntax of aspects before IS in package
17500 2011-08-01 Thomas Quinot <quinot@adacore.com>
17502 * atree.ads: Minor reformatting.
17503 * sem_prag.adb: Minor reformatting.
17505 2011-08-01 Robert Dewar <dewar@adacore.com>
17507 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
17508 case expr alternative.
17510 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17512 * sem_ch12.adb: Fix typo.
17514 2011-08-01 Geert Bosch <bosch@adacore.com>
17516 * sem_prag.adb (Check_No_Link_Name): New procedure.
17517 (Process_Import_Or_Interface): Use Check_No_Link_Name.
17518 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
17519 instead of Standard_Long_Long_Float_Size global. Preparation for
17520 eventual removal of per type constants.
17521 * exp_util.ads (Get_Stream_Size): New function returning the stream
17522 size value of subtype E.
17523 * exp_util.adb (Get_Stream_Size): Implement new function.
17524 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
17526 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
17528 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
17530 2011-08-01 Geert Bosch <bosch@adacore.com>
17532 * cstand.adb: Fix comments.
17533 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
17534 count of arguments.
17536 2011-08-01 Robert Dewar <dewar@adacore.com>
17538 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
17540 2011-08-01 Geert Bosch <bosch@adacore.com>
17542 * atree.ads: Fix comment.
17544 2011-08-01 Robert Dewar <dewar@adacore.com>
17546 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
17547 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
17548 * par.adb: Add with for Namet.Sp.
17549 * par-tchk.adb: Minor reformatting.
17551 2011-08-01 Vincent Celier <celier@adacore.com>
17553 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
17554 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
17555 of the init procedure of a SAL.
17556 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
17559 2011-08-01 Thomas Quinot <quinot@adacore.com>
17561 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
17564 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17566 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
17568 2011-08-01 Thomas Quinot <quinot@adacore.com>
17570 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
17571 conformant with its spec (return True only for types that have
17572 an overriding Initialize primitive operation that prevents them from
17573 having preelaborable initialization).
17574 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
17575 initialization for controlled types in Ada 2005 or later mode.
17577 2011-08-01 Robert Dewar <dewar@adacore.com>
17579 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
17581 (Same_Aspect): New function.
17582 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
17583 Type_Invariant, Precondition, Postcondition.
17584 * snames.ads-tmpl: Add Name_Type_Invariant.
17586 2011-08-01 Robert Dewar <dewar@adacore.com>
17588 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
17590 (Freeze_All_Ent): Fix error in handling inherited aspects.
17591 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
17592 already analyzed, but don't skip entire processing of a declaration,
17593 that's wrong in some cases of declarations being rewritten.
17594 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
17595 Don't delay for integer, string literals
17596 Treat predicates in usual manner for delay, remove special case code,
17598 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
17599 (Build_Predicate_Function): Update saved expression in aspect
17600 (Build_Invariant_Procedure): Update saved expression in aspect
17601 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
17602 of replacement of discriminant references if the reference is simple.
17604 2011-08-01 Robert Dewar <dewar@adacore.com>
17606 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
17607 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
17608 Static_Predicate and Dynamic_Predicate.
17609 (Build_Predicate_Function): Add processing for Static_Predicate
17610 and Dynamic_Predicate.
17611 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
17612 (From_Static_Predicate): New flag
17613 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
17615 2011-08-01 Robert Dewar <dewar@adacore.com>
17617 * usage.adb: Documentation cleanup for Ada version modes in usage.
17618 * expander.adb: Minor reformatting.
17620 2011-08-01 Robert Dewar <dewar@adacore.com>
17622 * atree.ads: Minor comment fix.
17623 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
17624 a-witeio.ads, sem_prag.adb: Minor reformatting.
17626 2011-08-01 Doug Rupp <rupp@adacore.com>
17628 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
17629 pointers. Use descrip.h header file for convenience. Add some
17632 2011-08-01 Robert Dewar <dewar@adacore.com>
17634 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
17635 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
17636 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
17638 (Check_Aspect_At_End_Of_Declarations): New procedure
17639 (Analye_Aspect_Specification): Minor changes for above procedures
17640 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
17641 specification node as well.
17643 2011-08-01 Pascal Obry <obry@adacore.com>
17645 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
17646 Windows files. Use GetFilesAttributes() in this case to check for file
17647 existence instead of returning with an error code.
17649 2011-08-01 Vincent Celier <celier@adacore.com>
17651 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
17652 High is above Source length.
17654 2011-08-01 Robert Dewar <dewar@adacore.com>
17656 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
17658 2011-08-01 Robert Dewar <dewar@adacore.com>
17660 * aspects.ads (Boolean_Aspects): New subtype.
17661 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
17662 for derived types in cases where the parent type and derived type have
17664 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
17665 with aspects when parent type also has aspects.
17666 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
17667 boolean expression at this point).
17668 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
17669 accordance with final decision on the Ada 2012 feature.
17670 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
17672 2011-08-01 Matthew Heaney <heaney@adacore.com>
17674 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
17676 2011-08-01 Pascal Obry <obry@adacore.com>
17678 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
17679 Fix Replace_Slice when High is above current string size.
17680 (Replace_Slice): Fix DL computation when High is above current
17683 2011-08-01 Gary Dismukes <dismukes@adacore.com>
17685 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
17687 2011-08-01 Matthew Heaney <heaney@adacore.com>
17689 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
17692 2011-08-01 Pascal Obry <obry@adacore.com>
17694 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
17697 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17699 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
17700 access to protected subprograms in generic bodies.
17701 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
17702 protected type, indicate that the convention of the subprogram is
17703 Convention_Protected, because it may be used in subsequent declarations
17704 within the protected declaration.
17706 2011-08-01 Vincent Celier <celier@adacore.com>
17708 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
17709 and "final" procedures when the name of the library is "ada", to avoid
17710 duplicate symbols "adainit" and "adafinal" in executables.
17712 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17714 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
17715 quantified expression that appears within a postcondition and uses the
17716 Ada2012 'Result attribute.
17718 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17720 * init.c (__gnat_error_handler): Cast reason to int.
17721 (__gnat_install_handler): Explain sa_sigaction use.
17723 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17725 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
17726 subprogram has copy-in copy-out parameters, try to promote the mode of
17727 the return type if it is passed in registers.
17729 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17731 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
17732 left operand as addressable.
17734 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17736 * gcc-interface/gigi.h (build_function_stub): Remove.
17737 (build_return_expr): Likewise.
17738 (convert_vms_descriptor): Declare.
17739 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
17740 (build_function_stub): Move to...
17741 * gcc-interface/utils2.c (build_return_expr): Move to...
17742 * gcc-interface/trans.c (build_function_stub): ...here.
17743 (build_return_expr): ...here.
17744 (Subprogram_Body_to_gnu): Add local variable for language_function.
17745 Disconnect the parameter attributes cache, if any, once done with it.
17746 Call end_subprog_body only after setting the end_locus.
17747 Build the stub associated with the function, if any, at the very end.
17748 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
17749 variables and streamline control flow.
17751 2011-07-23 Arnaud Charlet <charlet@adacore.com>
17754 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
17755 g-trasym-dwarf.adb.
17757 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17760 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
17761 Assign to act.sa_sigaction.
17762 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
17763 current->return_address to char * before arithmetic.
17765 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17767 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
17768 Correct argument types.
17769 Extract code from reason.
17770 (__gnat_install_handler): Assign to act.sa_sigaction.
17772 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
17774 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
17775 (GNAT1_OBJS): ...here.
17777 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
17780 * g-socthi-mingw.adb (Fill): Fix formatting.
17782 * gcc-interface/gigi.h: Move around comment.
17784 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
17787 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
17789 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
17792 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
17794 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
17796 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
17797 range comparison if Pmode is SImode.
17799 2011-07-12 Laurent GUERBY <laurent@guerby.net>
17800 Eric Botcazou <ebotcazou@adacore.com>
17802 * adadecode.c: Wrap up in extern "C" block.
17803 * adadecode.h: Likewise.
17804 * adaint.c: Likewise. Remove 'const' keyword.
17805 * adaint.h: Likewise.
17806 * argv.c: Likewise.
17807 * atree.h: Likewise.
17809 * cstreams.c: Likewise.
17811 * exit.c: Likewise.
17813 * final.c: Likewise.
17814 * init.c: Likewise.
17815 * initialize.c: Likewise.
17816 * link.c: Likewise.
17817 * namet.h: Likewise.
17818 * nlists.h: Likewise.
17819 * raise.c: Likewise.
17820 * raise.h: Likewise.
17821 * repinfo.h: Likewise.
17822 * seh_init.c: Likewise.
17823 * targext.c: Likewise.
17824 * tracebak.c: Likewise.
17825 * uintp.h: Likewise.
17826 * urealp.h: Likewise.
17827 * xeinfo.adb: Wrap up generated C code in extern "C" block.
17828 * xsinfo.adb: Likewise.
17829 * xsnamest.adb: Likewise.
17830 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
17831 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
17832 * gcc-interface/misc.c: Likewise.
17833 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
17834 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
17835 ada/targext.o here...
17836 (GNAT_ADA_OBJS): ...and not here.
17837 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
17838 (GNATBIND_OBJS): Reorder.
17840 2011-07-07 Richard Henderson <rth@redhat.com>
17842 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
17843 dwarf2out_frame_init.
17845 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
17847 * gcc-interface/misc.c (gnat_init): Tweak previous change.
17849 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17852 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
17854 2011-07-06 Richard Guenther <rguenther@suse.de>
17856 * gcc-interface/misc.c (gnat_init): Merge calls to
17857 build_common_tree_nodes and build_common_tree_nodes_2.
17858 Re-initialize boolean_false_node.
17860 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
17861 Olivier Hainque <hainque@adacore.com>
17862 Nicolas Setton <setton@adacore.com>
17864 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
17865 the type according to the ARTIFICIAL_P parameter.
17866 (create_type_decl): Likewise.
17867 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
17869 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
17871 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
17872 (gnatbind): Likewise.
17874 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17876 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17878 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17880 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17881 local variable throughout. Remove useless call to Base_Type.
17882 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17883 Take it also into account for the volatileness of the field. Set the
17884 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
17886 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17888 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17889 on a dereference built for a by-ref object if it has an address clause.
17891 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17893 * einfo.ads (Address_Taken): Document use for the second argument of
17894 Asm_Input and Asm_Output attributes.
17895 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17896 argument is an entity name, then set Address_Taken on it.
17897 <Attribute_Asm_Output>: Likewise.
17898 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17899 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17900 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17901 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17903 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
17905 PR middle-end/46500
17906 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17908 2011-06-14 Joseph Myers <joseph@codesourcery.com>
17910 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17911 (ada/utils.o): Update dependencies.
17912 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17913 ../../../libcpp/libcpp.a.
17914 * gcc-interface/utils.c: Include common/common-target.h.
17915 (process_attributes): Use targetm_common.have_named_sections.
17917 2011-06-07 Richard Guenther <rguenther@suse.de>
17919 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17922 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17924 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17925 TREE_THIS_NOTRAP flag.
17927 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17929 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17932 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17934 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17935 constants whose full view has discriminants specially.
17937 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17939 * gcc-interface/utils.c: Include diagnostic.h.
17940 (gnat_write_global_declarations): Output debug information for all
17941 global type declarations before finalizing the compilation unit.
17942 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17944 2011-05-25 Jakub Jelinek <jakub@redhat.com>
17946 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17948 2011-05-25 Kai Tietz <ktietz@redhat.com>
17950 * adaint.c (__gnat_to_canonical_file_list_next): Use array
17951 initialization instead of const/none-const pointer assignment.
17953 2011-05-24 Joseph Myers <joseph@codesourcery.com>
17955 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17956 $(EXTRA_GNAT1_OBJS).
17957 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17958 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17959 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17960 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17961 libcommon-target.a instead of prefix.o.
17963 2011-05-21 Joseph Myers <joseph@codesourcery.com>
17966 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17968 2011-05-20 Joseph Myers <joseph@codesourcery.com>
17970 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17971 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17972 instead of version.o.
17974 2011-05-18 Kai Tietz <ktietz@redhat.com>
17976 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17977 boolean_false_node instead of integer_zero_node.
17978 (convert_with_check): Likewise.
17979 * gcc-interface/decl.c (choices_to_gnu): Likewise.
17981 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
17983 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17984 type of the parameter is an unconstrained array, convert the actual to
17985 the type of the formal in the In Out and Out cases as well.
17987 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17989 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17990 call build_function_type_array or build_varargs_function_type_array
17992 (create_subprog_type): Don't call build_function_type; call
17993 build_function_type_vec instead.
17995 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17997 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17998 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17999 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
18001 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
18003 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
18005 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
18006 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
18008 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
18010 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
18012 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
18014 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
18015 instead of accessing TYPE_ARG_TYPES directly.
18016 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
18018 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
18021 * gcc-interface/gigi.h (get_variant_part): Declare.
18022 * gcc-interface/decl.c (get_variant_part): Make global.
18023 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
18024 types have the same constant size, are record types and T1 has a
18025 variant part while T2 doesn't.
18027 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
18029 * gcc-interface/utils.c (begin_subprog_body): Do not call
18031 (end_subprog_body): Likewise.
18033 2011-05-04 Richard Guenther <rguenther@suse.de>
18035 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
18037 (pos_to_constructor): Likewise.
18039 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
18040 Eric Botcazou <ebotcazou@adacore.com>
18042 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
18043 of build_function_type. Adjust calls to...
18044 (build_raise_check): ...this. Do not take a void_tree parameter.
18045 Call build_function_type_list instead of build_function_type.
18046 Fix head comment and swap couple of conditional blocks.
18048 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
18050 * gnatvsn.ads (Library_Version): Bump to 4.7.
18051 (Current_Year): Bump to 2011.
18053 2011-04-29 Michael Matz <matz@suse.de>
18055 * gcc-interface/misc.c (gnat_handle_option): Set
18056 warn_maybe_uninitialized.
18058 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
18060 * gnat_ugn.texi (Complexity Metrics Control): Update link to
18061 the Watson/McCabe paper.
18063 2011-04-23 Jim Meyering <meyering@redhat.com>
18065 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
18067 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
18069 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
18072 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
18074 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
18076 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
18077 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
18078 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
18079 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
18080 <all>: Do not set flags on the reused DECL node coming from an alias.
18081 Set DECL_IGNORED_P on the DECL node built for subprograms if they
18082 don't need debug info here...
18083 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
18084 (gigi): Adjust calls to create_subprog_decl.
18085 (build_raise_check): Likewise.
18086 (establish_gnat_vms_condition_handler): Likewise.
18087 (Compilation_Unit_to_gnu): Likewise.
18088 (gnat_to_gnu): Likewise.
18090 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
18092 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
18093 (NO_REORDER_ADAFLAGS): New variable.
18094 (EXTRA_GNATTOOLS): Always define.
18095 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
18096 Clean up and adjust list of files compiled with special options.
18097 * gcc-interface/Make-lang.in: Likewise.
18098 (ada/decl.o): Cosmetical change.
18099 (ada/misc.o): Remove dependency on $(PLUGIN_H).
18101 2011-04-20 Jim Meyering <meyering@redhat.com>
18103 * initialize.c (__gnat_initialize): Remove useless if-before-free.
18105 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
18107 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
18108 $(CFLAGS) on the link line.
18110 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
18112 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
18113 padded type built for the return type if it is unconstrained.
18115 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
18117 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
18119 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
18121 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
18122 before calling TREE_CHAIN.
18123 * gcc-interface/misc.c (gnat_init_ts): New function.
18124 (LANG_HOOKS_INIT_TS): Define.
18126 2011-04-12 Martin Jambor <mjambor@suse.cz>
18128 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
18129 instead of cgraph_node.
18131 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
18133 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
18134 alignment on fields of the RETURN type built for the Copy-In Copy-Out
18137 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
18139 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
18140 of aggregate types that contain a placeholder.
18142 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
18144 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
18146 (handle_type_generic_attribute): Likewise.
18148 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
18151 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
18153 2011-04-04 Kai Tietz <ktietz@redhat.com>
18156 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
18159 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18161 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
18162 type case, do not strip a padding type around the array type.
18164 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18166 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
18169 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18171 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
18172 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
18173 code for -feliminate-unused-debug-types.
18174 (gnat_post_options): Likewise.
18176 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18178 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
18179 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
18182 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18184 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
18185 DECL_ARTIFICIAL flag on enumeration types.
18187 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18189 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
18190 fat pointer types artificial unconditionally.
18191 <E_Array_Subtype>: Attach the base array type as a parallel type if it
18194 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18196 * gcc-interface/gigi.h (get_dummy_type): Declare.
18197 (build_dummy_unc_pointer_types): Likewise.
18198 (finish_fat_pointer_type): Likewise.
18199 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
18200 fat pointer type has been built, complete it in place.
18201 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
18202 and thin pointers. Remove useless variable.
18203 (finish_fat_pointer_type): Make global and move to...
18204 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
18205 (get_dummy_type): New function.
18206 (build_dummy_unc_pointer_types): Likewise.
18207 (gnat_pushdecl): Propage the name to the anonymous variants only.
18208 (update_pointer_to): Only adjust the pointer types in the unconstrained
18211 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18213 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
18214 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
18215 if this is a Taft amendment type and the full declaration is available.
18216 * gcc-interface/trans.c (process_type): Likewise.
18217 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
18218 (process_freeze_entity): Likewise.
18219 * gcc-interface/utils.c (dummy_global): New static variable.
18220 (gnat_write_global_declarations): If there are types declared as used
18221 at the global level, insert them in the global hash table.
18223 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18225 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
18226 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
18227 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
18229 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
18230 flag of the type accordingly.
18231 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
18233 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
18235 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
18236 finalizing types when updating the pointers to the designated type.
18237 <all>: Finalize the deferred types even if we didn't defer processing
18238 of incomplete types in this invocation.
18240 2011-04-01 Olivier Hainque <hainque@adacore.com>
18241 Nicolas Setton <setton@adacore.com>
18242 Eric Botcazou <ebotcazou@adacore.com>
18244 * gcc-interface/misc.c (gnat_descriptive_type): New function.
18245 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
18247 2011-03-28 Kai Tietz <ktietz@redhat.com>
18249 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
18251 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
18252 * system-mingw.ads (System): Change ZCX_By_Default default to True.
18254 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
18256 2011-03-28 Tristan Gingold <gingold@adacore.com>
18259 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
18260 Use ada output of gnatbind.
18261 (ada/b_gnatb.adb): Ditto.
18262 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
18263 (ada.mostlyclean, ada.stage1)
18264 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
18265 (ada.stagefeedback): Adjust.
18266 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
18267 Use ada output of gnatbind.
18268 (b_gnatm.adb): Ditto.
18269 (b_gnatl.o, b_gnatm.o): New rules.
18271 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
18273 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
18274 for the padded type built to support a specified size or alignment.
18276 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
18278 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
18279 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
18280 unconditionally to the end of the unit when the designated type is
18282 <all>: Rename local variable. Attempt to un-defer types only and do it
18283 for limited_with'ed types as well.
18284 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
18285 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
18286 consistently and remove redundant call to finalize_from_with_types.
18288 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
18290 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
18291 subprograms without a previous spec declared in the same unit.
18292 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
18293 subprograms at the end of the unit instead of at the beginning.
18294 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
18295 isn't public for the special handling of non-inline functions nested
18296 inside inline external functions.
18298 2011-03-25 Jeff Law <law@redhat.com>
18300 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
18302 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
18304 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
18305 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
18306 to compute Set_Size_Depends_On_Discriminant.
18307 (Layout_Type): Call it on array types in back-end layout mode.
18308 * sem_util.adb (Requires_Transient_Scope): Return true for array
18309 types only if the size depends on the value of discriminants.
18310 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
18311 type if the RHS is a call to a function that returns an unconstrained
18312 type with default discriminant.
18314 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
18316 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
18317 non-conversion to the nominal result type at the end.
18319 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
18321 * gcc-interface/trans.c (create_temporary): New function taken from...
18322 (create_init_temporary): ...here. Call it.
18323 (call_to_gnu): Create the temporary for the return value early, if any.
18324 Create it for a function with copy-in/copy-out parameters if there is
18325 no target; in other cases of copy-in/copy-out, use another temporary.
18326 Push the new binding level lazily. Add and rename local variables.
18328 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
18330 * gcc-interface/decl.c (validate_size): Improve comments and tweak
18332 (set_rm_size): Likewise.
18334 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
18336 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
18337 for the padded type built in order to support a specified alignment.
18338 Fix incorrect formatting.
18340 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
18343 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
18345 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
18347 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
18348 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
18349 to the end of the list. Adjust recursive call. Rename local variable.
18350 If REORDER is true, reorder components of the record type.
18351 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
18352 components_to_record and adjust the parameter list.
18354 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
18356 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
18357 disabled, use the variable for bounds of loop iteration scheme.
18359 2011-03-21 Kai Tietz <ktietz@redhat.com>
18362 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
18364 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
18366 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
18367 out whether the expression is read-only. Short-circuit placeholder
18368 case and rename a couple of local variables.
18370 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
18372 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
18373 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
18374 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
18375 (convert): Deal with conversions from a smaller form type specially.
18377 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
18379 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
18380 its argument, except for the special -I- switch.
18382 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
18384 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
18387 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
18389 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
18391 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
18393 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
18395 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
18396 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
18397 instead of GNAT_FORMAL. Protect the expression against multiple uses.
18398 Do not generate the check directly, instead instantiate the template
18399 check present in the descriptor.
18400 (make_descriptor_field): Move around.
18401 (build_vms_descriptor32): Build a template check in the POINTER field.
18402 (build_vms_descriptor): Remove useless suffixes.
18403 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
18405 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
18408 * targext.c: Include target files if IN_RTS is defined.
18410 2011-01-26 Richard Guenther <rguenther@suse.de>
18413 * targext.c: Include config.h.
18414 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
18417 2011-01-04 Pascal Obry <obry@adacore.com>
18418 Eric Botcazou <ebotcazou@adacore.com>
18420 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
18422 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
18424 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
18425 end-of-case on the end label and its associated gotos, if any.
18427 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
18429 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
18430 expressions of the parameter cache within the statement group of
18431 the CICO mechanism.
18433 2011-01-04 Olivier Hainque <hainque@adacore.com>
18434 Eric Botcazou <ebotcazou@adacore.com>
18436 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
18437 (set_end_locus_from_node): New function.
18438 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
18439 make and the function end_locus.
18440 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
18441 for the elaboration subprogram.
18442 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
18443 set the end_locus of the expression as well.
18445 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
18448 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
18449 variables that are referenced in exception handlers volatile.
18453 Copyright (C) 2011 Free Software Foundation, Inc.
18455 Copying and distribution of this file, with or without modification,
18456 are permitted in any medium without royalty provided the copyright
18457 notice and this notice are preserved.