12011-12-23 Pascal Obry <obry@adacore.com> 2 3 * prj.ads (For_Every_Project_Imported): Add In_Aggregate_Lib 4 parameter to generic formal procedure. 5 * prj.adb (For_Every_Project_Imported): Update accordingly. 6 (Recursive_Check): Likewise. Do not parse imported project for 7 aggregate library. This is needed as the imported projects are 8 there just to handle dependencies. 9 (Look_For_Sources): Likewise. 10 (Recursive_Add): Likewise. 11 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: 12 Add In_Aggregate_Lib parameter to routines used with 13 For_Every_Project_Imported generic procedure. 14 * prj-nmsc.adb (Tree_Processing_Data): Add In_Aggregate_Lib field. 15 (Check): Move where it is used. Fix implementation 16 to not check libraries that are inside aggregate libraries. 17 (Recursive_Check): Add In_Aggregate_Lib parameter. 18 192011-12-23 Ed Schonberg <schonberg@adacore.com> 20 21 * sem_ch7.adb (Analyze_Package_Body, Has_Referencer): A generic 22 package is a referencer regardless of whether there is a 23 subsequent subprogram with an Inline pragma. 24 252011-12-23 Geert Bosch <bosch@adacore.com> 26 27 * sem_ch3.adb (Can_Derive_From): Check matching Float_Rep on VMS. 28 292011-12-23 Pascal Obry <obry@adacore.com> 30 31 * gnatcmd.adb, prj.adb, prj-nmsc.adb: Minor reformatting. 32 332011-12-22 Hristian Kirtchev <kirtchev@adacore.com> 34 35 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Create the objects 36 associated with exception handling unconditionally. 37 (Build_Adjust_Statements): Create the objects associated with 38 exception handling unconditionally. 39 (Build_Components): Create the objects associated with exception 40 handling unconditionally. 41 (Build_Finalize_Statements): Create the objects associated with 42 exception handling unconditionally. 43 (Build_Initialize_Statements): Create the objects associated with 44 exception handling unconditionally. 45 (Build_Object_Declarations): Set the proper location of the data 46 record when exception propagation is forbidden. 47 482011-12-22 Gary Dismukes <dismukes@adacore.com> 49 50 * a-tienio.adb (Put): Test validity of Item parameters before 51 applying Image, and raise Constraint_Error for invalid values. 52 532011-12-22 Bob Duff <duff@adacore.com> 54 55 * a-stwima.ads (Initialize,Adjust,Finalize): Add overriding indicators. 56 * a-ststio.ads (AFCB_Allocate,AFCB_Close,AFCB_Free,Read,Write): Add 57 overriding indicators. 58 592011-12-22 Arnaud Charlet <charlet@adacore.com> 60 61 * s-osinte-hpux-dce.ads: Update header to GPLv3 62 632011-12-22 Ed Schonberg <schonberg@adacore.com> 64 65 * a-cohase.ads, a-cohase.adb: Update to latest RM version. Add 66 aspect Constant_Reference to set type, and corresponding 67 functions. 68 * a-cihama.ads, a-cihama.adb: Update to latest RM version. Add 69 function Reference to provide a proper element iterator construct 70 over indefinite maps. 71 722011-12-22 Ed Schonberg <schonberg@adacore.com> 73 74 * exp_attr.adb (Expand_N_Attribute, case 'Access): Do not insert 75 implicit conversion on prefix of Unrestricted_Access when prefix 76 is an explicit dereference. 77 782011-12-22 Vincent Pucci <pucci@adacore.com> 79 80 * sem_dim.adb: Addressed all ??? comments. Replacement of warnings by 81 errors using continuation marks. 82 (Error_Dim_Msg_For_?): Renaming of Error_Dim_For_?. 83 842011-12-22 Robert Dewar <dewar@adacore.com> 85 86 * sem_ch3.adb, sem_ch3.ads, sem_prag.adb: Minor code clean up. 87 882011-12-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 89 90 * s-oscons-tmplt.c [__alpha__ && __osf__] (_XOPEN_SOURCE): Define. 91 922011-12-21 Javier Miranda <miranda@adacore.com> 93 94 * sem_ch3.ads, sem_ch3.adb (Check_CPP_Type): New subprogram. 95 (Process_Full_View): Invoke Check_CPP_Type if processing the 96 full-view of a CPP type. 97 * sem_prag.adb (Process_Import_Or_Interface): Add missing support 98 for importing a CPP type that has an incomplete declaration. Move 99 to new routine Check_CPP_Type the code that verifies that 100 components of imported CPP types do not have default expressions. 101 1022011-12-21 Vincent Celier <celier@adacore.com> 103 104 * prj-nmsc.adb (Report_No_Sources): Remove argument Lang. Report 105 no sources even for languages that are not allowed. 106 (Add_Source): Get the source even when the language is not allowed. 107 1082011-12-21 Robert Dewar <dewar@adacore.com> 109 110 * sem_ch6.adb (Process_Formals): Add defensive code. 111 1122011-12-21 Ed Schonberg <schonberg@adacore.com> 113 114 * sem_ch7.adb, sem_ch13.adb (Analyze_Package_Specification): Build the 115 invariant procedure of a type declaration that is a completion and has 116 aspect specifications. 117 (Build_Invariant_Procedure): If the procedure is built for a 118 type declaration that is a completion, analyze body expliitly 119 because all private declarations have been already analyzed. 120 1212011-12-21 Claire Dross <dross@adacore.com> 122 123 * a-cfdlli.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb, 124 a-cofove.adb: Minor reformating on formal containers 125 1262011-12-21 Vincent Celier <celier@adacore.com> 127 128 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Remove 129 any main that is not in the list of restricted languages. 130 (Insert_Project_Sources.Do_Insert): Only add sources of languages 131 in the list of restricted languages. 132 1332011-12-21 Ed Schonberg <schonberg@adacore.com> 134 135 * sem_res.adb (Valid_Conversion): A type conversion is valid when 136 the target type is an anonymous access type and the operand is a 137 rewriting of an allocator. The conversion is typically inserted 138 when the designated type is an interface. 139 1402011-12-21 Ed Schonberg <schonberg@adacore.com> 141 142 * exp_ch9.adb (Establish_Task_Master): If the enclosing block 143 has no declarations, create new declarative list for it. 144 1452011-12-21 Matthew Heaney <heaney@adacore.com> 146 147 * a-rbtgbk.adb (Generic_Conditional_Insert): Fixed incorrect comment. 148 1492011-12-21 Yannick Moy <moy@adacore.com> 150 151 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not 152 ignore representation attributes in Alfa mode, since formal 153 verification backend does not depend on actual physical 154 representation, but code may still refer to attribute values. 155 1562011-12-21 Yannick Moy <moy@adacore.com> 157 158 * par-ch13.adb (P_Aspect_Specifications): Recognize the cases 159 where a comma between two aspects is missing, or erroneously 160 replaced by a semicolon, issue an error and proceed with next 161 aspect. 162 * par.adb, sinfo.ads: Fix typos. 163 1642011-12-21 Ed Schonberg <schonberg@adacore.com> 165 166 * sem_util.adb (Mark_Coextensions): A coextension for an 167 object that is part of the expression in a return statement, 168 or part of the return object in an extended return statement, 169 must be allocated dynamically. 170 1712011-12-21 Matthew Heaney <heaney@adacore.com> 172 173 * a-crbtgk.adb (Generic_Conditional_Insert): Fixed incorrect comment. 174 1752011-12-21 Ed Schonberg <schonberg@adacore.com> 176 177 * sem_ch5.adb (Analyze_Iterator_Specification): If the name 178 of an element iterator is not an entity name we introduce a 179 local renaming declaration for it. To prevent spurious warnings 180 on parameterless function calls that return a container, when 181 expansion is disabled (either explicitly or because of a previous 182 errors) the name must be marked as not coming from source. 183 1842011-12-21 Arnaud Charlet <charlet@adacore.com> 185 186 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Separate 187 handling in CodePeer mode and only ignore Component_Size 188 attribute. 189 1902011-12-21 Robert Dewar <dewar@adacore.com> 191 192 * sem_ch6.adb (Process_Formals): Set proper mechanism for 193 formals whose types have conventions Ada_Pass_By_Copy or 194 Ada_Pass_By_Reference. 195 1962011-12-21 Arnaud Charlet <charlet@adacore.com> 197 198 * gnat1drv.adb (Gnat1Drv): Always delete old scil files in 199 CodePeer mode. 200 2012011-12-21 Robert Dewar <dewar@adacore.com> 202 203 * comperr.adb: Minor reformatting. 204 2052011-12-21 Ed Schonberg <schonberg@adacore.com> 206 207 * aspects.ads: New table Base_Aspect, to indicate that an aspect 208 is defined on a base type. 209 * aspects.adb (Find_Aspect): If the aspect is a Base_Aspect, 210 examine the representation items of the base type. 211 2122011-12-21 Pascal Obry <obry@adacore.com> 213 214 * gnat_ugn.texi, prj.ads, prj-nmsc.adb, prj-attr.adb, projects.texi, 215 snames.ads-tmpl: Use Encapsulated instead of Fully Standalone library. 216 2172011-12-21 Pascal Obry <obry@adacore.com> 218 219 * adaint.c (__gnat_is_executable_file_attr) [_WIN32]: Add parentheses 220 to kill warning. 221 2222011-12-21 Arnaud Charlet <charlet@adacore.com> 223 224 * comperr.adb (Delete_SCIL_Files): Also delete .scilx files. 225 Fix implementation for child packages and package specs. 226 (Delete_SCIL_Files.Decode_Name_Buffer): New function. 227 2282011-12-21 Robert Dewar <dewar@adacore.com> 229 230 * err_vars.ads, a-cdlili.adb, a-cfdlli.ads, prj.adb, prj-nmsc.adb, 231 a-cbdlli.adb, a-cbdlli.ads, a-cfdlli.adb: Minor reformatting. 232 2332011-12-21 Vincent Pucci <pucci@adacore.com> 234 235 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads, 236 s-llflex.ads: Fix header. 237 2382011-12-21 Thomas Quinot <quinot@adacore.com> 239 240 * thread.c, s-oscons-tmplt.c, init.c (pthread_condattr_setclock): For 241 AIX 5.2, define as a dummy weak symbol in init.c. 242 (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC on all versions of AIX. 243 2442011-12-21 Thomas Quinot <quinot@adacore.com> 245 246 * snames.ads-tmpl, sem_ch8.adb: Minor reformatting. 247 * sem_prag.adb: Minor comment clarification. 248 2492011-12-21 Vincent Celier <celier@adacore.com> 250 251 * prj-nmsc.adb (Report_No_Sources): New argument Lang for the 252 language name as a Name_Id. Do not report no sources if language 253 is not allowed. 254 (Add_Source): Do not add source if language is not allowed. 255 * prj.adb (Add_Restricted_Language): New procedure 256 (Is_Allowed_Language): New function 257 * prj.ads (Add_Restricted_Language): New procedure 258 (Is_Allowed_Language): New function 259 2602011-12-21 Robert Dewar <dewar@adacore.com> 261 262 * exp_ch5.adb, sem_dim.adb, sem_dim.ads, sem_ch12.adb, prj-conf.adb: 263 Minor reformatting. 264 2652011-12-21 Claire Dross <dross@adacore.com> 266 267 * a-cfdlli.ads (Constant_Indexing, Default_Iterator, 268 Iterator_Element): Added to type List. 269 (Not_No_Element, List_Iterator_Interfaces, Iterate, 270 Constant_Reference_Type, Constant_Reference): New. 271 * a-cfdlli.adb (type Iterator, Finalize, First, Last, Next, 272 Previous, Iterate, Not_No_Element, Constant_Reference): New. 273 2742011-12-21 Gary Dismukes <dismukes@adacore.com> 275 276 * gnat_ugn.texi: Minor reformatting. 277 2782011-12-21 Ed Schonberg <schonberg@adacore.com> 279 280 * exp_ch5.adb (Expand_Iterator_Loop): The cursor operation 281 Has_Element is the formal of Iterator_Interfaces, and within 282 the instantion of this package it is a renaming of some local 283 function with an unrelated name. Retrieve the operation from 284 the instance itself, not from the container package. 285 2862011-12-21 Vincent Pucci <pucci@adacore.com> 287 288 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String 289 replaced by Expand_Put_Call_With_Dimension_Symbol 290 * sem_ch12.adb (Analyze_Package_Instantiation): New check for 291 System.Dim_Float_IO and System.Dim_Integer_IO instantiation. 292 * sem_ch3.adb (Analyze_Declarations): Removed 293 Remove_Dimension_In_Declaration call. 294 * sem_dim.adb: Update comments. Redefine the 295 representation of a Rational. Propagate all changes involving 296 data structures and types throughout the pakage. Output the 297 dimension aggregates for each error messages. 298 ("/"): Rational constructor "/" removed for Whole operands. 299 ("/"): New rational operation "/" for Rational operands. 300 ("*"): Operation "*" between Rational and Int removed. 301 ("abs"): New unary operator "abs" for Rational. 302 (Analyze_Aspect_Dimension_System): Reorganized. 303 (Analyze_Dimension_Identifier): Removed. 304 (Copy_Dimensions): Removed. 305 (Create_Rational_From_Expr): New Boolean parameter. 306 (Dimensions_Msg_Of): New routine. Return 307 a string with the dimensions of the parameter. 308 (From_Dimension_To_String_Of_Symbols): Renaming of 309 From_Dimension_To_String_Id. 310 * sem_dim.ads: Update comments. 311 (Is_Dim_IO_Package_Instantiation): New routine. 312 (Remove_Dimension_In_Declaration): Removed. 313 * sem_res.adb (Resolve_Op_Expon): Reorganized calls of 314 Eval_Op_Expon_For_Dimensioned_Type and Eval_Op_Expon. 315 * s-diflio.ads, s-diinio.ads: Update comments. 316 3172011-12-21 Pascal Obry <obry@adacore.com> 318 319 * prj-attr.adb, snames.ads-tmpl: Add Library_Standalone, 320 Library_Fully_Standalone_Options and 321 Library_Fully_Standalone_Supported attributes. 322 * prj-nmsc.adb (Check_Library): Update check to take into 323 account fully standalone libraries. Such shared libraries can 324 only depend on static libraries. 325 (Check_Stand_Alone_Library): Add support for fully standalone libraries. 326 (Process_Project_Level_Simple_Attributes): Store value for 327 configuration attribute Library_Fully_Standalone_Supported. 328 * prj.ads, makeutl.adb (Standalone): New enumeration type. 329 (Project_Data): Standalone_Library now of type Standlone. 330 (Project_Configuration): Add Lib_Fully_Standalone_Supported 331 field. 332 (Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported 333 field. 334 * clean.adb (Clean_Project): Adjust to new type for Standalone. 335 * make.adb (Library_Phase): Adjust to new type for Standalone. 336 (Gnatmake): Likewise. 337 * mlib-prj.adb (Build_Library): Adjust to new type for 338 Standalone. 339 3402011-12-21 Thomas Quinot <quinot@adacore.com> 341 342 * gnatls.adb (Gnatls): Call Set_Standard_Error at startup, and then 343 Set_Standard_Output just before producing normal (non-diagnostic) 344 output. 345 * gnatcmd.adb (Gnatcmd): Call Set_Standard_Error at initialization 346 (and again after parsing project files). 347 3482011-12-21 Vincent Celier <celier@adacore.com> 349 350 * prj-conf.adb (Do_Autoconf): When the object directory does 351 not exist, create auto.cgpr in the directory where temporary 352 files are created. 353 3542011-12-20 Ed Schonberg <schonberg@adacore.com> 355 356 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Further 357 refinements on the placement of a freeze node for a package 358 instantiation, when the generic appears within a previous 359 instantiation in the same unit.If the current instance is within 360 the one that contains the generic, the freeze node for the 361 current one must appear in the current declarative part. Ditto 362 if the current instance is within another package instance. In 363 these cases the freeze node of the previous instance is is not 364 relevant. New predicate Enclosing_Body simplifies the process. 365 (Freeze_Subprogram_Body): Rename Enclosing_Body to 366 Enclosing_Package_Body, to prevent confusion with subprogram of 367 same name elsewhere. 368 (Install_Body): Recognize enclosing subprogram bodies to determine 369 whether freeze_node belongs in current declarative list. 370 3712011-12-20 Robert Dewar <dewar@adacore.com> 372 373 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Allow 374 attribute definition clause for renaming if generated internally 375 and generate duplicate clause to apply to renamed object. 376 (Rep_Item_Too_Late): Only diagnose source level entities 377 * prj-nmsc.adb: Minor reformatting. 378 * gcc-interface/Make-lang.in: Update dependencies. 379 3802011-12-20 Bob Duff <duff@adacore.com> 381 382 * opt.ads (List_Inherited_Aspects): Default to False 383 (i.e. -gnatw.L is the default). 384 * usage.adb: Document new default for -gnatw.L. 385 * gnat_ugn.texi: Document -gnatw.l and -gnatw.L switches. 386 * warnsw.adb (Set_Warning_Switch): Do not include 387 List_Inherited_Aspects in -gnatwa. 388 3892011-12-20 Ed Schonberg <schonberg@adacore.com> 390 391 * checks.adb (Apply_Type_Conversion_Checks): For a discrete type 392 with predicates, indicate unconditionally that a range check 393 is needed. 394 * exp_ch4.adb (Expand_N_In): When the membership test is rewritten 395 to incorporate a call to a predicate function, analyze expression 396 with checks suppressed, to prevent infinite recursion. 397 3982011-12-20 Hristian Kirtchev <kirtchev@adacore.com> 399 400 * exp_ch11.adb (Find_Local_Handler): Guard the 401 search over individual exception choices in case the list of 402 handlers contains other (possibly illegal) constructs. 403 4042011-12-20 Gary Dismukes <dismukes@adacore.com> 405 406 * sem_ch8.adb (Find_Type): Test taggedness 407 of the Available_Type when checking for an illegal use of an 408 incomplete type, when the incomplete view is a limited view of 409 a type. Remove redundant Is_Tagged test. 410 4112011-12-20 Hristian Kirtchev <kirtchev@adacore.com> 412 413 * exp_util.adb: Add with and use clause for Aspects. 414 (Is_Finalizable_Transient): Objects which denote Ada containers 415 in the context of iterators are not considered transients. Such 416 object must live for as long as the loop is around. 417 (Is_Iterated_Container): New routine. 418 4192011-12-20 Hristian Kirtchev <kirtchev@adacore.com> 420 421 * exp_imgv.adb (Expand_Width_Attribute): Add a 422 type conversion from the enumeration subtype to its base subtype. 423 4242011-12-20 Hristian Kirtchev <kirtchev@adacore.com> 425 426 * sem_ch4.adb (Operator_Check): Update the call to 427 Is_Dimensioned_Type. 428 * sem_dim.adb: Remove with and use clause for Namet.Sp. Reorganize 429 all type declarations and datastructures involved. Propagate 430 all changes involving data structures and types throughout 431 the pakage. Alphabetize all subprograms. Add ??? comments. 432 (AD_Hash): Removed. 433 (Analyze_Aspect_Dimension): Rewritten. This 434 routine now does all its checks in one pass rather than 435 two. Refactor code. The error message are now in a more GNAT-ish style. 436 (Create_Rational_From_Expr): This is now a function. 437 (Get_Dimensions): Removed. 438 (Get_Dimensions_String_Id): Removed. 439 (Dimensions_Of): New rouitne. 440 (Exists): New routines. 441 (Is_Invalid): New routine. 442 (Permits_Dimensions): Removed. 443 (Present): Removed. 444 (Set_Symbol): New routine. 445 (System_Of): New routine. 446 * sem_dim.ads: Rewrite the top level description of the 447 package. Alphabetize subprograms. Add various comments on 448 subprogram usage. Add ??? comments. 449 (Is_Dimensioned_Type): 450 Renamed to Has_Dimension_System. 451 * sem_res.adb (Resolve_Op_Expon): Update the call to Is_Dimensioned_Type 452 4532011-12-20 Ed Schonberg <schonberg@adacore.com> 454 455 * sem_ch13.adb (Check_Indexing_Functions): The return type of an 456 indexing function can be the default element type, and does not 457 need to be a reference type. 458 * sem_ch4.adb (Try_Container_Indexing): Ditto. 459 4602011-12-20 Robert Dewar <dewar@adacore.com> 461 462 * a-cdlili.ads, sem_cat.adb, sem_ch10.adb: Minor reformatting. 463 4642011-12-20 Bob Duff <duff@adacore.com> 465 466 * s-taprop-mingw.adb (Yield): Do_Yield is no longer Unreferenced. 467 4682011-12-20 Vincent Pucci <pucci@adacore.com> 469 470 * impunit.adb: s-dimkio, s-dimmks and s-dmotpr defined as GNAT 471 Defined Additions to System. 472 * Makefile.rtl: s-dimkio, s-dimmks and s-dmotpr added. 473 * s-dimkio.ads, s-dimmks.ads, s-dmotpr.ads: New files. 474 4752011-12-20 Gary Dismukes <dismukes@adacore.com> 476 477 * sem_ch4.adb (Traverse_Homonyms): Allow a homonym to match when 478 within an instance, even if the homonym is marked Is_Hidden at 479 this point. 480 4812011-12-20 Robert Dewar <dewar@adacore.com> 482 483 * sem_ch3.adb, sem_ch5.adb, s-diinio.adb, s-diinio.ads, sem_dim.adb, 484 sem_dim.ads, sem_res.adb, s-stposu.adb, s-stposu.ads, sem_ch4.adb, 485 s-diflio.adb, s-diflio.ads, exp_disp.adb, s-llflex.ads: Minor 486 reformatting. 487 * aspects.ads: Dimension[_Aspects] are GNAT defined. 488 4892011-12-20 Robert Dewar <dewar@adacore.com> 490 491 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check 492 renaming case. 493 4942011-12-20 Thomas Quinot <quinot@adacore.com> 495 496 * sem_cat.adb, sem_ch10.adb (Analyze_With_Clause): For a WITH clause on 497 a child unit that is an illegal instantiation, mark the WITH clause in 498 error. 499 (Install_Siblings, Validate_Categorization_Dependency): Guard 500 against WITH clause marked as in error. 501 5022011-12-20 Hristian Kirtchev <kirtchev@adacore.com> 503 504 * sem_res.adb (Resolve_Allocator): Warning on allocation 505 of tasks on a subpool and rewrite the allocator into a raise 506 Program_Error statement. 507 * s-stposu.ads, s-stposu.adb: Code reformatting. 508 (Create_Subpool): Remove formal parameter Storage_Size. 509 (Default_Subpool_For_Pool): Add the default implementation of this 510 routine. 511 (Set_Pool_Of_Subpool): Rename formal parameter Pool to To. Update 512 all the uses of the parameter. 513 5142011-12-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 515 516 * gcc-interface/Makefile.in (%86 linux%): 517 (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS. 518 (LIBGNAT_TARGET_PAIRS_64): New. 519 (LIBGNAT_TARGET_PAIRS): Add either depending on multilib. 520 5212011-12-18 Eric Botcazou <ebotcazou@adacore.com> 522 523 * gcc-interface/decl.c (gnat_to_gnu_param): Add comment about double 524 reference and DECL_POINTS_TO_READONLY_P. 525 * gcc-interface/trans.c (Identifier_to_gnu) <by_ref>: Always set the 526 TREE_READONLY flag on the first dereference of a double dereference. 527 5282011-12-15 Arnaud Charlet <charlet@adacore.com> 529 530 * a-numaux-vms.ads, s-asthan-vms-ia64.adb, s-auxdec-vms-ia64.adb, 531 s-memory-vms_64.adb, s-memory-vms_64.ads, s-osinte-vms-ia64.adb, 532 s-osinte-vms-ia64.ads, s-tasdeb-vms.adb: New files. 533 5342011-12-15 Vincent Pucci <pucci@adacore.com> 535 536 * aspects.adb, aspects.ads Aspect_Dimension and 537 Aspect_Dimension_System added 538 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String 539 case added 540 * gcc-interface/Make-lang.in: s-llflex, sem_dim added. 541 * impunit.adb :s-diflio and s-diinio defined as GNAT Defined 542 Additions to System. 543 * Makefile.rtl: s-diflio, s-diinio and s-llflex added 544 * par-prag.adb, sem_prag.adb: Pragma_Dimension removed 545 * rtsfind.ads: Expon_LLF added 546 * sem_aggr.adb (Resolve_Aggregate): handles aggregate for 547 Aspect_Dimension case 548 * sem_attr.adb (Resolve_Attribute): analyze dimension for 549 attribute 550 * sem_ch10.adb (Analyze_With_Clause): Avoid the warning messages 551 due to the use of a GNAT library for Dimension packages 552 * sem_ch13.adb (Analyze_Aspect_Specifications): 553 Aspect_Dimension and Aspect_Dimension_System cases added 554 (Check_Aspect_At_Freeze_Point): Aspect_Dimension and 555 Aspect_Dimension_System cases added 556 * sem_ch2.adb (Analyze_Identifier): analyze dimension for 557 identifier 558 * sem_ch3.adb (Analyze_Component_Declaration): analyze dimension 559 for component declaration (Analyze_Object_Declaration): analyze 560 dimension for object declaration (Analyze_Subtype_Declaration): 561 analyze dimension for subtype declaration 562 * sem_ch4.adb (Operator_Check): checks exponent is a rational 563 for dimensioned operand for a N_Op_Expon 564 * sem_ch5.adb (Analyze_Assignment): analyze dimension for 565 assignment (Analyze_Statements): removal of dimensions in all 566 statements 567 * sem_ch6.adb (Analyze_Return_Statement): analyze dimension for 568 return statement 569 * sem_ch8.adb (Analyze_Object_Renaming): analyze dimension for 570 object renaming 571 * sem_dim.adb, sem_dim.ads (Analyze_Aspect_Dimension): 572 analyze the expression for aspect dimension and store the 573 values in a Htable. 574 (Analyze_Aspect_Dimension_System): analyze 575 the expression for aspect dimension system and store the new 576 system in a Table. 577 (Analyze_Dimension): propagates dimension 578 (Expand_Put_Call_With_Dimension_String): add the dimension 579 string as a suffix of the numeric value in the output 580 (Has_Dimension): return True if the node has a dimension 581 (Remove_Dimension_In_Declaration): removal of dimension in the 582 expression of the declaration. 583 (Remove_Dimension_In_Statement): removal of dimension in statement 584 * sem_res.adb (Resolve): analyze dimension if the node 585 has already been analyzed. 586 (Resolve_Arithmetic_Op): analyze 587 dimension for arithmetic op. 588 (Resolve_Call): analyze dimension for function call. 589 (Resolve_Comparison_Op): analyze dimension for comparison op. 590 (Resolve_Equality_Op): analyze dimension for equality op. 591 (Resolve_Indexed_Component): analyze dimension for indexed component. 592 (Resolve_Op_Expon): analyze dimension for op expon. 593 (Resolve_Selected_Component): analyze dimension 594 for selected component. 595 (Resolve_Slice): analyze dimension for slice. 596 (Resolve_Unary_Op): analyze dimension for unary op 597 (Resolve_Type_Conversion): analyze dimension for type conversion 598 (Resolve_Unchecked_Type_Conversion): analyze dimension for 599 unchecked type conversion 600 * snames.ads-tmpl Name_Dimension, Name_Dimension_System, 601 Name_Dim_Float_IO, Name_Dim_Integer_IO, 602 Name_Generic_Elementary_Functions, Name_Sqrt added. 603 Pragma_Dimension removed 604 * s-diflio.adb, s-diflio.ads New GNAT library generic package 605 for dimensioned float type IO 606 * s-diinio.adb, s-diinio.ads New GNAT library generic package 607 for dimensioned integer type IO 608 * s-llflex.ads (Expon_LLF): exponentiation routine for long long 609 floats operand and exponent 610 6112011-12-15 Robert Dewar <dewar@adacore.com> 612 613 * sem_aggr.adb: Minor comment addition. 614 6152011-12-15 Bob Duff <duff@adacore.com> 616 617 * s-tasren.adb (Task_Count): Do not call Yield; E'Count is not a 618 task dispatching point. 619 * s-taprop-mingw.adb (Yield): Do not yield if Do_Yield is False. 620 6212011-12-15 Robert Dewar <dewar@adacore.com> 622 623 * sigtramp-ppcvxw.c, sigtramp.h: Fix header. 624 6252011-12-15 Javier Miranda <miranda@adacore.com> 626 627 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment 628 applied to a class-wide type under VM targets generate code which 629 invokes the function Get_Alignment to retrieve the value of the 630 alignment from the TSD. 631 * rtsfind.ads (RE_Get_Alignment): New entity. 632 6332011-12-15 Robert Dewar <dewar@adacore.com> 634 635 * g-comlin.adb: Fix header. 636 6372011-12-15 Tristan Gingold <gingold@adacore.com> 638 639 * gnatls.adb: Fix typo. 640 6412011-12-15 Ed Falis <falis@adacore.com> 642 643 * s-tpopsp-vxworks.adb: Update comment. 644 6452011-12-15 Ed Schonberg <schonberg@adacore.com> 646 647 * sem_aggr.adb (Resolve_Array_Aggregate, Resolve_Aggr_Expr); If 648 the component type has predicates, generate corresponding check. 649 (Resolve_Record_Aggregate, Resolve_Aggr_Expr): Ditto. 650 6512011-12-13 Cesar Strauss <cestrauss@gmail.com> 652 Eric Botcazou <ebotcazou@adacore.com> 653 654 PR ada/49084 655 * types.h (Byte): Change typedef to 'unsigned char'. 656 * atree.h (struct Flag_Word): Use Byte for 'convention' field. 657 6582011-12-12 Robert Dewar <dewar@adacore.com> 659 660 * s-taprop-mingw.adb: Minor reformatting. 661 6622011-12-12 Nicolas Roche <roche@adacore.com> 663 664 * gcc-interface/Make-lang.in: Update dependencies. 665 Add gnattools4 target when building tools in canadian mode 666 6672011-12-12 Javier Miranda <miranda@adacore.com> 668 669 * exp_disp.adb (Make_VM_TSD): Complete previous patch. 670 6712011-12-12 Bob Duff <duff@adacore.com> 672 673 * s-tpobop.adb: Use named notation. 674 * g-bytswa.ads, s-taprop.ads: Minor comment fix. 675 6762011-12-12 Arnaud Charlet <charlet@adacore.com> 677 678 * make.adb: Minor comment update. 679 6802011-12-12 Robert Dewar <dewar@adacore.com> 681 682 * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor 683 reformatting. 684 6852011-12-12 Robert Dewar <dewar@adacore.com> 686 687 * sem_ch6.adb, gnatls.adb: Minor reformatting. 688 6892011-12-12 Ed Schonberg <schonberg@adacore.com> 690 691 * freeze.adb (Freeze_Entity): If a type declared in a generic 692 context has predicates, generate a freeze node for it. 693 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression 694 has not been analyzed yet, entity has not been frozen, so analyze 695 it now. 696 6972011-12-12 Javier Miranda <miranda@adacore.com> 698 699 * exp_disp.adb (Make_VM_TSD): Generate code to store the value of 700 'alignment in the TSD. 701 7022011-12-12 Bob Duff <duff@adacore.com> 703 704 * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D 705 mode. 706 7072011-12-12 Hristian Kirtchev <kirtchev@adacore.com> 708 709 * exp_ch4.adb (Expand_N_Allocator): Update the master of an 710 anonymous access-to-controlled type to utilize the heterogeneous 711 master associated with the current unit. 712 7132011-12-12 Ed Schonberg <schonberg@adacore.com> 714 715 * sem_ch6.adb (Analyze_Expression_Function): If the function 716 is not a completion, pre-analyze the expression now to prevent 717 spurious visibility on later entities. The body is inserted at 718 the end of the current declaration list or package to prevent 719 early freezing, but the visibility is established at the point 720 of definition. 721 7222011-12-12 Bob Duff <duff@adacore.com> 723 724 * sem.adb, sem.ads: Add debugging routines. 725 7262011-12-12 Tristan Gingold <gingold@adacore.com> 727 728 * gnatls.adb: (gnatls): Also add the objects dir in search list. 729 7302011-12-12 Robert Dewar <dewar@adacore.com> 731 732 * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb, 733 sem_ch13.adb: Minor reformatting. 734 7352011-12-12 Gary Dismukes <dismukes@adacore.com> 736 737 * sem_ch7.adb (Uninstall_Declarations): Don't 738 apply check for incomplete types used as a result type for an 739 access-to-function type when compiling for Ada 2012 or later. 740 * sem_ch6.adb (Analyze_Subprogram_Declaration): 741 Specialize error message for interface subprograms that are 742 not declared abstract nor null (functions can't be declared as 743 null). Also, remove "(Ada 2005)" from message. 744 7452011-12-12 Robert Dewar <dewar@adacore.com> 746 747 * sem_prag.adb (GNAT_Pragma): Check comes from source. 748 7492011-12-12 Robert Dewar <dewar@adacore.com> 750 751 * gnatls.adb: Minor reformatting. 752 7532011-12-12 Javier Miranda <miranda@adacore.com> 754 755 * a-tags.ads (Alignment): New TSD field. 756 (Max_Predef_Prims): Value lowered to 15 (or 9 in case of 757 configurable runtime) Update documentation of predefined 758 primitives since Alignment has been removed. 759 * exp_disp.ads Update documentation of slots of dispatching 760 primitives. 761 * exp_disp.adb (Default_Prim_Op_Position): Update slot 762 values since alignment is no longer a predefined primitive. 763 (Is_Predefined_Dispatch_Operation): Remove _alignment. 764 (Is_Predefined_Internal_Operation): Remove _alignment. 765 (Make_DT): Update static test on the value stored in a-tags.ads 766 for Max_Predef_Prims; store the value of 'alignment in the TSD. 767 * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram 768 that retrieves the alignment from the TSD 769 * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation 770 of class-wide types obtain the value of alignment from the TSD. 771 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment 772 applied to a class-wide type invoke Build_Get_Alignment to 773 generate code which retrieves the value of the alignment from 774 the TSD. 775 * rtsfind.ads (RE_Alignment): New Ada.Tags entity 776 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged 777 types if the value of the alignment is bigger than the Maximum 778 alignment then set the value of the alignment to the Maximum 779 alignment and report a warning. 780 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate 781 spec of _alignment. 782 (Predefined_Primitive_Bodies): Do not generate body of _alignment. 783 7842011-12-12 Gary Dismukes <dismukes@adacore.com> 785 786 * freeze.adb (Freeze_Expression): Allow freezing of static 787 scalar subtypes that are prefixes of an attribute, even if not 788 yet marked static. Such attributes will get marked as static 789 later in Eval_Attribute (as called from Resolve_Attribute). 790 * sem_attr.adb (Eval_Attribute): Remove wrong code that does an 791 early return for attribute prefixes that are unfrozen source-level 792 types. This code was incorrectly bypassing folding of unfrozen 793 static subtype attributes in default expressions (the executable 794 example in the now-deleted comment was in fact illegal). 795 7962011-12-12 Robert Dewar <dewar@adacore.com> 797 798 * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb, 799 gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting. 800 8012011-12-12 Tristan Gingold <gingold@adacore.com> 802 803 * gsocket.h: Adjust previous patch. 804 8052011-12-12 Thomas Quinot <quinot@adacore.com> 806 807 * exp_disp.adb: Minor reformatting. 808 8092011-12-12 Tristan Gingold <gingold@adacore.com> 810 811 * gnatls.adb (Search_RTS): New procedure. 812 (Scan_Ls_Arg): Move code that search the RTS. 813 (Gnatls): search the RTS later. 814 * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function. 815 8162011-12-12 Ed Falis <falis@adacore.com> 817 818 * sysdep.c: Fix treatment of VxWorks task options so that run-times 819 built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK. 820 8212011-12-12 Bob Duff <duff@adacore.com> 822 823 * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads: 824 Minor cleanup and fiddling with debug printouts. 825 8262011-12-12 Vincent Celier <celier@adacore.com> 827 828 * prj-nmsc.adb (Get_Directories): For a non extending project, 829 always get a declared object and/or exec directory if it already 830 exists, even when there are no sources, but do not create them. 831 8322011-12-12 Bob Duff <duff@adacore.com> 833 834 * sem_res.adb (Resolve): Deal with the case where an abstract 835 operator is called with operands of type universal_integer. 836 8372011-12-12 Thomas Quinot <quinot@adacore.com> 838 839 * par_sco.adb: Minor fix to dominance marker referencing WHILE 840 decision. 841 8422011-12-12 Tristan Gingold <gingold@adacore.com> 843 844 * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code. 845 8462011-12-12 Thomas Quinot <quinot@adacore.com> 847 848 * par_sco.adb: Adjust dominant marker for branches of CASE 849 statements. 850 8512011-12-12 Thomas Quinot <quinot@adacore.com> 852 853 * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system 854 header file prior to redefining FD_SETSIZE. 855 8562011-12-12 Ed Schonberg <schonberg@adacore.com> 857 858 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In 859 a generic context the aspect expressions may not have been 860 preanalyzed if there was no previous freeze point, so the 861 expressions must be preanalyzed now, and there is no conformance 862 to check for visibility changes. 863 8642011-12-12 Matthew Heaney <heaney@adacore.com> 865 866 * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use 867 subtype Index_Type'Base for Index component (Finalize): Remove 868 unnecessary access check (First, Last): Cursor return value 869 depends on iterator index value (Iterate): Use start position as 870 iterator index value (Next, Previous): Forward to corresponding 871 cursor-based operation. 872 * a-cborma.adb (Iterate): Properly initialize iterator object (with 0 873 as node index). 874 8752011-12-12 Robert Dewar <dewar@adacore.com> 876 877 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting. 878 8792011-12-12 Steve Baird <baird@adacore.com> 880 881 * sem_ch3.adb (Check_Completion): Improve a comment. 882 8832011-12-12 Tristan Gingold <gingold@adacore.com> 884 885 * cstand.adb: Minor comment fix. 886 8872011-12-11 Eric Botcazou <ebotcazou@adacore.com> 888 889 * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC 890 flag of elements to compute that of the constructor. 891 8922011-12-11 Eric Botcazou <ebotcazou@adacore.com> 893 894 * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier 895 on references built for parameters which aren't specifically by-ref. 896 8972011-12-11 Eric Botcazou <ebotcazou@adacore.com> 898 899 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an 900 alignment set on a renaming, assert that the renamed object is aligned 901 enough as to make it possible to honor it. 902 9032011-12-11 Eric Botcazou <ebotcazou@adacore.com> 904 905 * gcc-interface/trans.c (gigi): Initialize the linemap earlier. 906 9072011-12-06 Dave Korn <dave.korn.cygwin@gmail.com> 908 909 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]): 910 Correctly detect cygwin, which no longer has the '32' suffix, and use 911 appropriate implementations of the sockets and memory packages. 912 * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of 913 setmode/_setmode for MinGW and Cygwin, respectively. 914 (__gnat_set_binary_mode [windows targets]): Use the above, and enable 915 the windows version for Cygwin as well as MinGW. 916 (__gnat_set_text_mode [windows targets]): Likewise. 917 (__gnat_ttyname [windows targets]): Provide a Cygwin implementation 918 in addition to the MinGW version. 919 (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW. 920 (__gnat_get_stack_bounds): Likewise. 921 9222011-12-05 Bob Duff <duff@adacore.com> 923 924 * sem_ch4.adb: Minor comment fix. 925 9262011-12-05 Robert Dewar <dewar@adacore.com> 927 928 * gnat_ugn.texi: Add documentation for -gnatw.e. 929 9302011-12-05 Bob Duff <duff@adacore.com> 931 932 * treepr.adb (pn): Print something useful for 933 Elmt_Ids. Add Write_Eol to 'when others' case, so the output 934 will be seen immediately in gdb. 935 9362011-12-05 Ed Schonberg <schonberg@adacore.com> 937 938 * lib-writ.adb (Output_Main_Program_Line): A generic subprogram 939 is never a main program. 940 9412011-12-05 Thomas Quinot <quinot@adacore.com> 942 943 * par_sco.adb: Various minor adjustments to dominance markers 944 generation. 945 9462011-12-05 Ed Schonberg <schonberg@adacore.com> 947 948 * sem_ch6.adb (Analyze_Expression_Function): If the function is 949 a completion, generate a body reference for its defining entity, 950 before rewriting the node as a body. 951 * sem_util.adb (Defining_Entity): Add entry for expression 952 function. 953 9542011-12-05 Bob Duff <duff@adacore.com> 955 956 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias 957 to the Comes_From_Source check, to deal properly with the case 958 of indirect inheritance of "=". 959 9602011-12-05 Thomas Quinot <quinot@adacore.com> 961 962 PR ada/51307 963 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal, 964 not a macro. 965 9662011-12-05 Thomas Quinot <quinot@adacore.com> 967 968 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance 969 information in SCOs. 970 9712011-12-02 Eric Botcazou <ebotcazou@adacore.com> 972 Thomas Quinot <quinot@adacore.com> 973 974 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config. 975 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks. 976 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts, 977 which allows the file to be installed in adainclude. 978 * gcc-interface/Make-lang.in: Update dependencies. 979 9802011-12-02 Javier Miranda <miranda@adacore.com> 981 982 * sem_ch3.adb (Constrain_Access): Undo previous 983 patch for this routine. Required since the RM rule 3.7.1(7/3) 984 applies to all access types. 985 9862011-12-02 Bob Duff <duff@adacore.com> 987 988 * sem_ch6.adb: Minor comment fix. 989 9902011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com> 991 992 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable 993 for consistency with other ports. 994 * s-osinte-rtems.adb: Add body for dummy implementation of 995 pthread_rwlockattr_setkind_np(). 996 * s-osinte-rtems.ads: Add missing clock and rwlock bindings. 997 * terminals.c: Add __rtems__ conditionals to account for differences 998 in termios implementation. 999 10002011-12-02 Robert Dewar <dewar@adacore.com> 1001 1002 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb, 1003 a-cbmutr.ads: Minor reformatting. 1004 10052011-12-02 Hristian Kirtchev <kirtchev@adacore.com> 1006 1007 * exp_dbug.adb: Comment reformatting. 1008 (Get_External_Name): Use Reset_Buffers to reset the contents of 1009 Name_Buffer and Homonym_Numbers. 1010 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and 1011 Homonym_Numbers before creating a new qualified name for a particular 1012 entity. 1013 (Reset_Buffers): New routine. 1014 10152011-12-02 Matthew Heaney <heaney@adacore.com> 1016 1017 * a-cbmutr.ads (No_Node): Moved declaration from body to spec 1018 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives 1019 from Root_Iterator. 1020 (Child_Iterator): Derives from Root_Iterator. 1021 (Finalize): Implemented as an override operation for Root_Iterator. 1022 (First): Return value depends on Subtree component. 1023 (Last): Component was renamed from Parent to Subtree. 1024 (Next): Checks parameter value, and uses simplified loop. 1025 (Iterate): Forwards to Iterate_Subtree. 1026 (Iterate_Children): Component was renamed from Parent to Subtree. 1027 (Iterate_Subtree): Checks parameter value 1028 10292011-12-02 Robert Dewar <dewar@adacore.com> 1030 1031 * usage.adb: Add lines for -gnatw.n and -gnatw.N 1032 (atomic sync info msgs). 1033 10342011-12-02 Steve Baird <baird@adacore.com> 1035 1036 * sem_ch3.adb (Check_Completion): An Ada 2012 1037 generic formal type doesn't require a completion. 1038 10392011-12-02 Eric Botcazou <ebotcazou@adacore.com> 1040 1041 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the 1042 packed array type if it is to be set on the array type used to 1043 represent it. 1044 10452011-12-02 Robert Dewar <dewar@adacore.com> 1046 1047 * gnat_rm.texi: Eliminate confusing use of type name. 1048 10492011-12-02 Thomas Quinot <quinot@adacore.com> 1050 1051 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram 1052 body that acts as spec, do not create a shallow copy of the context 1053 clause for the synthetized spec (instead, use the same list as 1054 in the body). 1055 10562011-12-02 Bob Duff <duff@adacore.com> 1057 1058 * gnat_ugn.texi: Clarify usage of -p binder switch. 1059 10602011-12-02 Javier Miranda <miranda@adacore.com> 1061 1062 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb 1063 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux 1064 (In_Generic_Body): Moved to sem_aux. 1065 (Unit_Declaration_Node): Moved to sem_aux. 1066 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete 1067 documentation. 1068 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb, 1069 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb, 1070 exp_ch13.adb: Add with-clause on Sem_Aux. 1071 10722011-12-02 Yannick Moy <moy@adacore.com> 1073 1074 * sem_util.adb (Unique_Name): Reach through Unique_Entity to 1075 get the name of the entity. 1076 (Unique_Entity): Correct case for subprogram stubs. 1077 10782011-12-02 Yannick Moy <moy@adacore.com> 1079 1080 * sem_ch3.adb (Check_Initialization): Do not emit warning on 1081 initialization of limited type object in Alfa mode. 1082 10832011-12-02 Robert Dewar <dewar@adacore.com> 1084 1085 * sinfo.ads: Minor reformatting. 1086 * gnat_ugn.texi: Fix confusion in use of term "type name". 1087 10882011-12-02 Robert Dewar <dewar@adacore.com> 1089 1090 * sem_ch6.adb: Minor change in error message. 1091 10922011-12-02 Robert Dewar <dewar@adacore.com> 1093 1094 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor 1095 reformatting. 1096 10972011-12-02 Javier Miranda <miranda@adacore.com> 1098 1099 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the 1100 static check of the rule of general access types whose designated 1101 type has discriminants. 1102 * sem_util.ads, sem_util.adb 1103 (Effectively_Has_Constrained_Partial_View): New subprogram. 1104 (In_Generic_Body): New subprogram. 1105 * einfo.ads (Has_Constrained_Partial_View): Adding documentation. 1106 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new 1107 subprogram In_Generic_Body. 1108 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb, 1109 sem_ch4.adb: In addition, this patch replaces the occurrences of 1110 Has_Constrained_Partial_View by 1111 Effectively_Has_Constrained_Partial_View. 1112 11132011-12-02 Matthew Heaney <heaney@adacore.com> 1114 1115 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename 1116 Position component. 1117 (Finalize): Remove unnecessary access check. 1118 (First): Forward to First_Child. 1119 (Last): Forward to Last_Child. 1120 (Iterate): Check preconditions for parent node parameter. 1121 (Next): Forward to Next_Sibling. 1122 (Previous): Forward to Previous_Sibling. 1123 11242011-12-02 Robert Dewar <dewar@adacore.com> 1125 1126 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb, 1127 a-coormu.adb, a-convec.adb: Minor reformatting. 1128 11292011-12-02 Matthew Heaney <heaney@adacore.com> 1130 1131 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function. 1132 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete 1133 Iterator type. 1134 (Finalize): Decrement busy counter. 1135 (First, Last): Cursor return value depends on iterator node value. 1136 (Iterate): Use start position as iterator node value. 1137 (Next, Previous): Forward to corresponding cursor-based operation. 1138 11392011-12-02 Robert Dewar <dewar@adacore.com> 1140 1141 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb, 1142 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb, 1143 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb, 1144 a-ciorma.adb, a-cobove.adb: Minor reformatting. 1145 11462011-12-01 Jakub Jelinek <jakub@redhat.com> 1147 1148 PR bootstrap/51201 1149 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=. 1150 11512011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 1152 1153 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access. 1154 11552011-11-23 Thomas Quinot <quinot@adacore.com> 1156 1157 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup 1158 only on platforms where this is required, as determined by 1159 s-oscons.h. 1160 11612011-11-23 Ed Schonberg <schonberg@adacore.com> 1162 1163 * sem_ch9.adb: No check on entry index if error on index. 1164 11652011-11-23 Gary Dismukes <dismukes@adacore.com> 1166 1167 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for 1168 return statements nested inside an extended_return_statement. 1169 * gcc-interface/Make-lang.in: Update dependencies. 1170 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets. 1171 11722011-11-23 Ed Schonberg <schonberg@adacore.com> 1173 1174 * freeze.adb (Freeze_All_Ent): An incomplete type is not 1175 frozen by a subprogram body that does not come from source. 1176 11772011-11-23 Pascal Obry <obry@adacore.com> 1178 1179 * s-oscons-tmplt.c: Add PTY_Library constant. It contains 1180 the library for pseudo terminal support. 1181 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options 1182 pragma. 1183 11842011-11-23 Ed Schonberg <schonberg@adacore.com> 1185 1186 * sem_ch9.adb: No check on entry family index if generic. 1187 11882011-11-23 Thomas Quinot <quinot@adacore.com> 1189 1190 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb, 1191 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb, 1192 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on 1193 System.OS_Constants from shared spec of 1194 System.Tasking.Primitive_Operations to the specific body variants 1195 that really require this dependency. 1196 11972011-11-23 Ed Schonberg <schonberg@adacore.com> 1198 1199 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration): 1200 If the declaration has aspects, analyze them so they can be 1201 properly rejected. 1202 12032011-11-23 Hristian Kirtchev <kirtchev@adacore.com> 1204 1205 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb, 1206 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb, 1207 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb, 1208 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb: 1209 Add with and use clause for Ada.Finalization. Type 1210 Iterator and Child_Iterator are now derived from Limited_Controlled. 1211 (Finalize): New routine. 1212 (Iterate): Add a renaming of counter Busy and 1213 increment it. Update the return aggregate. 1214 (Iterate_Children): Add a renaming of 1215 counter Busy and increment it. Update the return aggregate. 1216 (Iterate_Subtree): Add a renaming of counter Busy and increment 1217 it. Update the return aggregate. 1218 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access 1219 type. 1220 * a-cihama.ads: Type Map_Access is now a general access type. 1221 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks 1222 associated with the tree. 1223 * a-cohama.ads: Type Map_Access is now a general access type. 1224 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general 1225 access type. 1226 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block 1227 to wrap the loop as this is done at an earlier step, during 1228 analysis. The declarations of the iterator and the cursor use 1229 the usual Insert_Action mechanism when added into the tree. 1230 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant 1231 Loop_Statement and replace all respective uses by N. Add local 1232 constant Loc. Preanalyze the loop iterator to discover whether 1233 it is a container iterator and if it is, wrap the loop in a 1234 block. This ensures that any controlled temporaries produced 1235 by the iteration scheme share the same lifetime of the loop. 1236 (Is_Container_Iterator): New routine. 1237 (Is_Wrapped_In_Block): New routine. 1238 (Pre_Analyze_Range): Move spec and body to the library level. 1239 12402011-11-23 Sergey Rybin <rybin@adacore.com frybin> 1241 1242 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option 1243 that controls casing of type and subtype names. 1244 12452011-11-23 Yannick Moy <moy@adacore.com> 1246 1247 * sem_ch3.adb: Minor addition of comments. 1248 12492011-11-23 Thomas Quinot <quinot@adacore.com> 1250 1251 * prj-part.adb (Extension_Withs): New global variable, 1252 contains the head of the list of WITH clauses from the EXTENDS 1253 ALL projects for which virtual packages are being created. 1254 (Look_For_Virtual_Projects_For): When recursing through 1255 an EXTENDS ALL, add the WITH clauses of the extending 1256 project to Extension_Withs. When adding a project to the 1257 Virtual_Hash, record the associated Extension_Withs list. 1258 (Create_Virtual_Extending_Project): Add a copy of the appropriate 1259 Extension_Withs to the virtual project. 1260 12612011-11-23 Thomas Quinot <quinot@adacore.com> 1262 1263 * mlib-tgt-specific-vxworks.adb: Minor reformatting. 1264 12652011-11-23 Thomas Quinot <quinot@adacore.com> 1266 1267 * Make-generated.in (Sdefault.Target_Name): Set to 1268 $(target_noncanonical) instead of $(target) for consistency. 1269 12702011-11-23 Matthew Heaney <heaney@adacore.com> 1271 1272 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared 1273 Iterator type as limited (First, Last): Cursor return value 1274 depends on iterator node value (Iterate): Use start position as 1275 iterator node value (Next, Previous): Forward to corresponding 1276 cursor-based operation. 1277 12782011-11-23 Matthew Heaney <heaney@adacore.com> 1279 1280 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces): 1281 Renamed from Ordered_Set_Iterator_Interfaces. 1282 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared 1283 Iterator type as limited (First, Last): Cursor return value 1284 depends on iterator node value (Iterate): Use start position as 1285 iterator node value (Next, Previous): Forward to corresponding 1286 cursor-based operation. 1287 * a-cohase.ads, a-cohase.adb: Implemented forward iterator. 1288 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary 1289 node component (First, Next): Forward call to corresponding 1290 cursor-based operation (Iterate): Representation of iterator no 1291 longer has node component 1292 12932011-11-23 Hristian Kirtchev <kirtchev@adacore.com> 1294 1295 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the 1296 dereference has a proper type before the side effect removal 1297 mechanism kicks in. 1298 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case 1299 where the base type of the subtype is a private itype created 1300 to act as the partial view of a constrained record type. This 1301 scenario manifests with equivalent class-wide types for records 1302 with unknown discriminants. 1303 13042011-11-23 Jerome Guitton <guitton@adacore.com> 1305 1306 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada. 1307 13082011-11-23 Thomas Quinot <quinot@adacore.com> 1309 1310 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor 1311 reformatting/reorganization. 1312 13132011-11-23 Thomas Quinot <quinot@adacore.com> 1314 1315 * g-htable.ads: Remove old comments. 1316 13172011-11-23 Thomas Quinot <quinot@adacore.com> 1318 1319 * exp_imgv.adb: Minor reformatting. 1320 13212011-11-23 Robert Dewar <dewar@adacore.com> 1322 1323 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry 1324 family bounds out of range. 1325 13262011-11-23 Matthew Heaney <heaney@adacore.com> 1327 1328 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare 1329 type as limited, and remove node component. 1330 (First, Next): Forward call to corresponding cursor-based operation. 1331 (Iterate): Representation of iterator no longer has node component. 1332 13332011-11-23 Yannick Moy <moy@adacore.com> 1334 1335 * exp_util.adb: Revert previous change to remove side-effects in Alfa 1336 mode, which is not the correct thing to do for renamings. 1337 13382011-11-23 Thomas Quinot <quinot@adacore.com> 1339 1340 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb, 1341 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads, 1342 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb, 1343 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c, 1344 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl, 1345 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads, 1346 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb, 1347 s-taprop-posix.adb: Remove hard-coded clock ids; 1348 instead, generate them in System.OS_Constants. 1349 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the 1350 id of the clock providing Ada.Real_Time.Monotonic_Clock. 1351 * thread.c: New file. 1352 (__gnat_pthread_condattr_setup): New function. For platforms where 1353 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition 1354 variable attribute. 1355 13562011-11-23 Yannick Moy <moy@adacore.com> 1357 1358 * sem_ch3.adb: Restore the use of Expander_Active instead of 1359 Full_Expander_Active, so that the evaluation is forced in Alfa 1360 mode too. Otherwise, we end up with an unexpected insertion in a 1361 place where it is not supposed to happen, on default parameters 1362 of a call. 1363 13642011-11-23 Thomas Quinot <quinot@adacore.com> 1365 1366 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr" 1367 for Pretty_Print, for use from within gdb. 1368 13692011-11-23 Ed Schonberg <schonberg@adacore.com> 1370 1371 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop 1372 and the cursor declarations in a block, so that the loop variable 1373 is local to the construct. 1374 13752011-11-23 Matthew Heaney <heaney@adacore.com> 1376 1377 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns 1378 type Reversible_Iterator'Class. 1379 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator): 1380 Declare type as limited. 1381 (First, Last): Return value depends on iterator's start node value. 1382 (Next, Previous): Call corresponding Cursor-based operation. 1383 (Iterate): Indicate whether complete or partial iteration 1384 13852011-11-23 Robert Dewar <dewar@adacore.com> 1386 1387 * errout.adb: Minor reformattin (Finalize): Take templates into 1388 account for warning suppression. 1389 * errout.ads (Set_Specific_Warning_Off): Add Used parameter. 1390 * erroutc.adb: Minor reformatting (Finalize): Take generic 1391 templates into account for warning suppress. 1392 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter. 1393 * sem_prag.adb: Minor reformatting (Analyze_Pragma, 1394 case Warnings): Provide Used parameter in call to 1395 Set_Specific_Warnings_Off (to deal with generic template case). 1396 13972011-11-23 Pascal Obry <obry@adacore.com> 1398 1399 * sem_prag.adb (Process_Convention): Better error message for 1400 stdcall convention on dispatching calls. 1401 14022011-11-23 Gary Dismukes <dismukes@adacore.com> 1403 1404 * sem_ch4.adb, sem_ch13.adb: Minor reformatting. 1405 14062011-11-23 Javier Miranda <miranda@adacore.com> 1407 1408 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing 1409 implicit type conversion when the returned object is allocated 1410 in the secondary stack and the type of the returned object is 1411 an interface. Done to force generation of displacement of the 1412 "this" pointer. 1413 14142011-11-23 Pascal Obry <obry@adacore.com> 1415 1416 * impunit.adb: Add g-exptty and g-tty units. 1417 14182011-11-23 Robert Dewar <dewar@adacore.com> 1419 1420 * exp_imgv.adb: Minor code reorganization (use Make_Temporary). 1421 14222011-11-23 Robert Dewar <dewar@adacore.com> 1423 1424 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor 1425 reformatting. 1426 14272011-11-23 Yannick Moy <moy@adacore.com> 1428 1429 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on 1430 line of precondition/ postcondition/invariant. 1431 14322011-11-23 Pascal Obry <obry@adacore.com> 1433 1434 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb, 1435 terminals.c: New files. 1436 Makefile.rtl: Add these new files. 1437 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY. 1438 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o 1439 * gcc-interface/Make-lang.in: Update dependencies. 1440 14412011-11-21 Robert Dewar <dewar@adacore.com> 1442 1443 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names. 1444 * sem_attr.adb (Eval_Attribute, case Width): Ditto. 1445 14462011-11-21 Thomas Quinot <quinot@adacore.com> 1447 1448 * sinfo.ads: Minor reformatting. 1449 14502011-11-21 Yannick Moy <moy@adacore.com> 1451 1452 * exp_util.adb: Minor reformatting. Update comments. 1453 14542011-11-21 Robert Dewar <dewar@adacore.com> 1455 1456 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb, 1457 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb, 1458 sem_ch6.adb: Minor reformatting. 1459 14602011-11-21 Arnaud Charlet <charlet@adacore.com> 1461 1462 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use 1463 Unrestricted_Access to deal with fact that we properly detect the 1464 error if Access is used. 1465 * gcc-interface/Make-lang.in: Update dependencies. 1466 14672011-11-21 Yannick Moy <moy@adacore.com> 1468 1469 * exp_prag.adb (Expand_Pragma_Check): Place error on first character 1470 of expression. 1471 * sem_res.adb (Resolve_Short_Circuit): Place error on first 1472 character of expression. 1473 14742011-11-21 Yannick Moy <moy@adacore.com> 1475 1476 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode. 1477 14782011-11-21 Hristian Kirtchev <kirtchev@adacore.com> 1479 1480 * exp_attr.adb (Expand_N_Attribute_Reference, case 1481 Max_Size_In_Storage_Elements): Account for the size of the 1482 hidden list header which precedes controlled objects allocated 1483 on the heap. 1484 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime 1485 tables. 1486 * sinfo.adb (Header_Size_Added): New routine. 1487 (Set_Header_Size_Added): New routine. 1488 * sinfo.ads: Add flag Controlled_Header_Added along with 1489 associated comment. 1490 (Header_Size_Added): New inlined routine. 1491 (Set_Header_Size_Added): New inlined routine. 1492 * s-stposu.adb (Allocate_Any_Controlled): Use 1493 Header_Size_With_Padding to calculate the proper 1494 size of the header. 1495 (Deallocate_Any_Controlled): Use 1496 Header_Size_With_Padding to calculate the proper size 1497 of the header. (Header_Size_With_Padding): New routine. 1498 (Nearest_Multiple_Rounded_Up): Removed along with its uses. 1499 * s-stposu.ads (Header_Size_With_Padding): New routine. 1500 15012011-11-21 Ed Schonberg <schonberg@adacore.com> 1502 1503 * aspects.adb: Aspect specifications are allowed on renaming 1504 declarations 1505 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a 1506 subprogram renaming declaration 1507 15082011-11-21 Tristan Gingold <gingold@adacore.com> 1509 1510 * env.c: Remove unused declaration. 1511 15122011-11-21 Pascal Obry <obry@adacore.com> 1513 1514 * s-os_lib.ads: Minor style fix. 1515 15162011-11-21 Pascal Obry <obry@adacore.com> 1517 1518 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and 1519 identical, do nothing on Windows XP. 1520 15212011-11-21 Yannick Moy <moy@adacore.com> 1522 1523 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl): 1524 Use Full_Expander_Active instead of Expander_Active to control 1525 the forced evaluation of expressions for the sake of generating 1526 checks. 1527 15282011-11-21 Thomas Quinot <quinot@adacore.com> 1529 1530 * init.c: On FreeBSD, stack checking failures may raise SIGBUS. 1531 15322011-11-21 Tristan Gingold <gingold@adacore.com> 1533 1534 * sysdep.c (mode_read_text, mode_write_text, mode_append_text, 1535 mode_read_binary, mode_write_binary, mode_append_binary, 1536 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus, 1537 mode_read_binary_plus, mode_write_binary_plus, 1538 mode_append_binary_plus): Remove unused declarations. 1539 15402011-11-21 Yannick Moy <moy@adacore.com> 1541 1542 * gnat_rm.texi: Minor rewording. 1543 15442011-11-21 Hristian Kirtchev <kirtchev@adacore.com> 1545 1546 * exp_imgv.adb (Expand_Width_Attribute): Emit 1547 an error message rather than a warning when pragma Discard_Names 1548 prevents the computation of 'Width. Do not emit an error through 1549 the use of RE_Null. 1550 15512011-11-21 Javier Miranda <miranda@adacore.com> 1552 1553 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add 1554 implicit type conversion when the type of the allocator is an 1555 interface. Done to force generation of displacement of the "this" 1556 pointer when required. 1557 15582011-11-21 Ed Schonberg <schonberg@adacore.com> 1559 1560 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression 1561 functions, and is set when the expression is a completion of a 1562 previous declaration. 1563 * sem_ch6.adb (Analyze_Expression_Function): To determine properly 1564 whether an expression function completes a previous declaration, 1565 use Find_Corresponding_Spec, as when analyzing a subprogram body. 1566 15672011-11-21 Steve Baird <baird@adacore.com> 1568 1569 * sem_util.adb (Deepest_Type_Access_Level): Improve comment. 1570 (Type_Access_Level): Improve comment. 1571 15722011-11-21 Eric Botcazou <ebotcazou@adacore.com> 1573 1574 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by 1575 means of -iquote unconditionally. 1576 15772011-11-21 Robert Dewar <dewar@adacore.com> 1578 1579 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor 1580 reformatting. 1581 15822011-11-21 Arnaud Charlet <charlet@adacore.com> 1583 1584 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access 1585 to deal with fact that we properly detect the error if Access 1586 is used. 1587 15882011-11-21 Steve Baird <baird@adacore.com> 1589 1590 * sem_util.ads: Update comment describing function 1591 Deepest_Access_Level. 1592 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a 1593 generic formal type. 1594 (Type_Access_Level): Return library level 1595 for a generic formal type. 1596 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level 1597 calls with calls to Deepest_Type_Access_Level. 1598 * sem_ch3.adb (Analyze_Component_Declaration): replace a 1599 Type_Access_Level call with a call to Deepest_Type_Access_Level. 1600 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility): 1601 Replace three Type_Access_Level calls with calls to 1602 Deepest_Type_Access_Level. 1603 (Resolve_Allocator): Replace a Type_Access_Level call with a call to 1604 Deepest_Type_Access_Level. 1605 (Valid_Conversion.Valid_Array_Conversion): Replace a 1606 Type_Access_Level call with a call to Deepest_Type_Access_Level. 1607 16082011-11-21 Robert Dewar <dewar@adacore.com> 1609 1610 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting. 1611 16122011-11-21 Robert Dewar <dewar@adacore.com> 1613 1614 * sinput.ads: Minor comment fix. 1615 16162011-11-21 Robert Dewar <dewar@adacore.com> 1617 1618 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit, 1619 Last_Bit, Position): Handle 2005 case. 1620 16212011-11-21 Robert Dewar <dewar@adacore.com> 1622 1623 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access 1624 to deal with fact that we properly detect the error if Access 1625 is used. 1626 (Increment): Same fix. 1627 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access 1628 to deal with fact that we properly detect the error if Access 1629 is used. 1630 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is 1631 volatile if the B component is volatile. This affects the check 1632 for passing such a by reference volatile actual to a non-volatile 1633 formal (which should be illegal) 1634 16352011-11-21 Robert Dewar <dewar@adacore.com> 1636 1637 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both 1638 size and alignment for foreign convention enumeration types. 1639 * layout.adb (Set_Elem_Alignment): Redo setting of alignment 1640 when size is set. 1641 16422011-11-21 Yannick Moy <moy@adacore.com> 1643 1644 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check, 1645 Apply_Discriminant_Check, Apply_Divide_Check, 1646 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks, 1647 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks, 1648 Selected_Range_Checks): Replace reference to Expander_Active 1649 with reference to Full_Expander_Active, so that expansion of 1650 checks is not performed in Alfa mode 1651 16522011-11-21 Tristan Gingold <gingold@adacore.com> 1653 1654 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with 1655 fact that we properly detect the error if Access is used. 1656 16572011-11-21 Hristian Kirtchev <kirtchev@adacore.com> 1658 1659 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check. 1660 16612011-11-21 Hristian Kirtchev <kirtchev@adacore.com> 1662 1663 * exp_imgv.adb: Add with and use clause for Errout. 1664 (Expand_Width_Attribute): Emit a warning when in 1665 configurable run-time mode to provide a better diagnostic message. 1666 16672011-11-21 Hristian Kirtchev <kirtchev@adacore.com> 1668 1669 * s-finmas.adb (Finalize): Add comment concerning double finalization. 1670 16712011-11-21 Ed Schonberg <schonberg@adacore.com> 1672 1673 * sem_ch3.adb (Access_Definition): If the access definition 1674 is itself the return type of an access to function definition 1675 which is ultimately the return type of an access to subprogram 1676 declaration, its scope is the enclosing scope of the ultimate 1677 access to subprogram. 1678 16792011-11-21 Steve Baird <baird@adacore.com> 1680 1681 * sem_res.adb (Valid_Conversion): If a conversion was legal 1682 in the body of a generic, then the corresponding conversion is 1683 legal in the expanded body of an instance of the generic. 1684 16852011-11-21 Robert Dewar <dewar@adacore.com> 1686 1687 * sem_ch3.adb: Minor reformatting. 1688 16892011-11-21 Robert Dewar <dewar@adacore.com> 1690 1691 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as 1692 line terminator. 1693 * sinput.ads: Add section on Handling of Source Line Terminators. 1694 * types.ads (Line_Terminator): Adjust comments. 1695 16962011-11-21 Robert Dewar <dewar@adacore.com> 1697 1698 * frontend.adb (Frontend): Capture restrictions from config files 1699 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma 1700 information 1701 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent 1702 references. This was noticed during debugging, but it is not 1703 known if it causes real bugs. 1704 * restrict.ads, restrict.adb: New routines to save/set/restore 1705 non-partition-wide restrictions. 1706 * s-rident.ads: Comment changes for new handling of 1707 No_Elaboration_Code 1708 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions 1709 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete 1710 attempt to save/restore non-partition-wide restrictions (now 1711 this work is all done in Sem). 1712 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): 1713 Special handling for restriction No_Elaboration_Code. 1714 17152011-11-21 Robert Dewar <dewar@adacore.com> 1716 1717 * gnat_ugn.texi: Document new handling of restrictions pragmas. 1718 17192011-11-21 Pascal Obry <obry@adacore.com> 1720 1721 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond 1722 attribute as not needed. 1723 17242011-11-21 Robert Dewar <dewar@adacore.com> 1725 1726 * sem_prag.adb: Minor reformatting. 1727 17282011-11-21 Pascal Obry <obry@adacore.com> 1729 1730 * gnat_rm.texi: Document restriction for stdcall convention on 1731 dispatching calls. 1732 17332011-11-21 Pascal Obry <obry@adacore.com> 1734 1735 * sem_prag.adb (Process_Convention): A dispatching call cannot 1736 have a stdcall calling convention. 1737 17382011-11-21 Pascal Obry <obry@adacore.com> 1739 1740 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a 1741 mutex attribute as not needed. 1742 (Initialize_TCB): Likewise. 1743 (Initialize): Likewise. 1744 17452011-11-21 Robert Dewar <dewar@adacore.com> 1746 1747 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure 1748 (Process_PPCs): Invariants only apply to public subprograms. 1749 17502011-11-21 Robert Dewar <dewar@adacore.com> 1751 1752 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb, 1753 restrict.ads: Fix for No_Implicit_Aliasing in the renames case. 1754 17552011-11-21 Robert Dewar <dewar@adacore.com> 1756 1757 * a-finali.ads: Use pragma Pure_12 for this unit 1758 * aspects.adb: Add aspect Pure_12 1759 * aspects.ads: Add aspect Pure_12 1760 * opt.ads: Add note on Pure_12 1761 * par-prag.adb: Add dummy entry for Pure_12 1762 * sem_prag.adb: Implement Pure_12 pragma 1763 * snames.ads-tmpl: Add Entry for Pure_12 1764 17652011-11-21 Sergey Rybin <rybin@adacore.com frybin> 1766 1767 * vms_data.ads: Add qualifiers for new gnatpp options 1768 '--call_threshold' and '--par_threshold". 1769 * gnat_ugn.texi: Add description for new gnatpp options 1770 '--call_threshold' and '--par_threshold". 1771 17722011-11-21 Robert Dewar <dewar@adacore.com> 1773 1774 * lib.ads: Minor reformatting. 1775 17762011-11-21 Robert Dewar <dewar@adacore.com> 1777 1778 * lib-load.ads: Add comment. 1779 17802011-11-21 Gary Dismukes <dismukes@adacore.com> 1781 1782 * sem_elab.adb: Minor reformatting 1783 17842011-11-21 Robert Dewar <dewar@adacore.com> 1785 1786 * exp_ch6.adb: Minor reformatting. 1787 17882011-11-21 Ed Schonberg <schonberg@adacore.com> 1789 1790 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal 1791 subprogram of the formal package is covered by an others 1792 association with a box initialization, no check is needed 1793 against the actual in the instantiation of the formal package. 1794 17952011-11-21 Robert Dewar <dewar@adacore.com> 1796 1797 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk 1798 elab warning from within precondition/postcondition etc. 1799 18002011-11-21 Ed Schonberg <schonberg@adacore.com> 1801 1802 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call 1803 with out parameters may generate assignments to force constraint 1804 checks. These checks must be properly placed in the code after the 1805 declaration or statement that contains the call. 1806 18072011-11-21 Fedor Rybin <frybin@adacore.com> 1808 1809 * gnat_ugn.texi: Adding info on current gnattest limitations an 1810 support of -X option. 1811 18122011-11-21 Robert Dewar <dewar@adacore.com> 1813 1814 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting. 1815 18162011-11-20 Robert Dewar <dewar@adacore.com> 1817 1818 * exp_ch6.adb, exp_util.adb: Minor reformatting 1819 18202011-11-20 Eric Botcazou <ebotcazou@adacore.com> 1821 1822 * sinfo.ads (Reference): Document that it is OK to set 1823 Is_Known_Non_Null on a temporary initialized to a N_Reference 1824 node. 1825 18262011-11-20 Matthew Heaney <heaney@adacore.com> 1827 1828 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0 1829 for Source list. 1830 18312011-11-20 Eric Botcazou <ebotcazou@adacore.com> 1832 1833 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment): 1834 Declare NEW_EXPR local variable and attach the 1835 temporary to it. Set Is_Known_Non_Null on the temporary. 1836 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise. 1837 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on 1838 the temporary created to hold the 'Reference of the expression, 1839 if any. 1840 * checks.adb (Install_Null_Excluding_Check): Bail out for the 1841 Get_Current_Excep.all.all idiom generated by the expander. 1842 18432011-11-20 Eric Botcazou <ebotcazou@adacore.com> 1844 1845 * gcc-interface/trans.c (struct language_function): Add GNAT_RET. 1846 (f_gnat_ret): New macro. 1847 (struct nrv_data): Add GNAT_RET. 1848 (finalize_nrv_unc_r): New helper function. 1849 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the 1850 function returns unconstrained, use finalize_nrv_unc_r as callback. 1851 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if 1852 RET_OBJ is non-null. 1853 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv. 1854 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case, 1855 if optimization is enabled, record candidates for the Named Return 1856 Value optimization. 1857 18582011-11-20 Eric Botcazou <ebotcazou@adacore.com> 1859 1860 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment. 1861 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless 1862 test. Tweak default case. 1863 <N_Goto_Statement>: Use better formatting. 1864 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of 1865 MODIFY_EXPR to initialize the storage. 1866 (build_allocator): Likewise. 1867 18682011-11-20 Eric Botcazou <ebotcazou@adacore.com> 1869 1870 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust 1871 call to components_to_record. 1872 (components_to_record): Add FIRST_FREE_POS parameter. For the variant 1873 part, reuse enclosing union even if there is a representation clause 1874 on the Unchecked_Union. If there is a variant part, compute the new 1875 first free position, if any. Adjust call to self. Use a single field 1876 directly only if it hasn't got a representation clause or is placed at 1877 offset zero. Create the variant part at offset 0 if all the fields 1878 down to this level have a rep clause. Do not chain the variant part 1879 immediately and adjust downstream. 1880 Do not test ALL_REP before moving the fields without rep clause to the 1881 previous level. Call create_rep_part to create the REP part and force 1882 a minimum size on it if necessary. Do not chain it immediately. 1883 Create a fake REP part if there are fields without rep clause that need 1884 to be laid out starting from FIRST_FREE_POS. 1885 At the end, chain the REP part and then the variant part. 1886 (create_rep_part): New function. 1887 (get_rep_part): Minor tweak. 1888 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak. 1889 18902011-11-18 Iain Sandoe <iains@gcc.gnu.org> 1891 1892 PR target/50678 1893 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the 1894 bug filed as radar #10302855 from __gnat_error_handler to... 1895 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function. 1896 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define. 1897 18982011-11-18 Tristan Gingold <gingold@adacore.com> 1899 Iain Sandoe <iains@gcc.gnu.org> 1900 1901 PR target/49992 1902 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove. 1903 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing. 1904 19052011-11-12 Iain Sandoe <iains@gcc.gnu.org> 1906 1907 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link 1908 s-oscons.ads. 1909 (OSCONS_CPP, OSCONS_EXTRACT): New. 1910 (./bldtools/oscons/xoscons): New target. 1911 ($(RTSDIR)/s-oscons.ads): Likewise. 1912 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads. 1913 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency. 1914 * Make-generated.in: Remove machinery to generate xoscons and 1915 ada/s-oscons.ads. 1916 19172011-11-10 Eric Botcazou <ebotcazou@adacore.com> 1918 1919 * fe.h (Serious_Errors_Detected): New macro. 1920 * gcc-interface/gigi.h (build_atomic_load): Declare. 1921 (build_atomic_store): Likewise. 1922 * gcc-interface/trans.c (atomic_sync_required_p): New predicate. 1923 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable. 1924 Build an atomic load for an In or In Out parameter if needed. 1925 Build an atomic store for the assignment of an Out parameter if needed. 1926 Build an atomic store to the target if ATOMIC_SYNC is true. 1927 (present_in_lhs_or_actual_p): New predicate. 1928 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed. 1929 <N_Explicit_Dereference>: Likewise. 1930 <N_Indexed_Component>: Likewise. 1931 <N_Selected_Component>: Likewise. 1932 <N_Assignment_Statement>: Adjust call to call_to_gnu. 1933 Build an atomic store to the LHS if needed. 1934 <N_Function_Call>: Adjust call to call_to_gnu. 1935 * gcc-interface/utils2.c: Include toplev.h. 1936 (resolve_atomic_size): New static function. 1937 (build_atomic_load): New function. 1938 (build_atomic_store): Likewise. 1939 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h. 1940 19412011-11-07 Olivier Hainque <hainque@adacore.com> 1942 1943 * sigtramp-ppcvxw.c: Add general comments. 1944 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add 1945 rules for r2 to r13, plus CTR and XER. 1946 (CFA_REG): New, register number used to hold the local CFA. 1947 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it. 1948 Make that 15, not 14, with documentation. 1949 (TCR): Undef before definition, preventing conflict with reg number in 1950 VxWorks headers. 1951 19522011-11-07 Robert Dewar <dewar@adacore.com> 1953 1954 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb, 1955 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting. 1956 * gcc-interface/Make-lang.in: Update dependencies. 1957 19582011-11-07 Ed Schonberg <schonberg@adacore.com> 1959 1960 * exp_ch6.adb: A tagged type is a legal actual for an aliased 1961 formal. 1962 19632011-11-07 Pascal Obry <obry@adacore.com> 1964 1965 * g-socket.adb, g-socket.ads: Minor reformatting. 1966 19672011-11-07 Robert Dewar <dewar@adacore.com> 1968 1969 * sem_res.adb (Resolve_Actuals): Minor error message improvement. 1970 19712011-11-07 Robert Dewar <dewar@adacore.com> 1972 1973 * gnat_ugn.texi: Add discussion of default mode handling of 1974 source representation with no -gnatW option given, in particular 1975 noting that NEL (next line) is not recognized in this context. 1976 19772011-11-07 Yannick Moy <moy@adacore.com> 1978 1979 * sem_util.adb (Note_Possible_Modification): In Alfa mode, 1980 generate a reference for a modification even when the modification 1981 does not come from source. 1982 19832011-11-07 Ed Schonberg <schonberg@adacore.com> 1984 1985 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form, 1986 use the indexing attributes rather than the Element function, 1987 to obtain variable references. 1988 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use 1989 Find_Aspect rather than iterating over representation 1990 items. Improve error message. 1991 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions 1992 of Reference functions. 1993 19942011-11-07 Yannick Moy <moy@adacore.com> 1995 1996 * sem_util.adb (Unique_Entity): For a parameter on a subprogram 1997 body that has a corresponding parameter on the subprogram 1998 declaration, define the unique entity as being the declaration 1999 one. 2000 20012011-11-07 Ed Schonberg <schonberg@adacore.com> 2002 2003 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the 2004 return type of a function is the class-wide type of an incomplete 2005 type T, T can be a Taft-amendment type and does not have to be 2006 completed in the current private part. 2007 20082011-11-07 Ed Schonberg <schonberg@adacore.com> 2009 2010 * aspects.ads (Inherited_Aspect): Map that indicates type aspects 2011 that are inherited by default, and apply to the class-wide type 2012 as well. 2013 * aspects.adb (Find_Aspect): If the entity is class-wide and the 2014 aspect is inherited, use the aspect of the specific type. 2015 20162011-11-07 Hristian Kirtchev <kirtchev@adacore.com> 2017 2018 * exp_alfa.adb: Remove with and use clause for 2019 Exp_Ch8. Add with and use clause for Exp_Util. 2020 Remove local constant Disable_Processing_Of_Renamings. 2021 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of 2022 object renamings has been reenabled. 2023 (Expand_Possible_Renaming): 2024 The expansion of identifier and expanded names has been 2025 reenabled. Perform the substitutions only for entities that 2026 denote an object. 2027 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util. 2028 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8. 2029 (Remove_Side_Effects): Alphabetize local variables. Add a guard 2030 to avoid the infinite expansion of an expression in Alfa mode. Add 2031 processing for function calls in Alfa mode. 2032 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8. 2033 20342011-11-07 Ed Schonberg <schonberg@adacore.com> 2035 2036 * freeze.adb (Freeze_Entity): If the entity is an access to 2037 subprogram whose designated type is itself a subprogram type, 2038 its own return type must be decorated with size information. 2039 20402011-11-04 Arnaud Charlet <charlet@adacore.com> 2041 2042 * gcc-interface/Make-lang.in: Update dependencies. 2043 20442011-11-04 Robert Dewar <dewar@adacore.com> 2045 2046 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression): 2047 Avoid junk semicolon after argument of machine code Asm operand. 2048 20492011-11-04 Robert Dewar <dewar@adacore.com> 2050 2051 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in 2052 CodePeer mode or if restriction No_Exception_Handlers is present. 2053 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop 2054 nodes in CodePeer mode or if restriction No_Exception_Handlers 2055 is present. 2056 20572011-11-04 Robert Dewar <dewar@adacore.com> 2058 2059 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting. 2060 20612011-11-04 Ed Schonberg <schonberg@adacore.com> 2062 2063 * sem_ch6.adb (Analyze_Subprogram_Specification): The 2064 specification is legal if it is a function that returns an 2065 abstract type, if it comes from an attribute renaming of a stream 2066 attribute of an abstract type. 2067 20682011-11-04 Gary Dismukes <dismukes@adacore.com> 2069 2070 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed 2071 components, check whether recursively check whether the prefix 2072 denotes an unaligned object. 2073 20742011-11-04 Ed Schonberg <schonberg@adacore.com> 2075 2076 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of 2077 the pragma is legal if it is an expanded name that denotes a 2078 procedure that be can called without parameters. 2079 20802011-11-04 Eric Botcazou <ebotcazou@adacore.com> 2081 2082 * gnat_ugn.texi (Performance Considerations) <Vectorization 2083 of loops>: New sub-section. <Other Optimization Switches>: 2084 Minor tweak. 2085 20862011-11-04 Robert Dewar <dewar@adacore.com> 2087 2088 * gnat_rm.texi: Minor reformatting. 2089 20902011-11-04 Matthew Heaney <heaney@adacore.com> 2091 2092 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE 2093 when Target and Source denote same non-empty object 2094 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto 2095 20962011-11-04 Robert Dewar <dewar@adacore.com> 2097 2098 * exp_attr.adb: Minor reformatting. 2099 21002011-11-04 Ed Schonberg <schonberg@adacore.com> 2101 2102 * exp_ch5.adb (Expand_Assign_Record): Do not generate a 2103 discriminant assignment within an initialization proc if the 2104 record is an unchecked union, as it can only come from the 2105 initialization of an unchecked union component. 2106 21072011-11-04 Robert Dewar <dewar@adacore.com> 2108 2109 * gnat_ugn.texi: Minor reformatting. 2110 21112011-11-04 Robert Dewar <dewar@adacore.com> 2112 2113 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than 2114 warning message. 2115 21162011-11-04 Robert Dewar <dewar@adacore.com> 2117 2118 * exp_ch4.adb: Minor code reorganization (remove junk obsolete 2119 var Save_Space). 2120 21212011-11-04 Hristian Kirtchev <kirtchev@adacore.com> 2122 2123 * exp_alfa.adb: Add local constant 2124 Disable_Processing_Of_Renamings; 2125 (Expand_Alfa_N_Object_Renaming_Declaration): Disable 2126 the name evaluation of object renamings for now. 2127 (Expand_Potential_Renaming): Do not perform the substitution 2128 for now. 2129 * exp_util.adb (Remove_Side_Effects): Remove processing for 2130 functions with side effects in Alfa mode. 2131 21322011-11-04 Gary Dismukes <dismukes@adacore.com> 2133 2134 * bindgen.adb (Gen_Elab_Calls): In the case 2135 of the AAMP target, set elaboration entities to 1 rather than 2136 incrementing. 2137 21382011-11-04 Ed Schonberg <schonberg@adacore.com> 2139 2140 * sem_ch10.adb (Install_Limited_With_Unit): To establish the 2141 proper entities on the ancestors of a child unit that appear 2142 in a limited_with clause, follow the unit links because the 2143 units are not analyzed and scope information is incomplete. 2144 21452011-11-04 Eric Botcazou <ebotcazou@adacore.com> 2146 2147 * exp_ch4.adb (Expand_N_Selected_Component): Refine code 2148 setting the Atomic_Sync_Required flag to detect one more case. 2149 * exp_util.adb (Activate_Atomic_Synchronization): Refine code 2150 setting the Atomic_Sync_Required flag to exclude more cases, 2151 depending on the parent of the node to be examined. 2152 21532011-11-04 Bob Duff <duff@adacore.com> 2154 2155 * g-excact.adb: Minor: use named notation. 2156 21572011-11-04 Ed Schonberg <schonberg@adacore.com> 2158 2159 * sem_ch5.adb: Improve error messages for illegal iterators. 2160 21612011-11-04 Hristian Kirtchev <kirtchev@adacore.com> 2162 2163 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and 2164 Sem_Util. 2165 (Expand_Alfa): Alphabetize cases on first choice. Add 2166 processing for object renaming declarations, identifiers and 2167 expanded names. 2168 (Expand_Alfa_N_In): Remove useless return. 2169 (Expand_Alfa_N_Object_Renaming_Declaration): New routine. 2170 (Expand_Potential_Renaming): New routine. 2171 * exp_ch8.adb (Evaluate_Name): Moved to the top level. 2172 (Expand_N_Object_Declaration): Alphabetize local variables. Move 2173 Evaluate_Name out to the top level. 2174 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec. 2175 * exp_util.adb (Remove_Side_Effects): Add processing for 2176 functions with side effects in Alfa mode. 2177 21782011-11-04 Hristian Kirtchev <kirtchev@adacore.com> 2179 2180 * gnat_rm.texi: Add entries for 2181 restrictions No_Relative_Delay, No_Requeue_Statements and 2182 No_Stream_Optimizations. 2183 21842011-11-04 Ed Schonberg <schonberg@adacore.com> 2185 2186 * sem_ch4.adb: Set type of entity in prefixed call, for 2187 completeness in a generic context. 2188 21892011-11-04 Yannick Moy <moy@adacore.com> 2190 2191 * sem_prag.adb: Minor refactoring (renaming of a parameter). 2192 21932011-11-04 Robert Dewar <dewar@adacore.com> 2194 2195 * atree.ads: Minor reformatting. 2196 21972011-11-04 Robert Dewar <dewar@adacore.com> 2198 2199 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d 2200 and -gnatd.e here 2201 * exp_ch2.adb (Expand_Entity_Reference): Use 2202 Activate_Atomic_Synchronization 2203 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use 2204 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent): 2205 Activate_Atomic_Synchronization (Expand_N_Selected_Component): 2206 Use Activate_Atomic_Synchronization 2207 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New 2208 procedure. 2209 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to 2210 N_Selected_Component node 2211 22122011-11-04 Robert Dewar <dewar@adacore.com> 2213 2214 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting. 2215 22162011-11-04 Yannick Moy <moy@adacore.com> 2217 2218 * atree.adb, atree.ads (Set_Original_Node): New set procedure. 2219 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects): 2220 In ASIS mode, no splitting of aspects between conjuncts. 2221 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma 2222 expressions refer to the original aspect expressions through 2223 the Original_Node link. This is used in semantic analysis for 2224 ASIS mode, so that the original expression also gets analyzed. 2225 * sem_prag.adb (Preanalyze_TC_Args, 2226 Check_Precondition_Postcondition, 2227 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma 2228 generated from a source aspect, also analyze the original aspect 2229 expression. 2230 (Check_Expr_Is_Static_Expression): New procedure 2231 similar to existing procedure Check_Arg_Is_Static_Expression, 2232 except called on expression inside pragma. 2233 22342011-11-04 Tristan Gingold <gingold@adacore.com> 2235 2236 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from 2237 Find_Project.Try_Path_Name. 2238 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name. 2239 22402011-11-04 Eric Botcazou <ebotcazou@adacore.com> 2241 2242 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile. 2243 22442011-11-04 Pascal Obry <obry@adacore.com> 2245 2246 * projects.texi: Add short description for qualifiers aggregate 2247 and aggregate library. 2248 22492011-11-04 Matthew Heaney <heaney@adacore.com> 2250 2251 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb] 2252 * a-cgaaso.adb: Replaced implementation with instantiation 2253 of Generic_Sort. 2254 * a-cogeso.ad[sb] This is the new Ada 2012 unit 2255 Ada.Containers.Generic_Sort 2256 22572011-11-04 Robert Dewar <dewar@adacore.com> 2258 2259 * exp_ch2.adb (Expand_Entity_Reference): Do not set 2260 Atomic_Sync_Required for the case of a prefix of an attribute. 2261 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require 2262 atomic synchronization 2263 (Expand_N_Indexed_Component): Ditto. 2264 (Expand_B_Selected_Component): Ditto. 2265 * sem_prag.adb (Process_Suppress_Unsuppress): 2266 Disable/Enable_Atomic_Synchronization can now occur for array 2267 types with pragma Atomic_Components. 2268 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on 2269 N_Explicit_Dereference nodes and on N_Indexed_Component nodes. 2270 22712011-11-04 Gary Dismukes <dismukes@adacore.com> 2272 2273 * gnat_ugn.texi: Editorial corrections for gnattest section. 2274 22752011-11-04 Robert Dewar <dewar@adacore.com> 2276 2277 * sem_prag.adb: Minor reformatting. 2278 * gnat_rm.texi: Update documentation for pragma Warnings (Off, 2279 "***") usage. 2280 * exp_ch2.adb (Expand_Entity_Reference): Only set 2281 Atomic_Sync_Required on entities that are variables. Doesn't 2282 make any sense on anything else. 2283 22842011-11-04 Robert Dewar <dewar@adacore.com> 2285 2286 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of 2287 atomic sync to type case. 2288 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can 2289 apply to types. 2290 22912011-11-04 Robert Dewar <dewar@adacore.com> 2292 2293 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test 2294 for call vs assign. 2295 * gcc-interface/Make-lang.in: Update dependencies. 2296 22972011-11-04 Robert Dewar <dewar@adacore.com> 2298 2299 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at 2300 compile time. 2301 23022011-11-04 Matthew Heaney <heaney@adacore.com> 2303 2304 * Makefile.rtl, impunit.adb: Added a-sfecin.ads, 2305 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb], 2306 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb] 2307 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], 2308 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], 2309 a-sulcin.ad[sb]: New files. 2310 23112011-11-04 Geert Bosch <bosch@adacore.com> 2312 2313 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads, 2314 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads, 2315 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads, 2316 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK. 2317 * gcc-interface/Makefile.in: Remove libgnala and related objects. 2318 23192011-11-04 Matthew Heaney <heaney@adacore.com> 2320 2321 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb], 2322 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb], 2323 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb], 2324 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations 2325 added to package. 2326 23272011-11-04 Eric Botcazou <ebotcazou@adacore.com> 2328 2329 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert 2330 that the type of the parameters isn't dummy in type_annotate_only mode. 2331 23322011-11-04 Robert Dewar <dewar@adacore.com> 2333 2334 * sem_ch12.adb: Minor reformatting 2335 23362011-11-04 Gary Dismukes <dismukes@adacore.com> 2337 2338 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target, 2339 initialize elaboration entities to zero when specs are processed. 2340 23412011-10-28 Iain Sandoe <iains@gcc.gnu.org> 2342 Eric Botcazou <ebotcazou@adacore.com> 2343 2344 PR target/50678 2345 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the 2346 bug filed as radar #10302855 (inconsistent unwind data for sigtramp). 2347 23482011-10-28 Eric Botcazou <ebotcazou@adacore.com> 2349 2350 PR ada/50842 2351 * gcc-interface/Makefile.in (SYMDEPS): Delete. 2352 (LIBICONV): New variable. 2353 (LIBICONV_DEP): Likewise. 2354 (LIBS): Add $(LIBICONV). 2355 (LIBDEPS): Add $(LIBICONV_DEP). 2356 (EXTRA_GNATTOOLS_OBJS): Merge into... 2357 (TOOLS_LIBS): ...this. Add $(LIBICONV). 2358 23592011-10-26 Eric Botcazou <ebotcazou@adacore.com> 2360 2361 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local 2362 variable. Always create the elaboration variable, if any, as constant. 2363 23642011-10-26 Eric Botcazou <ebotcazou@adacore.com> 2365 2366 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to 2367 make a packable type for fields of union types as well. 2368 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate. 2369 (gnat_to_gnu_component_type): Try to make a packable type for fields 2370 of union types as well. 2371 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate. 2372 (maybe_pad_type): Try to make a packable type for fields of union types 2373 as well. 2374 (gnat_to_gnu_field): Likewise. 2375 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate. 2376 (set_rm_size): Likewise. 2377 (rm_size): Likewise. 2378 * gcc-interface/misc.c (gnat_type_max_size): Likewise. 2379 * gcc-interface/trans.c (add_decl_expr): Likewise. 2380 * gcc-interface/utils.c (finish_record_type): Likewise. 2381 * gcc-interface/utils2.c (build_simple_component_ref): Likewise. 2382 23832011-10-26 Eric Botcazou <ebotcazou@adacore.com> 2384 2385 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components 2386 declared as atomic. Move around conditionally executed code. 2387 23882011-10-24 Robert Dewar <dewar@adacore.com> 2389 2390 * sem.adb (Initialize): Fix bug that blew up if called a second time. 2391 23922011-10-24 Robert Dewar <dewar@adacore.com> 2393 2394 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c, 2395 tb-ivms.c, tb-gcc.c: Update headers to GPL 3. 2396 23972011-10-24 Robert Dewar <dewar@adacore.com> 2398 2399 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma 2400 name in error msg. 2401 24022011-10-24 Hristian Kirtchev <kirtchev@adacore.com> 2403 2404 * gnat_rm.texi: Add an entry for restriction No_Finalization. 2405 24062011-10-24 Ed Schonberg <schonberg@adacore.com> 2407 2408 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the 2409 current instance is within the one that contains the generic, 2410 the freeze node for the current one must appear in the current 2411 declarative part. Ditto if the current instance is within another 2412 package instance. In both of these cases the freeze node of the 2413 previous instance is not relevant. 2414 24152011-10-24 Gary Dismukes <dismukes@adacore.com> 2416 2417 * switch-m.adb (Normalize_Compiler_Switches): Add recognition 2418 of AAMP-specific switches -univ and -aamp_target. 2419 24202011-10-24 Robert Dewar <dewar@adacore.com> 2421 2422 * a-tienau.adb (Put): Deal properly with limited line length. 2423 24242011-10-24 Robert Dewar <dewar@adacore.com> 2425 2426 * sem_warn.adb, sem_ch12.adb: Minor reformatting. 2427 24282011-10-24 Tristan Gingold <gingold@adacore.com> 2429 2430 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files 2431 on AIX. 2432 24332011-10-24 Ed Schonberg <schonberg@adacore.com> 2434 2435 * sem_ch12.adb (Earlier): make available globally. If both 2436 nodes have the same sloc, the freeze node that does not come 2437 from source is the later one. 2438 (True_Parent): Make available globally. 2439 (Previous_Instance): Subsidiary of 2440 Insert_Freeze_Node_For_Instance, to check whether the generic 2441 parent of the current instance is declared within a previous 2442 instance in the same unit or declarative part, in which case the 2443 freeze nodes of both instances must appear in order to prevent 2444 elaboration problems in gigi. 2445 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a 2446 freeze point, and the freeze node of a preceding instantiation 2447 must be inserted before it. 2448 24492011-10-24 Robert Dewar <dewar@adacore.com> 2450 2451 * checks.ads, checks.adb: Add handling of Synchronization_Check 2452 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable 2453 atomic sync). 2454 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required 2455 flag Minor code reorganization. 2456 * opt.ads (Warn_On_Atomic_Synchronization): New switch. 2457 * par-prag.adb: Add dummy entries for pragma 2458 Disable/Enable_Atomic_Synchronization. 2459 * sem_prag.adb (Process_Suppress_Unsuppress): Handle 2460 case of Atomic_Synchronization specially (not suppressed 2461 by All_Checks, cannot be set from Source). 2462 (Pragma Disable/Enable_Atomic_Synchronization): Add processing. 2463 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag 2464 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add 2465 entry for pragma Disable/Enable_Atomic_Synchronization 2466 * switch-c.adb: The -gnatp switch does not disable 2467 Atomic_Synchronization Add -gnatep switch to disable 2468 Atomic_Synchronization. 2469 * types.ads: Add entry for Synchronization_Check 2470 * usage.adb: Add line for -gnated switch 2471 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization 2472 24732011-10-24 Geert Bosch <bosch@adacore.com> 2474 2475 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start 2476 at Integer'First. 2477 24782011-10-24 Robert Dewar <dewar@adacore.com> 2479 2480 * sem_ch12.adb, s-gearop.adb: Minor reformatting. 2481 24822011-10-24 Robert Dewar <dewar@adacore.com> 2483 2484 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings. 2485 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings. 2486 24872011-10-24 Emmanuel Briot <briot@adacore.com> 2488 2489 * prj-proc.adb (Process_Expression_Variable_Decl): No special 2490 handling for Project_Path unless it is an attribute. 2491 24922011-10-24 Javier Miranda <miranda@adacore.com> 2493 2494 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram. 2495 (Install_Hidden_Primitives): New subprogram. 2496 (Restore_Hidden_Primitives): New subprogram. 2497 (Analyze_Formal_Package_Declaration, 2498 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): 2499 Invoke Check_Hidden_Primitives after every call to 2500 Analyze_Associations, and invoke Restore_Hidden_Primitives to 2501 restore their visibility after processing the instantiation. 2502 (Instantiate_Package_Body): Install visible primitives before 2503 analyzing the instantiation and uninstall them to restore their 2504 visibility when the instantiation has been analyzed. 2505 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram 2506 (Remove_Suffix): New subprogram 2507 * sem_ch3.adb (Derive_Subprogram): When handling 2508 a derived subprogram for the instantiation of a formal derived 2509 tagged type, inherit the dispatching attributes from the actual 2510 subprogram (not from the parent type). 2511 25122011-10-24 Vasiliy Fofanov <fofanov@adacore.com> 2513 2514 * gnat_ugn.texi: Document explicit use of XDECGNAT library. 2515 25162011-10-24 Hristian Kirtchev <kirtchev@adacore.com> 2517 2518 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and 2519 update its uses. 2520 (Build_Discriminant_Assignments): Add local variable D_Loc and update 2521 its uses. 2522 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and 2523 Var_Loc and update their uses. 2524 (Build_Record_Init_Proc): Code reformatting. 2525 (Increment_Counter): Add formal parameter Loc. 2526 (Make_Counter): Add formal parameter Loc. 2527 25282011-10-24 Eric Botcazou <ebotcazou@adacore.com> 2529 2530 * sem_disp.adb (Covers_Some_Interface): Fix typo. 2531 25322011-10-24 Matthew Heaney <heaney@adacore.com> 2533 2534 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense 2535 of predicate. 2536 25372011-10-24 Yannick Moy <moy@adacore.com> 2538 2539 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case): 2540 Translate arguments in positional notation into pragma argument 2541 association arguments for the generated pragma. 2542 25432011-10-24 Arnaud Charlet <charlet@adacore.com> 2544 2545 * exp_ch5.adb: Fix minor typo. 2546 25472011-10-24 Ed Schonberg <schonberg@adacore.com> 2548 2549 * sem_ch3.adb (Is_Visible_Component): Refine predicate for 2550 the case of a component reference in an instance body, when the 2551 enclosing type is private. 2552 25532011-10-24 Sergey Rybin <rybin@adacore.com frybin> 2554 2555 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT 2556 driver for getting the project support into gnatelim section. 2557 25582011-10-24 Robert Dewar <dewar@adacore.com> 2559 2560 * gnat_rm.texi: Minor correction to documentation on address clause. 2561 25622011-10-24 Hristian Kirtchev <kirtchev@adacore.com> 2563 2564 * s-finmas.adb (Attach): Synchronize and call the unprotected version. 2565 (Attach_Unprotected): New routine. 2566 (Delete_Finalize_Address): Removed. 2567 (Delete_Finalize_Address_Unprotected): New routine. 2568 (Detach): Synchronize and call the unprotected version. 2569 (Detach_Unprotected): Remove locking. 2570 (Finalize): Add various comment on synchronization. Lock the critical 2571 region and call the unprotected versions of routines. 2572 (Finalize_Address): Removed. 2573 (Finalize_Address_Unprotected): New routine. 2574 (Set_Finalize_Address): Synchronize and call 2575 the unprotected version. 2576 (Set_Finalize_Address_Unprotected): New routine. 2577 (Set_Heterogeneous_Finalize_Address): Removed. 2578 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine. 2579 (Set_Is_Heterogeneous): Add comment on synchronization and 2580 locking. 2581 * s-finmas.ads: Flag Finalization_Started is no longer atomic 2582 because synchronization uses task locking / unlocking. 2583 (Attach): Add comment on usage. 2584 (Attach_Unprotected): New routine. 2585 (Delete_Finalize_Address): Renamed to 2586 Delete_Finalize_Address_Unprotected. 2587 (Detach): Add comment on usage. 2588 (Detach_Unprotected): New routine. 2589 (Finalize_Address): Renamed to Finalize_Address_Unprotected. 2590 (Set_Finalize_Address): Add comment on usage. 2591 (Set_Finalize_Address_Unprotected): New routine. 2592 (Set_Heterogeneous_Finalize_Address): Renamed to 2593 Set_Heterogeneous_Finalize_Address_Unprotected. 2594 * s-stposu.adb (Allocate_Any_Controlled): Add local variable 2595 Allocation_Locked. Add various comments on synchronization. Lock 2596 the critical region and call the unprotected version of 2597 routines. 2598 (Deallocate_Any_Controlled): Add various comments on 2599 synchronization. Lock the critical region and call the unprotected 2600 version of routines. 2601 26022011-10-24 Ed Schonberg <schonberg@adacore.com> 2603 2604 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type 2605 are universal and must carry the corresponding type. 2606 * sem_eval.adb (Check_Non_Static_Context): If the type of the 2607 expression is universal real, as may be the case for a fixed point 2608 expression with constant operands in the context of a conversion, 2609 there is nothing to check. 2610 * s-finmas.adb: Minor reformatting 2611 26122011-10-23 Eric Botcazou <ebotcazou@adacore.com> 2613 2614 * gcc-interface/decl.c (create_concat_name): Add explicit cast. 2615 26162011-10-20 Eric Botcazou <ebotcazou@adacore.com> 2617 2618 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND, 2619 TRACE): Reintroduce. 2620 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o, 2621 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules. 2622 26232011-10-20 Eric Botcazou <ebotcazou@adacore.com> 2624 2625 * gcc-interface/trans.c (lhs_or_actual_p): New predicate. 2626 (unchecked_conversion_nop): Use it. 2627 (gnat_to_gnu): Likewise. 2628 26292011-10-20 Eric Botcazou <ebotcazou@adacore.com> 2630 2631 * back_end.adb (Call_Back_End): Pass the maximum logical line number 2632 instead of the maximum physical line number to gigi. 2633 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero. 2634 26352011-10-16 Tom Tromey <tromey@redhat.com> 2636 Dodji Seketeli <dodji@redhat.com> 2637 2638 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new 2639 public ordinary map interface. 2640 26412011-10-16 Tristan Gingold <gingold@adacore.com> 2642 2643 * link.c (_AIX): Add support for GNU ld. 2644 26452011-10-16 Fedor Rybin <frybin@adacore.com> 2646 2647 * gnat_ugn.texi: Fixing gnattest example names in the doc. 2648 Adding explanation to additional tests usage. 2649 26502011-10-16 Robert Dewar <dewar@adacore.com> 2651 2652 * exp_ch6.adb, sem_ch6.adb: Minor reformatting. 2653 26542011-10-16 Eric Botcazou <ebotcazou@adacore.com> 2655 2656 * a-convec.adb: Fix minor inconsistencies. 2657 26582011-10-16 Matthew Heaney <heaney@adacore.com> 2659 2660 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package 2661 Implementation): Specify pragma Implementation_Defined. 2662 26632011-10-15 Nicolas Roche <roche@adacore.com> 2664 2665 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using 2666 either rtp-smp or ravenscar-cert-rtp runtimes. 2667 26682011-10-15 Bob Duff <duff@adacore.com> 2669 2670 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): 2671 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr 2672 is available. 2673 (Expand_N_Extended_Return_Statement): Do not create a renaming of the 2674 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is 2675 available. 2676 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined 2677 pool only if RE_Root_Storage_Pool_Ptr is available. 2678 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a 2679 pool actual unless RE_Root_Storage_Pool_Ptr is available. 2680 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool 2681 formal only if RE_Root_Storage_Pool_Ptr is available. 2682 26832011-10-15 Matthew Heaney <heaney@adacore.com> 2684 2685 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue 2686 type): Specify Priority aspect for protected type. 2687 26882011-10-14 Ed Schonberg <schonberg@adacore.com> 2689 2690 * exp_disp.adb (Check_Premature_Freezing): If an untagged type 2691 is a generic actual, it is a subtype of a type that was frozen 2692 by the instantiation, and even if not marked frozen it does not 2693 affect the construction of the dispatch table. 2694 26952011-10-14 Robert Dewar <dewar@adacore.com> 2696 2697 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code 2698 reformatting. 2699 * s-rident.ads: Add missing Compiler_Unit pragma. 2700 27012011-10-14 Gary Dismukes <dismukes@adacore.com> 2702 2703 * sem_res.adb: Minor reformatting. 2704 27052011-10-14 Hristian Kirtchev <kirtchev@adacore.com> 2706 2707 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): 2708 Code and comment reformatting. Use BIP_Task_Master 2709 when creating a _master. 2710 (BIP_Formal_Suffix): Code reformatting. Correct the case for 2711 BIP_Task_Master. 2712 (Make_Build_In_Place_Call_In_Object_Declaration): Use 2713 BIP_Task_Master when creating a reference to the enclosing 2714 function's _master formal. 2715 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference 2716 to the _master. 2717 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master. 2718 (Needs_BIP_Finalization_Master): Alphabetized. 2719 * sem_ch6.adb (Create_Extra_Formals): Update the usage of 2720 BIP_Task_Master. 2721 27222011-10-14 Ed Schonberg <schonberg@adacore.com> 2723 2724 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode, 2725 reject an aliased keyword on the object declaration of an extended 2726 return statement. In older versions of the language indicate 2727 that this is illegal in the standard. 2728 27292011-10-14 Pascal Obry <obry@adacore.com> 2730 2731 * sem_util.adb, sem_ch4.adb: Minor reformatting. 2732 27332011-10-14 Ed Schonberg <schonberg@adacore.com> 2734 2735 * sem_ch13.adb: Recognize properly procedure calls that are 2736 transformed into code statements. 2737 27382011-10-14 Vincent Celier <celier@adacore.com> 2739 2740 * projects.texi: Minor fix in project example. 2741 27422011-10-14 Ed Schonberg <schonberg@adacore.com> 2743 2744 * sem_util.adb: Return objects are aliased if their type is 2745 immutably limited as per AI05-0053. 2746 27472011-10-14 Gary Dismukes <dismukes@adacore.com> 2748 2749 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or 2750 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove 2751 Short_Circuit_And_Or expansion code (moved to sem_res). 2752 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean 2753 "and" and "or" operators as short-circuit "and then" and "or 2754 else", when pragma Short_Circuit_And_Or is active. 2755 27562011-10-13 Robert Dewar <dewar@adacore.com> 2757 2758 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb, 2759 sem_ch6.adb, exp_ch3.adb: Minor reformatting. 2760 27612011-10-13 Arnaud Charlet <charlet@adacore.com> 2762 2763 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o. 2764 27652011-10-13 Jerome Guitton <guitton@adacore.com> 2766 2767 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads 2768 27692011-10-13 Eric Botcazou <ebotcazou@adacore.com> 2770 2771 * a-convec.ads (Cursor): Minor reformatting. 2772 * a-convec.adb (Next): Fix minor inconsistencies. 2773 (Previous): Likewise. 2774 27752011-10-13 Ed Schonberg <schonberg@adacore.com> 2776 2777 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component): 2778 New predicate to determine whether some operations on an array 2779 type are available when the full view of its component may differ 2780 from the view of the point of the array declaration. 2781 * sem_ch4.adb (Find_Equality_Types): Use 2782 Available_Full_View_Of_Component. 2783 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto 2784 27852011-10-13 Ed Schonberg <schonberg@adacore.com> 2786 2787 * sem_ch9.adb: Analyze aspects while discriminants of protected 2788 type are visible. 2789 27902011-10-13 Geert Bosch <bosch@adacore.com> 2791 2792 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add 2793 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no 2794 longer depend on an external library. 2795 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove 2796 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o. 2797 Update dependencies. 2798 * gcc-interface/Make-lang.in: Update dependencies. 2799 28002011-10-13 Cyrille Comar <comar@adacore.com> 2801 2802 * gnat_ugn.texi: Minor editing. 2803 28042011-10-13 Vincent Celier <celier@adacore.com> 2805 2806 * projects.texi: Add documentation on packages and attributes 2807 that are inherited from a project being extended into the 2808 extended project. 2809 28102011-10-13 Hristian Kirtchev <kirtchev@adacore.com> 2811 2812 * exp_ch3.adb (Build_Master): Rewritten. 2813 (Expand_N_Full_Type_Declaration): Reformat the declarative 2814 region. Update the call to Build_Master_Renaming. 2815 (Expand_Previous_Access_Type): Rewritten. 2816 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): 2817 Add local constant Result_Subt and update related usage. 2818 (Expand_N_Extended_Return_Statement): Add local constant 2819 Result_Subt and update related usage. 2820 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the 2821 new context detection mechanism. 2822 (Build_Class_Wide_Master): 2823 Use Insert_Action to add the renaming into the tree. 2824 (Build_Master_Entity): Rewritten to use the new context detection 2825 mechanism. 2826 (Build_Master_Renaming): Add formal parameter Ins_Nod 2827 and related usage. Use Insert_Action to add the renaming into the 2828 tree. 2829 (Find_Enclosing_Context): New subsidiary routine. Rather 2830 than relying on enclosing scopes, this routine looks at the 2831 tree structure to figure out the proper context for a _master 2832 or a _chain. This approach eliminates the issues with transient 2833 scopes which have not been converted into blocks. 2834 * exp_ch9.ads (Build_Master_Entity): Change parameter profile 2835 to better reflect the new usage. Update the related comment. 2836 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update 2837 the comment on usage. 2838 * sem_ch3.adb (Access_Definition): Update the calls to 2839 Build_Master_Entity and Build_Master_Renaming. 2840 * sem_ch6.adb (Create_Extra_Formals): Add local variable 2841 Full_Subt. Code reformatting. 2842 * sem_util.adb (Is_Iterator): Alphabetized. 2843 (Is_LHS): Alphabetized. 2844 (Is_Limited_Class_Wide_Type): New routine. 2845 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine. 2846 28472011-10-13 Geert Bosch <bosch@adacore.com> 2848 2849 * a-ngrear.adb (Solve): Make generic and move to 2850 System.Generic_Array_Operations. 2851 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution): 2852 New generic solvers to compute a vector resp. matrix Y such 2853 that A * Y = X, approximately. 2854 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution): 2855 Implement using Forward_Eliminate and Back_Substitute 2856 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies 2857 on BLAS and LAPACK. 2858 * a-ngcoar.ads ("abs"): Fix return type to be real. 2859 28602011-10-13 Eric Botcazou <ebotcazou@adacore.com> 2861 2862 PR ada/50589 2863 * s-linux-alpha.ads: Do not "with" Interfaces.C. 2864 * s-linux-sparc.ads: Likewise. 2865 28662011-10-13 Geert Bosch <bosch@adacore.com> 2867 2868 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function 2869 returning a Real. 2870 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function 2871 and use formal. 2872 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for 2873 new profile. 2874 28752011-10-13 Geert Bosch <bosch@adacore.com> 2876 2877 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and 2878 move to System.Generic_Array_Operations. 2879 28802011-10-13 Geert Bosch <bosch@adacore.com> 2881 2882 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic 2883 * s-gearop.ads (L2_Norm): Change profile to be suitable for 2884 Complex_Vector 2885 * s-gearop.adb (L2_Norm): Reimplement using direct definition, 2886 not inner product 2887 28882011-10-13 Robert Dewar <dewar@adacore.com> 2889 2890 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb, 2891 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb, 2892 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb, 2893 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, 2894 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads, 2895 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting. 2896 28972011-10-13 Geert Bosch <bosch@adacore.com> 2898 2899 * s-gearop.adb: Minor comment additions. 2900 29012011-10-13 Fedor Rybin <frybin@adacore.com> 2902 2903 * gnat_ugn.texi: Add gnattest section. 2904 29052011-10-13 Ed Schonberg <schonberg@adacore.com> 2906 2907 * freeze.adb: Do not create body of renaming if declaration has 2908 errors. 2909 29102011-10-13 Olivier Hainque <hainque@adacore.com> 2911 2912 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls 2913 further, to the ppc+kernel case only. 2914 29152011-10-13 Hristian Kirtchev <kirtchev@adacore.com> 2916 2917 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting. 2918 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): 2919 Do not create a pool formal on .NET/JVM. 2920 (Expand_N_Extended_Return_Statement): Alphabetize local 2921 variables. Do not create a renaming of the build-in-place pool 2922 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator): 2923 Add the user-defined pool only on non-VM targets. 2924 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize 2925 local variables. Do not add a pool actual on .NET/JVM. 2926 * sem_ch6.adb: Add with and use clause for Targparm. 2927 (Create_Extra_Formals): Add build-in-place pool formal only on 2928 non-VM targets. 2929 * rtsfind.ads: Alphabetize entries. 2930 29312011-10-13 Sergey Rybin <rybin@adacore.com> 2932 2933 * gnat_ugn.texi: Minor correction. 2934 29352011-10-13 Ed Schonberg <schonberg@adacore.com> 2936 2937 * sem_ch8.adb: Minor error message improvement. 2938 29392011-10-13 Robert Dewar <dewar@adacore.com> 2940 2941 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting. 2942 29432011-10-13 Gary Dismukes <dismukes@adacore.com> 2944 2945 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation 2946 of a for loop for an enumeration type with an enumeration rep 2947 clause, which involves moving the original loop parameter into 2948 a nested block, the loop parameter's entity must be removed from 2949 the entity list of the loop scope. 2950 29512011-10-13 Bob Duff <duff@adacore.com> 2952 2953 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter" 2954 that gets passed in the same cases where BIP_Alloc_Form is passed 2955 (caller-unknown-size results). BIP_Storage_Pool is used when 2956 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer 2957 to the user-defined storage pool is passed at the call site, 2958 and this pool is used in callee to allocate the result. 2959 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New 2960 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes 2961 the additional BIP_Storage_Pool actual. 2962 (Expand_N_Extended_Return_Statement): Allocate the function 2963 result using the user-defined storage pool, if BIP_Alloc_Form = 2964 User_Storage_Pool. 2965 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool. 2966 * exp_ch4.adb: Don't overwrite storage pool set by 2967 Expand_N_Extended_Return_Statement. 2968 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type, 2969 for use in build-in-place function calls within allocators 2970 where the access type has a user-defined storage pool. 2971 29722011-10-13 Sergey Rybin <rybin@adacore.com> 2973 2974 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration 2975 literal casing. 2976 29772011-10-13 Nicolas Roche <roche@adacore.com> 2978 2979 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends 2980 with 'rtp'. 2981 29822011-10-13 Ed Schonberg <schonberg@adacore.com> 2983 2984 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into 2985 account that an unchecked union type can be limited. 2986 29872011-10-13 Olivier Hainque <hainque@adacore.com> 2988 2989 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on 2990 the use of the signal trampoline for PPC in the sjlj case as well. 2991 Add legitimate casts, preventing compile time warnings on the 2992 (sighandler *) profile. 2993 29942011-10-13 Yannick Moy <moy@adacore.com> 2995 2996 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis 2997 in Alfa mode. 2998 29992011-10-13 Ed Schonberg <schonberg@adacore.com> 3000 3001 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case 3002 expressions are legal limited return values if each one of their 3003 dependent expressions are legal. 3004 30052011-10-13 Ed Schonberg <schonberg@adacore.com> 3006 3007 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode, 3008 if the prefix of the call is a qualified expression, rewrite as 3009 a code statement. 3010 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the 3011 code statement is legal if it is a rewriting of a procedure call. 3012 30132011-10-13 Ed Schonberg <schonberg@adacore.com> 3014 3015 * exp_aggr.adb (Flatten): If a component association has a box, 3016 assume that aggregate is not static. 3017 (Safe_Aggregate): If a component association in a non-limited 3018 aggregate has a box, assume that it cannot be expanded in place. 3019 30202011-10-13 Vincent Celier <celier@adacore.com> 3021 3022 * prj-conf.adb (Get_Or_Create_Configuration_File): Call 3023 Process_Project_Tree_Phase_1 with Packages_To_Check. 3024 (Process_Project_And_Apply_Config): Ditto 3025 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse): 3026 Remove default for argument Packages_To_Check. 3027 * prj-proc.adb (Recursive_Process): New argument 3028 Packages_To_Check. 3029 (Process): Ditto. 3030 (Process_Project_Tree_Phase_1): Ditto. 3031 (Recursive_Project.Process_Aggregated_Projects): Call 3032 Prj.Part.Parse and Process_Project_Tree_Phase_1 with 3033 Packages_To_Check. 3034 * prj-proc.ads (Process): New argument Packages_To_Check 3035 (Process_Project_Tree_Phase_1): Ditto 3036 30372011-10-13 Arnaud Charlet <charlet@adacore.com> 3038 3039 * gcc-interface/Makefile.in: Fix typo. 3040 30412011-10-13 Ed Schonberg <schonberg@adacore.com> 3042 3043 * sem_ch12.adb (Analyze_Formal_{Floating_Type, 3044 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}): 3045 Use sloc of defining identifier of farmal type declaration, 3046 as sloc of generated internal entity, to prevent misplaced 3047 references in ali. 3048 30492011-10-13 Ed Schonberg <schonberg@adacore.com> 3050 3051 * sem_intr.adb (Check_Intrinsic_Operator): Check that type 3052 is fully defined before checking that it is a numeric type. 3053 30542011-10-13 Ed Schonberg <schonberg@adacore.com> 3055 3056 * sem_aggr.adb (Resolve_Record_Aggregate): If a component 3057 association for component X has a box, then X is covered in the 3058 aggregate even if there is not default value for X in the type 3059 declaration, and X has to be default-initialized. 3060 30612011-10-13 Ed Schonberg <schonberg@adacore.com> 3062 3063 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark 3064 literals as referenced only if reference is in current source unit. 3065 30662011-10-13 Matthew Heaney <heaney@adacore.com> 3067 3068 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries. 3069 30702011-10-13 Olivier Hainque <hainque@adacore.com> 3071 3072 * sigtramp.h: New file. Prototype and spec of the signal 3073 trampoline to be called by an established handler to provide 3074 dwarf call frame info before the real signal processing code. 3075 * sigtramp-ppcvxw.c: New file. Implementation of the signal 3076 trampoline for ppc-vxworks. 3077 * init.c (vxworks section): Use it for ppc. 3078 30792011-10-13 Thomas Quinot <quinot@adacore.com> 3080 3081 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb 3082 (Check_Future_Identifier): New subprogram, 3083 factors duplicated code from Par.Ch2.P_Identifier and 3084 Par.Ch3.P_Defining_Identifier. 3085 30862011-10-13 Thomas Quinot <quinot@adacore.com> 3087 3088 * s-taprop-posix.adb (Initialize): Always raise Storage_Error 3089 if we fail to initialize CV attributes or CV. 3090 30912011-10-13 Thomas Quinot <quinot@adacore.com> 3092 3093 * s-tasren.adb (Timed_Selective_Wait, case 3094 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since 3095 we know abortion is already deferred. 3096 30972011-10-13 Hristian Kirtchev <kirtchev@adacore.com> 3098 3099 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9. 3100 (Build_Master_Renaming (function)): Removed. 3101 (Build_Master_Renaming (procedure)): Moved to exp_ch9. 3102 (Expand_Full_Type_Declaration): Alphabetize 3103 variables. Reformatting of code and comments. Rewrite the 3104 section on processing of anonymous access-to-task types in 3105 record components. 3106 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9. 3107 (Build_Master_Renaming): Moved to exp_ch9. 3108 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3. 3109 (Build_Master_Entity): Add formal parameter 3110 Use_Current. Reformatting of code and comments. 3111 (Build_Master_Renaming): Moved from exp_ch3. 3112 * exp_ch9.ads (Build_Class_Wide_Master): Moved from 3113 exp_ch3. Update comment on usage. 3114 (Build_Master_Entity): 3115 Add formal parameter Use_Current. Update comment on usage. 3116 (Build_Master_Renaming): Moved from exp_ch3. 3117 * sem_ch3.adb (Access_Definition): Remove redundant code to 3118 create a _master and a renaming. 3119 31202011-10-13 Ed Schonberg <schonberg@adacore.com> 3121 3122 * lib-xref.adb: Do no emit reference to overridden operation, 3123 if it is internally generated. 3124 31252011-10-13 Vincent Celier <celier@adacore.com> 3126 3127 * bindgen.adb: Remove any processing related to g-trasym 3128 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS 3129 * mlib-prj.adb: Remove any processing related to g-trasym. 3130 31312011-10-12 Eric Botcazou <ebotcazou@adacore.com> 3132 3133 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning. 3134 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New. 3135 (ALL_ADAFLAGS): Include WARN_ADAFLAGS. 3136 (ADA_FLAGS_TO_PASS): Likewise. 3137 (COMMON_FLAGS_TO_PASS): New. 3138 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular 3139 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS. 3140 (gnatlib): Use COMMON_FLAGS_TO_PASS. 3141 (ada.install-common): Likewise. 3142 (install-gnatlib): Likewise. 3143 (install-gnatlib-obj): Likewise. 3144 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well. 3145 (gnat-cross): Delete. 3146 (gnatboot): Likewise. 3147 (gnatboot2): Likewise. 3148 (gnatboot3): Likewise. 3149 (gnatstage1): Likewise. 3150 (gnatstage2): Likewise. 3151 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise. 3152 (MOST_ADAFLAGS): Likewise. 3153 (LOOSE_CFLAGS): Likewise. 3154 (gnat-cross): Likewise. 3155 (GNATLIBFLAGS): Add -W -Wall. 3156 (GNATLIBCFLAGS_FOR_C): Likewise. 3157 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines. 3158 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases. 3159 31602011-10-12 Eric Botcazou <ebotcazou@adacore.com> 3161 3162 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions. 3163 (push_range_check_info): Likewise. 3164 (gnat_to_gnu) <N_Code_Statement>: Likewise. 3165 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise. 3166 (gnat_invariant_expr): Likewise. 3167 * gcc-interface/utils.c (compute_related_constant): Likewise. 3168 (max_size): Fix handling of SAVE_EXPR. 3169 (remove_conversions): Fix formatting. 3170 31712011-10-12 Eric Botcazou <ebotcazou@adacore.com> 3172 3173 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag. 3174 (DECL_INDUCTION_VAR): New macro. 3175 (SET_DECL_INDUCTION_VAR): Likewise. 3176 * gcc-interface/gigi.h (convert_to_index_type): Declare. 3177 (gnat_invariant_expr): Likewise. 3178 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop 3179 parameter, set DECL_LOOP_PARM_P on it. 3180 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P 3181 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT. 3182 * gcc-interface/trans.c (gnu_loop_label_stack): Delete. 3183 (struct range_check_info_d): New type. 3184 (struct loop_info_d): Likewise. 3185 (gnu_loop_stack): New stack. 3186 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference 3187 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P 3188 is set, do not test DECL_RENAMED_OBJECT. 3189 (push_range_check_info): New function. 3190 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just 3191 the label. Reference the label and the iteration variable from it. 3192 Build the special induction variable in the unsigned version of the 3193 size type, if it is larger than the base type. And attach it to the 3194 iteration variable if the latter isn't by-ref. In the iteration scheme 3195 case, initialize the invariant conditions in front of the loop if 3196 deemed profitable. Use gnu_loop_stack. 3197 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack. 3198 <N_Raise_Constraint_Error>: Always process the reason. In the range 3199 check and related cases, and if loop unswitching is enabled, compute 3200 invariant conditions and push this information onto the stack. 3201 Do not translate again the condition if it has been already translated. 3202 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that 3203 DECL_LOOP_PARM_P isn't set. 3204 (convert_to_index_type): New function. 3205 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order 3206 to convert the index from the base index type to sizetype. 3207 (gnat_invariant_expr): New function. 3208 32092011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com> 3210 3211 * gcc-interface/utils.c (def_builtin_1): Delete old interface with 3212 two parallel arrays to hold standard builtin declarations, and 3213 replace it with a function based interface that can support 3214 creating builtins on the fly in the future. 3215 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto. 3216 (gnat_to_gnu): Ditto. 3217 32182011-10-07 Eric Botcazou <ebotcazou@adacore.com> 3219 3220 PR lto/50492 3221 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment. 3222 * gcc-interface/utils.c (global_context): New variable. 3223 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs 3224 that are either public external or at top level. Use "No" macro. 3225 (end_subprog_body): Call decl_function_context. 3226 (rest_of_subprog_body_compilation): Likewise. 3227 32282011-10-07 Eric Botcazou <ebotcazou@adacore.com> 3229 3230 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare. 3231 (rest_of_subprog_body_compilation): Likewise. 3232 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming, 3233 test for useless conversions by means of gnat_useless_type_conversion. 3234 * gcc-interface/trans.c: Include bitmap.h and cgraph.h. 3235 (language_function): Add named_ret_val and other_ret_val. 3236 (f_named_ret_val): New macro. 3237 (f_other_ret_val): Likewise. 3238 (gigi): Call rest_of_subprog_body_compilation. 3239 (struct nrv_data): New structure. 3240 (is_nrv_p): New predicate. 3241 (prune_nrv_r): New helper function. 3242 (prune_nrv_in_block): New function. 3243 (finalize_nrv_r): New helper function. 3244 (finalize_nrv): New function. 3245 (return_value_ok_for_nrv_p): New predicate. 3246 (build_return_expr): If optimization is enabled, record candidates for 3247 the Named Return Value optimization. 3248 (build_function_stub): Call rest_of_subprog_body_compilation. 3249 (Subprogram_Body_to_gnu): If optimization is enabled and there are 3250 candidates, finalize the Named Return Value optimization. 3251 Call rest_of_subprog_body_compilation. 3252 (call_to_gnu): At the end, if a return value is needed, simplify the 3253 result before wrapping it up in a COMPOUND_EXPR. 3254 * gcc-interface/utils.c (end_subprog_body): Split into... 3255 (rest_of_subprog_body_compilation): ...this. New function. 3256 (gnat_useless_type_conversion): Likewise. 3257 32582011-10-06 Thomas Quinot <quinot@adacore.com> 3259 3260 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, 3261 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb, 3262 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb, 3263 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb, 3264 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, 3265 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb, 3266 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting. 3267 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD. 3268 32692011-10-06 Ed Schonberg <schonberg@adacore.com> 3270 3271 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container 3272 references. 3273 32742011-10-06 Matthew Heaney <heaney@adacore.com> 3275 3276 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb 3277 (Dequeue_Only_High_Priority): Protected procedure now implemented. 3278 32792011-10-06 Vincent Celier <celier@adacore.com> 3280 3281 * g-trasym.adb: Replace old implementation with the default 3282 implementation that returns list of addresses as "0x...". 3283 * g-trasym.ads: Update the list of platforms with the full 3284 capability. Indicate that there is a default implementation 3285 for other platforms. 3286 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove. 3287 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there 3288 is now a default implementation for all platforms without the full 3289 capability. 3290 32912011-10-06 Robert Dewar <dewar@adacore.com> 3292 3293 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb, 3294 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb, 3295 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code 3296 reorganization (use conditional expressions). 3297 32982011-10-06 Robert Dewar <dewar@adacore.com> 3299 3300 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for 3301 floating divide by zero. 3302 33032011-10-06 Ed Schonberg <schonberg@adacore.com> 3304 3305 * sem_ch6.adb: Limited interfaces that are not immutably limited 3306 are OK in return statements. 3307 33082011-09-30 Iain Sandoe <iains@gcc.gnu.org> 3309 3310 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous 3311 change to powerpc section. 3312 33132011-09-29 Iain Sandoe <iains@gcc.gnu.org> 3314 3315 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS 3316 across the port. 3317 33182011-09-27 Ed Schonberg <schonberg@adacore.com> 3319 3320 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads, 3321 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads, 3322 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and 3323 indefinite sets. 3324 * a-coorma.ads: Minor reformmating. 3325 * einfo.ads: Improve the comment describing the 3326 Directly_Designated_Type function. 3327 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite 3328 ordered maps. 3329 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update 3330 dependencies. 3331 33322011-09-27 Robert Dewar <dewar@adacore.com> 3333 3334 * a-comutr.ads: Minor reformatting. 3335 33362011-09-27 Ed Schonberg <schonberg@adacore.com> 3337 3338 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children 3339 iterators to multiway trees. 3340 33412011-09-27 Yannick Moy <moy@adacore.com> 3342 3343 * debug.adb (d.D): New option for strict Alfa mode. 3344 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler 3345 permissions as strictly as possible. 3346 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict 3347 Alfa mode, now, interpret ranges of base types like GNAT does; in 3348 strict mode, simply change the range of the implicit base Itype. 3349 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode. 3350 33512011-09-27 Robert Dewar <dewar@adacore.com> 3352 3353 * exp_ch9.adb: Minor comment fixes. 3354 33552011-09-27 Ed Schonberg <schonberg@adacore.com> 3356 3357 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway 3358 trees. 3359 33602011-09-27 Eric Botcazou <ebotcazou@adacore.com> 3361 3362 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type 3363 instead of Directly_Designated_Type in the indirect array case. 3364 33652011-09-27 Robert Dewar <dewar@adacore.com> 3366 3367 * exp_util.adb, exp_aggr.adb: Minor reformatting. 3368 33692011-09-27 Ed Schonberg <schonberg@adacore.com> 3370 3371 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification 3372 on subtype declarations. 3373 * exp_aggr.adb: Minor comment update. 3374 33752011-09-27 Eric Botcazou <ebotcazou@adacore.com> 3376 3377 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false 3378 test in the N_Explicit_Dereference case. Fold double logical 3379 negation in the special loop case and conditionalize it on 3380 Variable_Ref being true. 3381 33822011-09-27 Ed Schonberg <schonberg@adacore.com> 3383 3384 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a 3385 single protected object and the selector is a discriminant or an 3386 entry family, this is a non-overloaded candidate interpretation, 3387 and possible primitive operations of the type must not be 3388 examined. 3389 33902011-09-27 Arnaud Charlet <charlet@adacore.com> 3391 3392 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased. 3393 33942011-09-27 Pascal Obry <obry@adacore.com> 3395 3396 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads, 3397 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads: 3398 Add dummy definitions for pthread_rwlock_t 3399 and pthread_rwlockattr_t on all POSIX platforms. 3400 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock 3401 reference. 3402 (Finalize_Lock): Likewise. 3403 (Write_Lock): Likewise. 3404 (Unlock): Likewise. 3405 34062011-09-27 Tristan Gingold <gingold@adacore.com> 3407 3408 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for 3409 windows 64. 3410 34112011-09-27 Pascal Obry <obry@adacore.com> 3412 3413 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads, 3414 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads, 3415 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads, 3416 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads, 3417 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads, 3418 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads, 3419 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads, 3420 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb, 3421 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb, 3422 s-taprop-posix.adb: Revert previous changes. 3423 (Lock): Now a record containing the two possible lock 3424 (mutex and read/write) defined in OS_Interface. 3425 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for 3426 'R' locking policy. 3427 (Initialize_Protection): Likewise. 3428 (Lock): Likewise. 3429 (Lock_Read_Only): Likewise. 3430 (Unlock): Likewise. 3431 34322011-09-27 Pascal Obry <obry@adacore.com> 3433 3434 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as 3435 OS_Interface.pthread_rwlock_t. 3436 34372011-09-27 Robert Dewar <dewar@adacore.com> 3438 3439 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb, 3440 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads, 3441 sem_ch5.adb, sem_util.adb: Minor reformatting. 3442 34432011-09-27 Pascal Obry <obry@adacore.com> 3444 3445 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock. 3446 (Finalize_Lock)[RW_Lock]: Likewise. 3447 (Write_Lock)[RW_Lock]: Likewise. 3448 (Unlock)[RW_Lock]: Likewise. 3449 (Read_Lock): Define L as RW_Lock (instead of Lock). 3450 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New 3451 routine for r/w lock. 3452 (Finalize_Lock)[RW_Lock]: Likewise. 3453 (Write_Lock)[RW_Lock]: Likewise. 3454 (Unlock)[RW_Lock]: Likewise. 3455 (Read_Lock): Define L as RW_Lock (instead of Lock). 3456 3457 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb, 3458 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb, 3459 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb 3460 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding 3461 routine for standard lock. 3462 (Finalize_Lock)[RW_Lock]: Likewise. 3463 (Write_Lock)[RW_Lock]: Likewise. 3464 (Unlock)[RW_Lock]: Likewise. 3465 (Read_Lock): Define L as RW_Lock (instead of Lock). 3466 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock) 3467 in the record definition. 3468 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w 3469 lock for 'R' locking policy. 3470 (Initialize_Protection): Likewise. 3471 (Lock): Likewise. 3472 (Lock_Read_Only): Likewise. 3473 (Unlock): Likewise. 3474 * s-taspri-posix.ads (RW_Lock): New type defined as 3475 OS_Interface.pthread_rwlock_t. 3476 3477 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads, 3478 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads, 3479 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads, 3480 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock. 3481 34822011-09-27 Pascal Obry <obry@adacore.com> 3483 3484 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting. 3485 34862011-09-27 Pascal Obry <obry@adacore.com> 3487 3488 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads, 3489 s-osinte-hpux.ads, s-osinte-irix.ads, 3490 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of 3491 pthread_mutex_t. 3492 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t. 3493 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t, 3494 pthread_rwlockattr_init, pthread_rwlockattr_destroy, 3495 pthread_rwlockattr_setkind_np, pthread_rwlock_init, 3496 pthread_rwlock_destroy, pthread_rwlock_rdlock, 3497 pthread_rwlock_wrlock, pthread_rwlock_unlock): New. 3498 34992011-09-27 Pascal Obry <obry@adacore.com> 3500 3501 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry. 3502 (RE_Id): Add RE_Lock_Read_Only. 3503 (RE_Unit_Table): Likewise. 3504 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy 3505 to lift restriction on first character. Handle now the 3506 Name_Concurrent_Readers_Locking where policy character is set to 3507 'R'. 3508 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New 3509 constant. 3510 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a 3511 read only lock for function in protected object. 3512 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as 3513 this routine is now used. 3514 35152011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 3516 3517 * s-atocou-x86.adb (Decrement): Use %;. 3518 (Increment): Likewise. 3519 35202011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3521 3522 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the 3523 dereference of the pointer to the storage area. Remove useless type 3524 conversions and factor out common code. 3525 35262011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3527 3528 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local 3529 variable and use it throughout. 3530 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end. 3531 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a 3532 first step. Also convert to the unpadded type as a last step. 3533 35342011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3535 3536 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with 3537 DECL_CHAIN in comment. 3538 * gcc-interface/trans.c (gigi): Likewise. 3539 (Attribute_to_gnu): Likewise. 3540 (build_function_stub): Likewise. 3541 (gnat_to_gnu): Likewise. 3542 * gcc-interface/utils.c (create_subprog_decl): Likewise. 3543 (convert_vms_descriptor64): Likewise. 3544 (convert_vms_descriptor32): Likewise. 3545 35462011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3547 3548 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks. 3549 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting 3550 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if 3551 the type of the record is TYPE_READONLY. 3552 35532011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3554 Robert Dewar <dewar@adacore.com> 3555 3556 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN 3557 OUT formal parameter which is of an null-exclusion access subtype. 3558 35592011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3560 3561 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro. 3562 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag. 3563 (gnat_to_gnu_param): Likewise. 3564 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke 3565 maybe_unconstrained_array instead of doing the work manually. 3566 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag. 3567 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand 3568 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference. 3569 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag. 3570 (gnat_stabilize_reference): Likewise. 3571 35722011-09-26 Eric Botcazou <ebotcazou@adacore.com> 3573 3574 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro. 3575 (SET_TYPE_NULL_BOUNDS): Likewise. 3576 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again 3577 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template. 3578 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat 3579 pointer types. 3580 * gcc-interface/utils.c (create_var_decl_1): If the object is external, 3581 check that the initializer is a valid constant expression for use in 3582 initializing a static variable. Add missing guard. 3583 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set. 3584 (convert_to_fat_pointer): In the null fat pointer case, build a valid 3585 pointer for the bounds. 3586 * gcc-interface/utils2.c (compare_fat_pointers): New function. 3587 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers. 3588 35892011-09-25 Eric Botcazou <ebotcazou@adacore.com> 3590 3591 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine. 3592 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in 3593 the by-ref case. Do not set TREE_READONLY on a renamed object. Set 3594 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes. 3595 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache 3596 to the indirect case. 3597 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve 3598 the TREE_THIS_NOTRAP flag. 3599 36002011-09-25 Eric Botcazou <ebotcazou@adacore.com> 3601 3602 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an 3603 iteration scheme, always generate the do-while form if optimization 3604 is enabled. Use more straightforward test at the end. 3605 36062011-09-25 Eric Botcazou <ebotcazou@adacore.com> 3607 3608 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use 3609 XNEW instead of xmalloc. Do not build useless pointer type. 3610 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc. 3611 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy. 3612 * gcc-interface/utils2.c (build_unary_op): Remove local variable. 3613 36142011-09-25 Eric Botcazou <ebotcazou@adacore.com> 3615 3616 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote 3617 the alignment if this doesn't prevent BLKmode access to the object. 3618 36192011-09-24 Iain Sandoe <iains@gcc.gnu.org> 3620 3621 * gcc-interface/Makefile.in (darwin): Do not issue the 3622 '-flat_namespace' linker flag during Ada build. 3623 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the 3624 default shared library options. 3625 36262011-09-19 Alexandre Oliva <aoliva@redhat.com> 3627 3628 * gcc-interface/decl.c (annotate_value): Look up expression for 3629 insertion in the cache at the end. 3630 36312011-09-19 Arnaud Charlet <charlet@adacore.com> 3632 3633 * gcc-interface/Make-lang.in: Update dependencies. 3634 36352011-09-19 Steve Baird <baird@adacore.com> 3636 3637 * snames.ads-tmpl: Move declaration of Name_Annotate into range of 3638 configuration pragma names so that Is_Configuration_Pragma_Name 3639 will return True for Name_Annotate. Make corresponding change in 3640 Pragma_Id enumeration type. This is needed to allow an Annotate 3641 pragma to occur in a configuration pragma file (typically, 3642 a gnat.adc file). 3643 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas. 3644 * gnat_rm.texi: Note that pragma Annotate may be used as a 3645 configuration pragma. 3646 36472011-09-19 Ed Schonberg <schonberg@adacore.com> 3648 3649 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads, 3650 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees. 3651 36522011-09-19 Yannick Moy <moy@adacore.com> 3653 3654 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function 3655 for expansion of set membership. 3656 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes. 3657 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure 3658 visible for use in Alfa expansion. 3659 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop 3660 variable in Alfa mode. 3661 36622011-09-19 Thomas Quinot <quinot@adacore.com> 3663 3664 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT. 3665 36662011-09-19 Thomas Quinot <quinot@adacore.com> 3667 3668 * exp_ch9.adb: Minor reformatting. 3669 36702011-09-19 Hristian Kirtchev <kirtchev@adacore.com> 3671 3672 * freeze.adb (Build_Renamed_Body): Generic subprograms 3673 instantiations cannot be poperly inlined by the compiler, do 3674 not set the Body_To_Inline attribute in such cases. 3675 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all 3676 inlining-related flags from the generic subprogram declaration. 3677 36782011-09-19 Thomas Quinot <quinot@adacore.com> 3679 3680 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads 3681 (Build_Stub_Type): Remove, instead copy components from 3682 System.Partition_Interface.RACW_Stub_Type. 3683 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine. 3684 (Copy_Component_List): New subprogram. 3685 36862011-09-19 Yannick Moy <moy@adacore.com> 3687 3688 * lib-xref.adb (Generate_Reference): Ignore references to 3689 constants in Standard. 3690 36912011-09-19 Robert Dewar <dewar@adacore.com> 3692 3693 * err_vars.ads, errout.ads: Minor reformatting. 3694 36952011-09-19 Robert Dewar <dewar@adacore.com> 3696 3697 * aspects.ads (Impl_Defined_Aspects): New array 3698 * lib-writ.adb (No_Dependences): New name for No_Dependence 3699 * restrict.adb (No_Dependences): New name for No_Dependence 3700 (Check_Restriction_No_Specification_Of_Aspect): New 3701 procedure. 3702 (Set_Restriction_No_Specification_Of_Aspect): New procedure 3703 (Restricted_Profile_Result): New variable 3704 (No_Specification_Of_Aspects): New variable 3705 (No_Specification_Of_Aspect_Warning): New variable 3706 * restrict.ads (No_Dependences): New name for No_Dependence 3707 (Check_Restriction_No_Specification_Of_Aspect): New procedure 3708 (Set_Restriction_No_Specification_Of_Aspect): New procedure 3709 * s-rident.ads: Add restriction 3710 No_Implementation_Aspect_Specifications, this is also added to 3711 the No_Implementation_Extensions profile. 3712 * sem_ch13.adb (Analyze_Aspect_Specifications): Check 3713 No_Implementation_Defined_Aspects 3714 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect 3715 * sem_prag.adb (Analyze_Aspect_Specifications): Check 3716 No_Implementation_Aspects 3717 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect 3718 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name 3719 37202011-09-19 Yannick Moy <moy@adacore.com> 3721 3722 * lib-xref.adb (Generate_Reference): Take into account multiple 3723 renamings for Alfa refs. 3724 37252011-09-19 Thomas Quinot <quinot@adacore.com> 3726 3727 * g-socthi-mingw.adb: Minor reformatting. 3728 37292011-09-19 Yannick Moy <moy@adacore.com> 3730 3731 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type 3732 expansion to False in mode Alfa 3733 37342011-09-19 Pascal Obry <obry@adacore.com> 3735 3736 * mingw32.h: Remove obsolete code needed for old versions 3737 of MingW. 3738 37392011-09-19 Robert Dewar <dewar@adacore.com> 3740 3741 * errout.ads: Minor reformatting. 3742 37432011-09-19 Ed Schonberg <schonberg@adacore.com> 3744 3745 * sem_ch6.adb (Analyze_Expression_Function): When the expression 3746 function is transformed into a declaration and a body, insert 3747 body at the end of the declarative part, to prevent premature 3748 freeze actions, and preserve original specification in the 3749 subprogram declaration. 3750 37512011-09-19 Vincent Celier <celier@adacore.com> 3752 3753 * projects.texi: Minor editing. 3754 37552011-09-19 Robert Dewar <dewar@adacore.com> 3756 3757 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb, 3758 exp_aggr.adb: Minor reformatting. 3759 37602011-09-19 Yannick Moy <moy@adacore.com> 3761 3762 * lib-xref.adb (Generate_Reference): Change entity referenced 3763 to underlying object if any, or else reference to the HEAP. 3764 37652011-09-15 Arnaud Charlet <charlet@adacore.com> 3766 3767 * gcc-interface/Make-lang.in: Update dependencies. 3768 37692011-09-15 Robert Dewar <dewar@adacore.com> 3770 3771 * tree_io.ads: Minor reformatting. 3772 * a-intnam.ads: Fix bad header. 3773 37742011-09-15 Thomas Quinot <quinot@adacore.com> 3775 3776 * a-exexpr-gcc.adb: Minor reformatting. 3777 37782011-09-15 Yannick Moy <moy@adacore.com> 3779 3780 * sem_ch6.adb: Propagate information that an expression function comes 3781 from source (otherwise references to this entity are not stored). 3782 37832011-09-15 Robert Dewar <dewar@adacore.com> 3784 3785 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb, 3786 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb, 3787 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting. 3788 37892011-09-15 Ed Schonberg <schonberg@adacore.com> 3790 3791 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup: 3792 if the expression function is not a completion, create a 3793 new specification for the generated declaration, and keep the 3794 original specification in the generated body. Shorter code also 3795 ensures that proper warnings are generated for unused formals 3796 in all cases. 3797 37982011-09-15 Sergey Rybin <rybin@adacore.com> 3799 3800 * tree_io.ads: Update ASIS_Version_Number because of the changes 3801 in the tree structures for expression functions. 3802 38032011-09-15 Arnaud Charlet <charlet@adacore.com> 3804 3805 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads, 3806 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads, 3807 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant. 3808 (CLOCK_REALTIME): Fix wrong value on some OSes. 3809 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC. 3810 38112011-09-11 Eric Botcazou <ebotcazou@adacore.com> 3812 3813 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference 3814 to unconstrained array case, deal with each branch of a COND_EXPR. 3815 * gcc-interface/utils2.c (build_allocator): Deal with each branch of 3816 a COND_EXPR in the initializer, if present. 3817 38182011-09-11 Eric Botcazou <ebotcazou@adacore.com> 3819 3820 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form 3821 of an addressable type. 3822 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New. 3823 Deal with those cases for which creating a temporary is mandatory. 3824 38252011-09-11 Eric Botcazou <ebotcazou@adacore.com> 3826 3827 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure 3828 this is a real formal parameter before testing whether it is by ref. 3829 38302011-09-11 Eric Botcazou <ebotcazou@adacore.com> 3831 3832 * gcc-interface/gigi.h (build_call_0_expr): Delete. 3833 (build_call_1_expr): Likewise. 3834 (build_call_2_expr): Likewise. 3835 (build_call_n_expr): New prototype. 3836 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr. 3837 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto. 3838 (Handled_Sequence_Of_Statements_to_gnu): Likewise. 3839 (Exception_Handler_to_gnu_zcx): Likewise. 3840 (gnat_to_gnu): Likewise. 3841 (build_binary_op_trapv): Likewise. 3842 * gcc-interface/utils2.c (build_call_0_expr): Delete. 3843 (build_call_1_expr): Likewise. 3844 (build_call_2_expr): Likewise. 3845 (build_call_n_expr): New function. 3846 (build_call_raise): Use build_call_n_expr. 3847 (build_call_raise_range): Likewise. 3848 (build_call_raise_column): Likewise. 3849 (build_call_alloc_dealloc_proc): Likewise. 3850 (maybe_wrap_malloc): Likewise. 3851 (maybe_wrap_free): Likewise. 3852 38532011-09-11 Eric Botcazou <ebotcazou@adacore.com> 3854 3855 * gcc-interface/trans.c (build_return_expr): Use void_type_node for 3856 MODIFY_EXPR. 3857 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that 3858 the result type is null if ENABLE_CHECKING. Set operation_type at the 3859 end unconditionally if not set in the previous cases. 3860 Use build2 and void_type_node for MODIFY_EXPR. 3861 (build_allocator): Use NULL_TREE for MODIFY_EXPR. 3862 38632011-09-08 Eric Botcazou <ebotcazou@adacore.com> 3864 3865 * gcc-interface/utils.c (unchecked_convert): Use a field of the right 3866 precision when converting to or from an integral type whose precision 3867 is not equal to its size. 3868 38692011-09-08 Iain Sandoe <iains@gcc.gnu.org> 3870 3871 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8. 3872 38732011-09-07 Iain Sandoe <iains@gcc.gnu.org> 3874 3875 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system 3876 implementation. 3877 * system-darwin-ppc64.ads: New file. 3878 38792011-09-06 Iain Sandoe <iains@gcc.gnu.org> 3880 3881 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove 3882 reference to "-lm". 3883 38842011-09-06 Iain Sandoe <iains@gcc.gnu.org> 3885 3886 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture 3887 size switches to the link phase for shared libs. 3888 38892011-09-06 Iain Sandoe <iains@gcc.gnu.org> 3890 3891 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust 3892 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants. 3893 38942011-09-06 Arnaud Charlet <charlet@adacore.com> 3895 3896 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in 3897 (gnattools, regnattools, cross-gnattools, canadian-gnattools, 3898 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools): 3899 New targets. 3900 (TOOLS_FLAGS_TO_PASS): New. 3901 (../stamp-tools): Reintroduce, to avoid merge conflicts. 3902 39032011-09-06 Robert Dewar <dewar@adacore.com> 3904 3905 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New 3906 name for Is_RM_Defined_Unit. Also several fixes to this unit. 3907 39082011-09-06 Robert Dewar <dewar@adacore.com> 3909 3910 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function. 3911 * s-rident.ads: New restriction No_Implementation_Units 3912 (this restriction is also part of the profile 3913 No_Implementation_Extensions) 3914 * sem_ch10.adb (Analyze_With_Clause): Add check for 3915 No_Implementation_Units restriction. 3916 39172011-09-06 Jerome Guitton <guitton@adacore.com> 3918 3919 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK 3920 on vThreads. 3921 39222011-09-06 Thomas Quinot <quinot@adacore.com> 3923 3924 * s-solita.adb: Minor reformatting. 3925 39262011-09-06 Ed Schonberg <schonberg@adacore.com> 3927 3928 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that 3929 is a rewriting of an expression function does not freeze previous 3930 entities. 3931 39322011-09-06 Robert Dewar <dewar@adacore.com> 3933 3934 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case 3935 39362011-09-06 Tristan Gingold <gingold@adacore.com> 3937 3938 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like 3939 powerpc-wrs-vxworksae. 3940 39412011-09-06 Thomas Quinot <quinot@adacore.com> 3942 3943 * s-os_lib.ads (Spawn): Minor documentation clarification, 3944 Success is True for a zero exit status. 3945 39462011-09-06 Ed Schonberg <schonberg@adacore.com> 3947 3948 * sem_ch5.adb: Add message for common iterator error. 3949 39502011-09-06 Ed Schonberg <schonberg@adacore.com> 3951 3952 * exp_ch3.adb (Build_Initialization_Call): If the target is a 3953 selected component discriminated by a current instance, replace 3954 the constraint with a reference to the target object, regardless 3955 of whether the context is an init_proc. 3956 39572011-09-06 Robert Dewar <dewar@adacore.com> 3958 3959 * exp_attr.adb: Descriptor_Size is never static. 3960 39612011-09-06 Robert Dewar <dewar@adacore.com> 3962 3963 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric 3964 39652011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 3966 3967 * gnat_rm.texi: Clarify that attribute Descriptor_Size is 3968 non-static. 3969 39702011-09-06 Ed Schonberg <schonberg@adacore.com> 3971 3972 * sem_res.adb (Resolve): An expression that is the body of an 3973 expression function does not freeze. 3974 39752011-09-06 Matthew Heaney <heaney@adacore.com> 3976 3977 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb, 3978 a-cuprqu.adb: Changed copyright notice to indicate current 3979 year only. 3980 39812011-09-06 Vincent Celier <celier@adacore.com> 3982 3983 * prj.adb: Minor spelling error fix in comment 3984 * sem_res.adb: Minor reformatting 3985 39862011-09-06 Pascal Obry <obry@adacore.com> 3987 3988 * sysdep.c (winflush_nt): Removed as not needed anymore. 3989 (winflush_95): Likewise. 3990 (winflush_init): Likewise. 3991 (winflush_function): Likewise. 3992 (getc_immediate_common): Remove call to winflush_function. 3993 39942011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 3995 3996 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the 3997 processing for Descriptor_Size. 3998 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size 3999 to account for its broader usage. 4000 * sem_attr.adb (Analyze_Attribute): Change the error detection 4001 circuitry for Descriptor_Size as the attribute is now applicable 4002 to all types. 4003 40042011-09-06 Robert Dewar <dewar@adacore.com> 4005 4006 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting. 4007 40082011-09-06 Ed Schonberg <schonberg@adacore.com> 4009 4010 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal 4011 in a parameter association must not set the Referenced flag on 4012 the formal. 4013 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal 4014 40152011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 4016 4017 * gnat_rm.texi: Add a section on attribute Descriptor_Size 4018 40192011-09-06 Arnaud Charlet <charlet@adacore.com> 4020 4021 * gcc-interface/Makefile.in (common-tools, gnatmake-re, 4022 gnatlink-re): Speed up by using -j0. 4023 40242011-09-06 Yannick Moy <moy@adacore.com> 4025 4026 * sem_ch13.adb (Analyze_Aspect_Specifications): Call 4027 Set_Corresponding_Aspect when creating pragma from aspect. 4028 (Add_Predicates): Use new field Corresponding_Aspect. 4029 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect 4030 name when present, for the purpose of issuing error messages; 4031 remove local procedure Error_Pragma_Arg_Alternate_Name. 4032 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in 4033 N_Pragma node. 4034 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from 4035 N_Pragma node. 4036 40372011-09-06 Robert Dewar <dewar@adacore.com> 4038 4039 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting. 4040 40412011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 4042 4043 * exp_ch6.adb (Build_Heap_Allocator): Add new 4044 local variable Desig_Typ. Code and comment reformatting. Add 4045 machinery to ensure that the allocation uses a fat pointer when 4046 the type of the return object is a constrained array and the 4047 function return type is an unconstrained array. 4048 40492011-09-06 Vincent Celier <celier@adacore.com> 4050 4051 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal 4052 parameters in subprograms. 4053 40542011-09-06 Arnaud Charlet <charlet@adacore.com> 4055 4056 * s-taprop-mingw.adb (Finalize_TCB): Fix typo. 4057 40582011-09-06 Thomas Quinot <quinot@adacore.com> 4059 4060 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb 4061 (System.Tasking.Primitive_Operations.Specific.Delete): Remove 4062 subprogram. 4063 (System.Tasking.Primitive_Operations.Specific.Set): If argument 4064 is null, destroy task specific data, to make API consistent with 4065 other platforms, and thus compatible with the shared version 4066 of s-tpoaal.adb. 4067 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB): 4068 Document the above assumption. 4069 40702011-09-06 Ed Schonberg <schonberg@adacore.com> 4071 4072 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized 4073 variable for type of return value when return type is 4074 unconstrained and context is an assignment. 4075 40762011-09-06 Ed Schonberg <schonberg@adacore.com> 4077 4078 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of 4079 class-wide operation if expansion is not enabled. 4080 40812011-09-06 Eric Botcazou <ebotcazou@adacore.com> 4082 4083 * checks.adb (Apply_Scalar_Range_Check): Deal with access 4084 type prefix. 4085 40862011-09-06 Yannick Moy <moy@adacore.com> 4087 4088 * sem_ch13.adb (Analyze_Aspect_Specifications, case 4089 Aspect_Invariant): Do not issue error at this point on illegal 4090 pragma placement, as this is checked later on when analyzing 4091 the corresponding pragma. 4092 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure 4093 similar to Error_Pragma_Arg, except the source name of the 4094 aspect/pragma to use in warnings may be equal to parameter 4095 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error 4096 message to distinguish source name of pragma/aspect, and whether 4097 the illegality resides in the type being public, or being private 4098 without a public declaration 4099 41002011-09-06 Thomas Quinot <quinot@adacore.com> 4101 4102 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap 4103 size check (fd_set is implemented differently on that platform). 4104 41052011-09-06 Thomas Quinot <quinot@adacore.com> 4106 4107 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb, 4108 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb, 4109 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads, 4110 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb 4111 (ATCB_Allocation): New subpackage of 4112 System.Tasking.Primitive_Operations, shared across all targets 4113 with full tasking runtime. 4114 (ATCB_Allocation.New_ATCB): Moved there (from target specific 4115 s-taprop bodies). 4116 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB, 4117 taking care of establishing a local temporary ATCB if the one 4118 being deallocated is Self, to avoid a reference to the freed 4119 ATCB in Abort_Undefer. 4120 41212011-09-06 Thomas Quinot <quinot@adacore.com> 4122 4123 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not 4124 terminated, mark it for deallocation upon termination. 4125 (Terminate_Task): Call Free_Task again if the task is marked 4126 for automatic deallocation upon termination. 4127 41282011-09-06 Robert Dewar <dewar@adacore.com> 4129 4130 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads, 4131 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads, 4132 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads, 4133 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads, 4134 a-intnam-solaris.ads, a-intnam-tru64.ads, 4135 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads, 4136 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined 4137 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag 4138 * par-prag.adb: Add dummy entry for pragma Implementation_Defined 4139 * s-rident.ads: Add new restriction No_Implementation_Identifiers 4140 Add new profile No_Implementation_Extensions 4141 * sem_prag.adb: Implement pragma Implementation_Defined Implement 4142 profile No_Implementation_Extensions 4143 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check): 4144 Check violation of restriction No_Implementation_Identifiers 4145 * snames.ads-tmpl: Add entries for pragma Implementation_Defined 4146 Add entry for Name_No_Implementation_Extensions 4147 41482011-09-06 Robert Dewar <dewar@adacore.com> 4149 4150 * impunit.ads: Minor reformatting. 4151 41522011-09-06 Robert Dewar <dewar@adacore.com> 4153 4154 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting. 4155 41562011-09-06 Pascal Obry <obry@adacore.com> 4157 4158 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t 4159 types. 4160 41612011-09-06 Robert Dewar <dewar@adacore.com> 4162 4163 * g-socket.adb: Minor reformatting 4164 41652011-09-06 Javier Miranda <miranda@adacore.com> 4166 4167 * ali.adb (Scan_ALI): Add missing support to load references of 4168 entities imported from other languages. 4169 * ali.ads (Xref_Record): Adding new fields to store the language and 4170 name of an imported entity. 4171 * lib-xref.adb (Output_Import_Export_Info): Fix typo 4172 in comment. 4173 41742011-09-06 Ed Schonberg <schonberg@adacore.com> 4175 4176 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant 4177 is allowed on a full type declaration if it is the completion of 4178 a private declarations. 4179 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant 4180 aspect is allowed on a full type declaration in the private part 4181 of a package. 4182 41832011-09-06 Robert Dewar <dewar@adacore.com> 4184 4185 * sem_ch8.ads: Minor reformatting 4186 41872011-09-06 Thomas Quinot <quinot@adacore.com> 4188 4189 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set): 4190 Guard against socket values that are not in [0;FD_SETSIZE[ 4191 41922011-09-06 Robert Dewar <dewar@adacore.com> 4193 4194 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor 4195 reformatting. 4196 41972011-09-06 Arnaud Charlet <charlet@adacore.com> 4198 4199 * s-linux-alpha.ads: Minor reformatting 4200 * s-oscons-tmplt.c: Fix generated comments in s-oscons template. 4201 Use sizeof instead of corresponding C defines in s-oscons template. 4202 42032011-09-06 Vadim Godunko <godunko@adacore.com> 4204 4205 * a-convec.ads, a-iteint.ads: Minor reformatting. 4206 42072011-09-06 Vincent Celier <celier@adacore.com> 4208 4209 * projects.texi: Add menus and @node lines. 4210 42112011-09-06 Ed Schonberg <schonberg@adacore.com> 4212 4213 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case 4214 where the return type is an unconstrained array and the context 4215 is an assignment. Optimize the case when the target of the 4216 assignment is a selected component. 4217 42182011-09-06 Arnaud Charlet <charlet@adacore.com> 4219 4220 * s-solita.adb: Update comments. 4221 42222011-09-06 Pascal Obry <obry@adacore.com> 4223 4224 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads, 4225 s-linux-sparc.ads: Remove hard coded and now wrong definitions. 4226 * s-oscons-tmplt.c: Add support for generating pthread related 4227 types size on GNU/Linux as done for Darwin. 4228 * s-osinte-linux.ads: Use s-oscons to define the pthread types. 4229 42302011-09-06 Robert Dewar <dewar@adacore.com> 4231 4232 * exp_ch6.adb: Fix minor typo. 4233 42342011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 4235 4236 * exp_ch7.adb: Remove with and use clauses for Get_Targ. 4237 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up. 4238 (Double_Size_Of): Alphabetized. Update the comment on usage. 4239 (Make_Finalize_Address_Stmts): Update comments and reformat code. 4240 (Nearest_Multiple_Rounded_Up): New routine. 4241 (Size_Of): Update comment on usage. The generated expression now 4242 accounts for alignment gaps by rounding the size of the type to the 4243 nearest multiple rounded up of the type's alignment. 4244 42452011-09-06 Robert Dewar <dewar@adacore.com> 4246 4247 * exp_ch7.adb, g-comlin.adb: Minor reformatting. 4248 42492011-09-06 Steve Baird <baird@adacore.com> 4250 4251 * exp_ch4.adb (Expand_Allocator_Expression): Look through 4252 derived subprograms in checking for presence of an 4253 Extra_Accessibility_Of_Result formal parameter. 4254 * exp_ch6.adb (Expand_Call): Look through derived subprograms in 4255 checking for presence of an Extra_Accessibility_Of_Result formal 4256 parameter. 4257 (Expand_Call.Add_Actual_Parameter): Fix a bug in the 4258 case where the Parameter_Associatiations attribute is already set, 4259 but set to an empty list. 4260 (Needs_Result_Accessibility_Level): 4261 Unconditionally return False. This is a temporary 4262 change, disabling the Extra_Accessibility_Of_Result 4263 mechanism. 4264 (Expand_Simple_Function_Return): Check for 4265 Extra_Accessibility_Of_Result parameter's presence instead of 4266 testing Ada_Version when generating a runtime accessibility 4267 check which makes use of the parameter. 4268 42692011-09-06 Ed Schonberg <schonberg@adacore.com> 4270 4271 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the 4272 expression in a given case alternative must be attached to the 4273 statement list of the ccrresponding case statement alternative 4274 They cannot be propagated ahead of the case statement, because 4275 the validity of the expression that generated the action may 4276 hold only for that alternative. 4277 42782011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 4279 4280 * exp_ch7.adb: Remove with and use clauses for Get_Targ. 4281 (Alignment_Of): Remove the code for strict alignment targets. 4282 (Double_Alignment_Of): Removed. 4283 (Double_Size_Of): New routine. 4284 (Make_Finalize_Address_Stmts): Change the 4285 calculation of the dope's size. Update relevant comments. 4286 (Size_Of): New routine. 4287 42882011-09-06 Steve Baird <baird@adacore.com> 4289 4290 * einfo.ads (Extra_Accessibility): Update associated comment to use 4291 the term "present" correctly ("present" just means that it is not 4292 an error to query the value of the attribute - it does not imply 4293 that the value must be non-null). 4294 (Extra_Constrained): Ditto. 4295 (Is_Visible_Formal): Ditto. 4296 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma. 4297 (Set_Extra_Accessibility_Of_Result): Add Inline pragma. 4298 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment. 4299 * exp_ch6.adb (Expand_Call): The callee may require an 4300 Extra_Accessibility_Of_Result actual parameter even if Ada_Version 4301 < Ada_2012. This can occur if the callee is exported from a Gnat 4302 runtimes unit. Also improve a comment. 4303 43042011-09-06 Hristian Kirtchev <kirtchev@adacore.com> 4305 4306 * exp_ch7.adb: Add with and use clauses for Get_Targ. 4307 (Alignment_Of): Rename formal parameter Some_Typ 4308 to Typ, update related comment. Use the allocator alignment on 4309 strict alignment targets such as SPARC. 4310 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update 4311 related comment. 4312 43132011-09-06 Gary Dismukes <dismukes@adacore.com> 4314 4315 * sem_ch9.adb (Check_Interfaces): Test 4316 Is_Limited_Type rather than Is_Limited_Record when checking that 4317 the partial view of a synchronized full view must be limited. 4318 43192011-09-06 Emmanuel Briot <briot@adacore.com> 4320 4321 * g-comlin.adb (Free): Fix memory leak. 4322 43232011-09-06 Robert Dewar <dewar@adacore.com> 4324 4325 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization. 4326 43272011-09-06 Steve Baird <baird@adacore.com> 4328 4329 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the 4330 (Ada2012) cases described in AI05-0234 where the accessibility 4331 level of a function result is "determined by the point of 4332 call", an implicit parameter representing that accessibility 4333 level is passed in. Extra_Accessibilty_Of_Result yields this 4334 additional formal parameter. Extra_Accessibility_Of_Result 4335 is analogous to the existing Extra_Accessibility 4336 function used in the implementation of access parameters. 4337 (Set_Extra_Accessibility_Of_Result): New procedure; sets 4338 Extra_Accessibility_Of_Result attribute. 4339 * einfo.adb (Extra_Accessibility_Of_Result): New function. 4340 (Set_Extra_Accessibility_Of_Result): New procedure. 4341 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute. 4342 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of 4343 an accessibility level literal to Natural; introduce a nested 4344 function, Make_Level_Literal, to do this. 4345 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function; 4346 determines whether a given function (or access-to-function 4347 type) needs to have an implicitly-declared accessibility-level 4348 parameter added to its profile. 4349 (Add_Extra_Actual_To_Call): Export an existing procedure which was 4350 previously declared in the body of Exp_Ch6. 4351 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving 4352 it to exp_ch6.ads. 4353 (Has_Unconstrained_Access_Discriminants): New Function; a 4354 predicate on subtype entities which returns True if the given 4355 subtype is unconstrained and has one or more access discriminants. 4356 (Expand_Call): When expanding a call to a function which takes an 4357 Extra_Accessibility_Of_Result parameter, pass in the appropriate 4358 actual parameter value. In the case of a function call which is 4359 used to initialize an allocator, this may not be possible because 4360 the Etype of the allocator may not have been set yet. In this 4361 case, we defer passing in the parameter and handle it later in 4362 Expand_Allocator_Expression. 4363 (Expand_Simple_Function_Return): When returning from a function which 4364 returns an unconstrained subtype having at least one access 4365 discriminant, generate the accessibility check needed to ensure that 4366 the function result will not outlive any objects designated by its 4367 discriminants. 4368 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads 4369 description. 4370 * exp_ch4.adb (Expand_Allocator_Expression): When a function call 4371 is used to initialize an allocator, we may need to pass in "the 4372 accessibility level determined by the point of call" (AI05-0234) 4373 to the function. Expand_Call, where such actual parameters are 4374 usually generated, is too early in this case because the Etype of 4375 the allocator (which is used in determining the level to be passed 4376 in) may not have been set yet when Expand_Call executes. Instead, 4377 we generate code to pass in the appropriate actual parameter 4378 in Expand_Allocator_Expression. 4379 * sem_ch6.adb (Create_Extra_Formals): Create 4380 the new Extra_Accessibility_Of_Result formal if 4381 Needs_Result_Accessibility_Level returns True. This includes the 4382 introduction of a nested procedure, Check_Against_Result_Level. 4383 43842011-09-06 Arnaud Charlet <charlet@adacore.com> 4385 4386 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate 4387 declaration. 4388 43892011-09-05 Hristian Kirtchev <kirtchev@adacore.com> 4390 4391 * s-finmas.adb (Set_Finalize_Address): Explain the reason 4392 for the synchronization. Move the test for null from 4393 s-stposu.Allocate_Any_Controlled to this routine since the check 4394 needs to be protected too. 4395 (Set_Heterogeneous_Finalize_Address): Explain the reason for the 4396 synchronization code. 4397 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment 4398 explaining the context in which this routine is used. 4399 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null 4400 to s-finmas.Set_Finalize_Address. 4401 44022011-09-05 Ed Schonberg <schonberg@adacore.com> 4403 4404 * einfo.ads: Document that itypes have no parent field. 4405 44062011-09-05 Robert Dewar <dewar@adacore.com> 4407 4408 * rtsfind.adb (Check_CRT): Check for overloaded entity 4409 * rtsfind.ads: Document that entities to be found by rtsfind 4410 cannot be overloaded 4411 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb 4412 (Lock_Entries_With_Status): New name for Lock_Entries with two 4413 arguments (changed to meet rtsfind no overloading rule). 4414 44152011-09-05 Hristian Kirtchev <kirtchev@adacore.com> 4416 4417 * s-finmas.adb (Set_Finalize_Address (Address, 4418 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address. 4419 (Set_Finalize_Address (in out Finalization_Master, 4420 Finalize_Address_Ptr): Add synchronization code. 4421 * s-finmas.ads (Set_Finalize_Address (Address, 4422 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address. 4423 * s-stposu.adb (Allocate_Any_Controlled): Update the call to 4424 Set_Finalize_Address for the heterogeneous case. 4425 44262011-09-05 Ed Schonberg <schonberg@adacore.com> 4427 4428 * sem_ch3.adb: Undo previous change, not suitable after all. 4429 44302011-09-05 Robert Dewar <dewar@adacore.com> 4431 4432 * einfo.ads: Minor comment clarification. 4433 44342011-09-05 Hristian Kirtchev <kirtchev@adacore.com> 4435 4436 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine 4437 no longer needs to search through the entities of the return 4438 statement scope to find the _chain. 4439 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6. 4440 (Analyze_Block_Statement): Add local variable 4441 Is_BIP_Return_Statement. Add machinery to install all entities 4442 produced by the expansion of the return object declaration. 4443 (Install_Return_Entities): New routine. 4444 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec. 4445 44462011-09-05 Ed Schonberg <schonberg@adacore.com> 4447 4448 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context 4449 of subunit is incomplete. 4450 (Analyze_Proper_Body): If parent spec is not available, do not 4451 attempt analysis. 4452 44532011-09-05 Ed Schonberg <schonberg@adacore.com> 4454 4455 * sem_disp.adb (Find_Controlling_Arg): Add checks for 4456 interface type conversions, that are expanded into dereferences. 4457 44582011-09-05 Hristian Kirtchev <kirtchev@adacore.com> 4459 4460 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): 4461 Examine the parameter and return profile of a subprogram and swap 4462 any incomplete types coming from a limited context with their 4463 corresponding non-limited views. 4464 (Exchange_Limited_Views): New routine. 4465 44662011-09-05 Ed Schonberg <schonberg@adacore.com> 4467 4468 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent 4469 of internal entity to the subtype declaration, so that when 4470 entities are subsequently exchanged in a package body, the tree 4471 remains properly formatted for ASIS. 4472 44732011-09-05 Johannes Kanig <kanig@adacore.com> 4474 4475 * g-comlin.adb (Set_Usage): Additional optional argument to set help 4476 message. 4477 (Display_Help): display the user given help message, if available. 4478 44792011-09-05 Ed Schonberg <schonberg@adacore.com> 4480 4481 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression 4482 is legal if the original node is an identifier that is a 4483 parameterless function call. 4484 44852011-09-05 Pascal Obry <obry@adacore.com> 4486 4487 * prj-nmsc.adb: Minor reformatting. 4488 Add support for standalone aggregate library. 4489 (Check_Stand_Alone_Library): Handle standalone aggregate library. 4490 * projects.texi: Fix documentation for aggregate library projects. 4491 44922011-09-05 Robert Dewar <dewar@adacore.com> 4493 4494 * sem_ch6.adb: Minor reformatting. 4495 44962011-09-05 Matthew Gingell <gingell@adacore.com> 4497 4498 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the 4499 stack guard page on PPC Linux. This patch ensures the 64K guard page at 4500 the bottom of the stack is not overwritten. 4501 45022011-09-05 Thomas Quinot <quinot@adacore.com> 4503 4504 * exp_intr.adb, s-tasini.adb: Minor reformatting. 4505 45062011-09-05 Ed Schonberg <schonberg@adacore.com> 4507 4508 * sem_ch3.adb (Access_Definition): If an access type declaration 4509 appears in a child unit, the scope of whatever anonymous type 4510 may be generated is the child unit itself. 4511 45122011-09-05 Ed Schonberg <schonberg@adacore.com> 4513 4514 * sem_ch6.adb (Analyze_Expression_Function): Do not set 4515 Comes_From_Source on rewritten body. 4516 (Analyze_Subprogram_Body_Helper): Check that the original node for 4517 the body comes from source, when determining whether expansion 4518 of a protected operation is needed. 4519 45202011-09-05 Ed Schonberg <schonberg@adacore.com> 4521 4522 * exp_aggr.adb (Replace_Type): If the target of the assignment is 4523 a selected component and the right-hand side is a self-referential 4524 access, the proper prefix of the rewritten attribute is a copy 4525 of the left-hand side, not of its prefix. 4526 45272011-09-05 Robert Dewar <dewar@adacore.com> 4528 4529 * sem_ch5.adb: Minor reformatting. 4530 * sem_ch3.adb: Minor code clean up. 4531 45322011-09-05 Jose Ruiz <ruiz@adacore.com> 4533 4534 * exp_ch9.adb (Make_Initialize_Protection): The fact that 4535 restriction No_Dynamic_Attachment is in effect or not should 4536 not influence the default priority associated to a protected 4537 object. With this change, when the restriction is in effect (as 4538 is the case for the Ravenscar profile) the default priority of 4539 a protected object with an interrupt handler is in the range of 4540 interrupt priorities (Default_Interrupt_Priority) as required 4541 by D.3(10). 4542 45432011-09-05 Arnaud Charlet <charlet@adacore.com> 4544 4545 * a-iteint.ads: Fix header. 4546 45472011-09-05 Vincent Celier <celier@adacore.com> 4548 4549 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends 4550 with a directory separator to avoid output such as: 4551 "/path/to/objauto.cgpr" has been deleted. 4552 45532011-09-05 Robert Dewar <dewar@adacore.com> 4554 4555 * sem_ch3.adb: Minor reformatting. 4556 45572011-09-05 Ed Schonberg <schonberg@adacore.com> 4558 4559 * sem_ch5.adb: Better error message. 4560 45612011-09-05 Hristian Kirtchev <kirtchev@adacore.com> 4562 4563 * exp_aggr.adb: Add with and use clause for Exp_Ch6. 4564 (Expand_Array_Aggregate): Detect a special case of an aggregate 4565 which contains tasks in the context of an unexpanded return 4566 statement of a build-in-place function. 4567 * exp_ch6.adb: Add with and use clause for Exp_Aggr. 4568 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate 4569 which contains tasks and expand it now that the original simple 4570 return statement has been rewritten. 4571 * exp_ch9.adb (Build_Activation_Chain_Entity): Code 4572 reformatting. Do not create a chain for an extended return 4573 statement if one is already available. 4574 (Has_Activation_Chain): New routine. 4575 45762011-09-05 Marc Sango <sango@adacore.com> 4577 4578 * sem_ch3.adb (Analyze_Object_Declaration): Remove 4579 the wrong test and add the correct test to detect the violation 4580 of illegal use of unconstrained string type in SPARK mode. 4581 45822011-09-05 Ed Schonberg <schonberg@adacore.com> 4583 4584 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error 4585 message on an iterator over an array. 4586 45872011-09-05 Robert Dewar <dewar@adacore.com> 4588 4589 * lib-xref-alfa.adb: Minor reformatting. 4590 45912011-09-05 Robert Dewar <dewar@adacore.com> 4592 4593 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb, 4594 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting. 4595 45962011-09-05 Gary Dismukes <dismukes@adacore.com> 4597 4598 * exp_ch7.adb, exp_ch6.adb: Minor reformatting. 4599 46002011-09-05 Johannes Kanig <kanig@adacore.com> 4601 4602 * lib-xref-alfa.adb: Update comments. 4603 46042011-09-05 Thomas Quinot <quinot@adacore.com> 4605 4606 * sem_res.adb: Minor reformatting 4607 46082011-09-05 Ed Schonberg <schonberg@adacore.com> 4609 4610 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not 4611 present, create them now. Needed in case the return type was 4612 a limited view in the function declaration. 4613 (Make_Build_In_Place_Call_In_Allocator): If return type contains 4614 tasks, build the activation chain for it. Pass a reference to 4615 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call. 4616 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface 4617 with build_in_place calls. 4618 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was 4619 incomplete, inatialize its Corresponding_Record_Type component. 4620 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field 4621 of limited views. 4622 46232011-09-05 Johannes Kanig <kanig@adacore.com> 4624 4625 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect 4626 information. 4627 46282011-09-05 Ed Schonberg <schonberg@adacore.com> 4629 4630 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram 4631 appears within a package specification and the token after "IS" 4632 is not a parenthesis, assume that this is an unparenthesized 4633 expression function, even if the token appears in a line by 4634 itself. 4635 * par.adb: Clarify use of Labl field of scope stack in error 4636 recovery. 4637 46382011-09-05 Bob Duff <duff@adacore.com> 4639 4640 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked 4641 conversions instead of normal type conversions in all cases where a 4642 type conversion would be illegal. In particular, use unchecked 4643 conversions when the operand types are private. 4644 46452011-09-05 Johannes Kanig <kanig@adacore.com> 4646 4647 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on 4648 objects of task type or protected type. 4649 46502011-09-05 Ed Schonberg <schonberg@adacore.com> 4651 4652 * sem_ch6.adb (Analyze_Expression_Function): If the expression 4653 function comes from source, indicate that so does its rewriting, 4654 so it is compatible with any subsequent expansion of the 4655 subprogram body (e.g. when it is a protected operation). 4656 * sem_ch4.adb: minor reformatting 4657 46582011-09-05 Hristian Kirtchev <kirtchev@adacore.com> 4659 4660 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use 4661 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding 4662 may lead to wrong ancestor package in the case of instantiated subunit 4663 bodies. If a subunit is instantiated, follow the chain of instantiations 4664 rather than the stub structure. 4665 46662011-09-02 Robert Dewar <dewar@adacore.com> 4667 4668 * sem_ch4.adb, sem_ch6.adb: Minor reformatting. 4669 * gcc-interface/Make-lang.in: Update dependencies. 4670 46712011-09-02 Marc Sango <sango@adacore.com> 4672 4673 * sem_ch3.adb (Analyze_Object_Declaration): Change 4674 comment and add additional check to differentiate constant of 4675 type string from others unconstrained type. 4676 46772011-09-02 Ed Schonberg <schonberg@adacore.com> 4678 4679 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use, 4680 present in incomplete type declarations to refine the error 4681 message the full declaration is in the same unit. 4682 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of 4683 an incomplete type, set the Premature_Use for additional message. 4684 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete 4685 and Premature_Use is set, place additional information at the 4686 point of premature use. 4687 46882011-09-02 Bob Duff <duff@adacore.com> 4689 4690 * sem_ch6.adb: (Check_Post_State): Suppress warning 4691 "postcondition refers only to pre-state" when the expression has not 4692 yet been analyzed, because it causes false alarms. This can happen when 4693 the postcondition contains a quantified expression, because those are 4694 analyzed later. This is a temporary/partial fix. 4695 (Process_Post_Conditions): Minor: change wording of warning. 4696 46972011-09-02 Marc Sango <sango@adacore.com> 4698 4699 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of 4700 illegal use of unconstrained string type in SPARK mode. 4701 * sem_res.adb (Analyze_Operator_Symbol): Set the 4702 right place where the string operand of concatenation should be 4703 violate in SPARK mode. 4704 47052011-09-02 Robert Dewar <dewar@adacore.com> 4706 4707 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb, 4708 exp_ch3.adb: Minor reformatting. 4709 47102011-09-02 Vincent Celier <celier@adacore.com> 4711 4712 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc" 4713 as the compiler driver so Is_Compilable returns True for sources. 4714 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source 4715 for the body. 4716 47172011-09-02 Ed Schonberg <schonberg@adacore.com> 4718 4719 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide 4720 condition, a reference to a controlling formal must be interpreted 4721 as having the class-wide type (or an access to such) so that the 4722 inherited condition can be properly applied to any overriding 4723 operation (see ARM12 6.6.1 (7)). 4724 47252011-09-02 Tristan Gingold <gingold@adacore.com> 4726 4727 * init.c (__gnat_is_vms_v7): Fix case and add prototype 4728 for LIB$GETSYI. 4729 47302011-09-02 Javier Miranda <miranda@adacore.com> 4731 4732 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the 4733 initializing expression of a class-wide interface object declaration 4734 if its type is limited. 4735 47362011-09-02 Johannes Kanig <kanig@adacore.com> 4737 4738 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration 4739 literals, take into account the type name; the type is *not* 4740 the scope for an enumeration literal. 4741 47422011-09-02 Ed Schonberg <schonberg@adacore.com> 4743 4744 * sem_ch6.adb (Check_Overriding_Indicator): add special check 4745 to reject an overriding indicator on a user-defined Adjust 4746 subprogram for a limited controlled type. 4747 47482011-09-02 Ed Schonberg <schonberg@adacore.com> 4749 4750 * sem_res.adb (Resolve_Actuals): add missing call to Resolve 4751 for an actual that is a function call returning an unconstrained 4752 limited controlled type. 4753 47542011-09-02 Tristan Gingold <gingold@adacore.com> 4755 4756 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7 4757 47582011-09-02 Johannes Kanig <kanig@adacore.com> 4759 4760 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable 4761 from "HEAP" to __HEAP Change comment that refers to that variable 4762 * put_alfa.adb: Change comment that refers to that variable 4763 47642011-09-02 Robert Dewar <dewar@adacore.com> 4765 4766 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting. 4767 47682011-09-02 Hristian Kirtchev <kirtchev@adacore.com> 4769 4770 * exp_util.adb (Extract_Renamed_Object): Renamed to 4771 Find_Renamed_Object. This routine has been reimplemented and now uses 4772 tree traversal to locate a renamed object. 4773 (Is_Aliased): Replace call to Extract_Renamed_Object with 4774 Find_Renamed_Object. 4775 47762011-09-02 Tristan Gingold <gingold@adacore.com> 4777 4778 * init.c: (__gnat_is_vms_v7): New function. 4779 47802011-09-02 Olivier Hainque <hainque@adacore.com> 4781 4782 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames 4783 that have a misaligned backchain, necessarily bogus. 4784 47852011-09-02 Hristian Kirtchev <kirtchev@adacore.com> 4786 4787 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create 4788 TSS routine Finalize_Address when compiling in Alfa mode. 4789 (Expand_Freeze_Record_Type): Do not create TSS routine 4790 Finalize_Address when compiling in Alfa mode. 4791 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a 4792 call to Set_Finalize_Address in Alfa mode because Finalize_Address is 4793 not built. 4794 (Expand_N_Allocator): Do not produce a call to 4795 Set_Finalize_Address in Alfa mode because Finalize_Address is not built. 4796 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not 4797 produce a call to primitive Set_Finalize_Address in Alfa mode because 4798 Finalize_Address is not built. 4799 * exp_ch7.adb (Build_Finalization_Master): Do not create 4800 finalization masters in Afa mode since they are not needed. 4801 (Build_Finalizer): Do not create scope and library-level 4802 finalizers in Alfa mode since they are not needed. 4803 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand 4804 "new" and "free" when applied to controlled objects in Alfa mode since 4805 this is not needed. 4806 48072011-09-02 Vincent Celier <celier@adacore.com> 4808 4809 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow 4810 only library names with the syntax of Ada identifiers, to avoid errors 4811 when compiling the binder generated files. 4812 * projects.texi: Document restriction on SAL library names 4813 48142011-09-02 Thomas Quinot <quinot@adacore.com> 4815 4816 * a-chtgbo.adb: Minor comment fix. 4817 48182011-09-02 Robert Dewar <dewar@adacore.com> 4819 4820 * lib-xref.adb: Minor reformatting 4821 48222011-09-02 Vincent Celier <celier@adacore.com> 4823 4824 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb, 4825 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add 4826 --version and --help in usage. 4827 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure 4828 48292011-09-02 Bob Duff <duff@adacore.com> 4830 4831 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old 4832 compilers don't understand it. 4833 48342011-09-02 Gary Dismukes <dismukes@adacore.com> 4835 4836 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the 4837 underlying subtype rather than its base type on the call to 4838 Build_Record_Or_Elementary_Input_Function, so that any 4839 constraints on a discriminated subtype will be available for 4840 doing the check required by AI05-0192. 4841 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): 4842 If the prefix subtype of the 'Input attribute is a constrained 4843 discriminated subtype, then check each constrained discriminant value 4844 against the corresponding value read from the stream. 4845 48462011-09-02 Yannick Moy <moy@adacore.com> 4847 4848 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default 4849 warnings on suspicious contracts, and enable them with -gnatwa. 4850 48512011-09-02 Robert Dewar <dewar@adacore.com> 4852 4853 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor 4854 reformatting. 4855 48562011-09-02 Hristian Kirtchev <kirtchev@adacore.com> 4857 4858 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards 4859 which ensure that restriction No_Dynamic_Attachment has not been 4860 violated. 4861 (Make_Initialize_Protection): Protected types with attach or 4862 interrupt handlers must not violate restriction No_Dynamic_Attachment. 4863 * exp_util.adb (Corresponding_Runtime_Package): Add a guard 4864 which ensures that restriction No_Dynamic_Attachment has not been 4865 violated. 4866 * sem_attr.adb: (Eval_Attribute): Transform 4867 VAX_Float_Type'First and 'Last into references to 4868 the temporaries which store the corresponding bounds. The 4869 transformation is needed since the back end cannot evaluate 4870 'First and 'Last on VAX. 4871 (Is_VAX_Float): New routine. 4872 48732011-09-02 Ed Schonberg <schonberg@adacore.com> 4874 4875 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the 4876 generic unit is not intrinsic and has an explicit convention, 4877 the instance inherits it. 4878 48792011-09-02 Robert Dewar <dewar@adacore.com> 4880 4881 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb, 4882 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting. 4883 48842011-09-02 Thomas Quinot <quinot@adacore.com> 4885 4886 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access): 4887 Guard against a prefix that is an N_Has_Entity but has no 4888 associated entity. 4889 48902011-09-02 Yannick Moy <moy@adacore.com> 4891 4892 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa 4893 references. 4894 48952011-09-02 Yannick Moy <moy@adacore.com> 4896 4897 * opt.ads (Warn_On_Suspicious_Contract): New warning flag. 4898 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious 4899 contracts. 4900 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New 4901 procedure looking for suspicious postconditions. 4902 * usage.adb (Usage): New options -gnatw.t and -gnatw.T. 4903 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new 4904 options -gnatw.t and -gnatw.T. 4905 49062011-09-02 Pascal Obry <obry@adacore.com> 4907 4908 * prj.adb: Minor code refactoring. Move check for null project in 4909 Project_Changed. 4910 * projects.texi: Fix minor typos. 4911 49122011-09-02 Ed Schonberg <schonberg@adacore.com> 4913 4914 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain 4915 of iteration is an expression, its value must be captured in a 4916 renaming declaration, so that modification of the elements is 4917 propagated to the original container. 4918 49192011-09-02 Pascal Obry <obry@adacore.com> 4920 4921 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb, 4922 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb, 4923 prj-tree.adb: Minor reformatting and style fixes. 4924 49252011-09-02 Robert Dewar <dewar@adacore.com> 4926 4927 * s-rident.ads: Add new restriction No_Implicit_Aliasing 4928 * sem_attr.adb: (Analyze_Access_Attribute): Deal with 4929 No_Implicit_Aliasing 4930 (Analyze_Attribute, case Address): ditto 4931 (Analyze_Attribute, case Unrestricted_Access): ditto 4932 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle 4933 No_Implicit_Aliasing restriction. 4934 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing 4935 49362011-09-02 Ed Schonberg <schonberg@adacore.com> 4937 4938 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object 4939 is an unchecked conversion, apply test to its expression. 4940 49412011-09-02 Javier Miranda <miranda@adacore.com> 4942 4943 * sem_ch3.adb (Check_Abstract_Overriding): When 4944 traversing the chain of aliased subprograms avoid reporting a 4945 redundant error on the current entity. 4946 49472011-09-02 Sergey Rybin <rybin@adacore.com> 4948 4949 * gnat_ugn.texi: Minor clean up. 4950 49512011-09-02 Bob Duff <duff@adacore.com> 4952 4953 * s-htable.adb (Set_If_Not_Present): Use renaming 4954 instead of ":=", because the type Key is limited in the generic (even 4955 if not in the instances). 4956 49572011-09-02 Robert Dewar <dewar@adacore.com> 4958 4959 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb, 4960 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor 4961 reformatting. 4962 49632011-09-02 Hristian Kirtchev <kirtchev@adacore.com> 4964 4965 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an 4966 inherited component with the enclosing derived type. Code reformatting. 4967 49682011-09-02 Gary Dismukes <dismukes@adacore.com> 4969 4970 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early 4971 return done when overflow checks are enabled, since comparisons against 4972 Lor and Hir should not be done when OK1 is False. 4973 49742011-09-02 Gary Dismukes <dismukes@adacore.com> 4975 4976 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call): 4977 Add new formal Master_Exp. When present, add that expression to the 4978 call as an extra actual. 4979 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable 4980 Fmaster_Actual and in the case of a BIP call initializing a return 4981 object of an enclosing BIP function set it to a 4982 new reference to the implicit finalization master 4983 formal of the enclosing function. Fmaster_Actual is 4984 then passed to the new formal Master_Exp on the call to 4985 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move 4986 initializations of Enclosing_Func to its declaration. 4987 49882011-09-02 Thomas Quinot <quinot@adacore.com> 4989 4990 * csets.ads: Minor reformatting 4991 49922011-09-02 Hristian Kirtchev <kirtchev@adacore.com> 4993 4994 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve 4995 the full view of a private type coming from an instantiation. 4996 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search 4997 loop to iterate over the declarations rather than use the 4998 First_Entity / Next_Entity scheme. 4999 50002011-09-02 Ed Schonberg <schonberg@adacore.com> 5001 5002 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding 5003 X'range (N) into X'First (N) .. X'Last (N), do not share the 5004 dimension indicator N, if present. Even though it is a static 5005 constant, its source location may be modified when printing 5006 expanded code under -gnatDL, and node sharing will lead to chaos 5007 in Sprint on large files, by generating a sloc value that does 5008 not correspond to any source file. 5009 50102011-09-02 Bob Duff <duff@adacore.com> 5011 5012 * einfo.adb: (Has_Xref_Entry): Do not call 5013 Implementation_Base_Type. Lib.Xref has been 5014 rewritten to avoid the need for it, and it was costly. 5015 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New 5016 functions in support of efficient xref. 5017 * lib-xref-alfa.adb: Misc changes related to Key component of 5018 type Xref_Entry. 5019 * lib-xref.adb: (Add_Entry,etc): Speed improvement. 5020 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry 5021 no longer does. This is the one place where it is needed. 5022 50232011-09-02 Johannes Kanig <kanig@adacore.com> 5024 5025 * g-comlin.adb (Getopt): New optional argument Concatenate to have 5026 similar interface as the other Getopt function. 5027 50282011-09-02 Hristian Kirtchev <kirtchev@adacore.com> 5029 5030 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate 5031 a call to Set_Finalize_Address if there is no allocator available. 5032 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for 5033 a case of allocator expansion where the allocator is not expanded but 5034 needs a custom allocate routine. Code reformatting. 5035 (Is_Finalizable_Transient): Remove local variables Has_Rens and 5036 Ren_Obj. Code reformatting. 5037 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing 5038 through the use of 'reference. 5039 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated 5040 as part of build-in-place expansion. They are intentionally marked as 5041 coming from source, but their parents are not. 5042 50432011-09-02 Ed Schonberg <schonberg@adacore.com> 5044 5045 * sem_ch10.adb (Analyze_With_Clause): If the library unit 5046 is the generated subprogram declaration for a child unit body 5047 that acts as spec, use the original body in the with_clause, 5048 to prevent binding errors. 5049 50502011-09-02 Vincent Celier <celier@adacore.com> 5051 5052 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS 5053 qualifier /MULTI_UNIT_INDEX= 5054 50552011-09-02 Johannes Kanig <kanig@adacore.com> 5056 5057 * g-comlin.adb (Getopt): Return when switch is dealt with automatically, 5058 instead of calling the callback function 5059 50602011-09-02 Robert Dewar <dewar@adacore.com> 5061 5062 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb, 5063 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting. 5064 50652011-09-02 Vincent Celier <celier@adacore.com> 5066 5067 * prj-nmsc.adb: (Find_Sources): When the list of sources is 5068 explicitly declared in an extending project, do not warn if a source 5069 for an inherited naming exception is not found. 5070 50712011-09-02 Gary Dismukes <dismukes@adacore.com> 5072 5073 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if 5074 expansion is inactive. 5075 50762011-09-02 Ed Schonberg <schonberg@adacore.com> 5077 5078 * sem_util.adb (Note_Possible_Modification): If the entity 5079 being modified is the renaming generated for an Ada2012 iterator 5080 element, the enclosing container or array is modified as well. 5081 50822011-09-02 Jose Ruiz <ruiz@adacore.com> 5083 5084 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB, 5085 Initialize): Define and initialize the 5086 mutex attributes and condition variable attributes locally. 5087 50882011-09-02 Vincent Celier <celier@adacore.com> 5089 5090 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming 5091 exception replaced in an extending project. 5092 (Check_Object): No error when the other source is locally removed. 5093 50942011-09-02 Yannick Moy <moy@adacore.com> 5095 5096 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow 5097 unresolved calls. 5098 50992011-08-31 Arnaud Charlet <charlet@adacore.com> 5100 5101 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64 5102 run-time files. 5103 * gcc-interface/Make-lang.in: Update dependencies. 5104 51052011-09-01 Robert Dewar <dewar@adacore.com> 5106 5107 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting. 5108 51092011-09-01 Jose Ruiz <ruiz@adacore.com> 5110 5111 * adaint.h (__gnat_cpu_free): Fix the name of this profile. 5112 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free, 5113 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms 5114 specific for systems where their glibc version does not define the 5115 routines to handle dynamically allocated CPU sets. 5116 51172011-09-01 Vincent Celier <celier@adacore.com> 5118 5119 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads, 5120 prj-env.adb: Implement inheritance of naming exceptions in extending 5121 projects. 5122 51232011-09-01 Romain Berrendonner <berrendo@adacore.com> 5124 5125 * gnatls.adb: Display simple message instead of content of 5126 gnatlic.adl. 5127 51282011-09-01 Hristian Kirtchev <kirtchev@adacore.com> 5129 5130 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of 5131 access discriminant and anonymous access component scopes. 5132 (Inherit_Component): Reuse the itype of an access discriminant 5133 or anonymous access component by copying it in order to set the proper 5134 scope. This is done only when the parent and the derived type 5135 are in different scopes. 5136 (Set_Anonymous_Etype): New routine. 5137 51382011-09-01 Robert Dewar <dewar@adacore.com> 5139 5140 * a-convec.adb: Minor reformatting throughout. 5141 51422011-09-01 Jose Ruiz <ruiz@adacore.com> 5143 5144 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size, 5145 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC, 5146 CPU_ALLOC_SIZE and CPU_FREE linux macros. 5147 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and 5148 CPU_SET_S respectively because we are now using dynamically allocated 5149 CPU sets which are more portable across different glibc versions. 5150 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE, 5151 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t 5152 masks dynamically according to the number of processors in the target 5153 platform. 5154 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S 5155 respectively, so we need to pass the size of the masks as 5156 parameters. 5157 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically 5158 created cpu_set_t masks 5159 with the number of processors available in the target platform, 5160 instead of static bit arrays. It enhances portability because 5161 it uses the information from the target platform. 5162 * sem_ch8.adb: (Attribute_Renaming): When checking whether we 5163 are using a restricted run-time library, use the flag 5164 Configurable_Run_Time_Mode instead of Restricted_Profile. 5165 51662011-09-01 Vincent Celier <celier@adacore.com> 5167 5168 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI 5169 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn 5170 51712011-09-01 Nicolas Roche <roche@adacore.com> 5172 5173 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system 5174 on VxWorks in kernel mode. 5175 51762011-09-01 Jose Ruiz <ruiz@adacore.com> 5177 5178 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux 5179 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying 5180 directly the bit array. 5181 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around 5182 the linux macros with the same name. 5183 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these 5184 wrappers around the CPU_ZERO and CPU_SET linux macros. 5185 51862011-09-01 Hristian Kirtchev <kirtchev@adacore.com> 5187 5188 * exp_ch7.adb (Find_Insertion_List): Removed. 5189 (Process_Transient_Objects): Insert the declarations of the hook 5190 access type and the hook object before the associated transient object. 5191 51922011-09-01 Jose Ruiz <ruiz@adacore.com> 5193 5194 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading 5195 package System.Aux_Dec when using restricted run-time libraries which 5196 do not have this package. 5197 51982011-09-01 Tristan Gingold <gingold@adacore.com> 5199 5200 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless. 5201 52022011-09-01 Bob Duff <duff@adacore.com> 5203 5204 * sem_attr.adb (Analyze_Access_Attribute): Do not call 5205 Kill_Current_Values for P'Unrestricted_Access, where P is library level 5206 52072011-09-01 Thomas Quinot <quinot@adacore.com> 5208 5209 * exp_ch5.adb: Minor reformatting 5210 * gnat_ugn.texi: Fix minor typos. 5211 * gcc-interface/Make-lang.in: Update dependencies. 5212 52132011-09-01 Robert Dewar <dewar@adacore.com> 5214 5215 * inline.adb, sem_aggr.adb: Minor reformatting. 5216 52172011-09-01 Ed Schonberg <schonberg@adacore.com> 5218 5219 * a-convec.adb: Proper handling of cursors for Ada2012 iterators. 5220 52212011-09-01 Robert Dewar <dewar@adacore.com> 5222 5223 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting. 5224 52252011-09-01 Bob Duff <duff@adacore.com> 5226 5227 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance 5228 body" the same as "in inlined body", because visibility shouldn't 5229 apply there. 5230 52312011-09-01 Eric Botcazou <ebotcazou@adacore.com> 5232 5233 * inline.adb (Add_Inlined_Body): Refine previous change. 5234 52352011-09-01 Gary Dismukes <dismukes@adacore.com> 5236 5237 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function. 5238 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): 5239 Test for case where call 5240 initializes an object of a return statement before testing for 5241 a constrained call, to ensure that all such cases get handled 5242 by simply passing on the caller's parameters. Also, in that 5243 case call Needs_BIP_Alloc_Form to determine whether to pass on 5244 the BIP_Alloc_Form parameter of the enclosing function rather 5245 than testing Is_Constrained. Add similar tests for the return 5246 of a BIP call to later processing to ensure consistent handling. 5247 (Needs_BIP_Alloc_Form): New utility function. 5248 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding 5249 a BIP_Alloc_Form formal with call to new utility function 5250 Needs_BIP_Alloc_Form. 5251 52522011-09-01 Pascal Obry <obry@adacore.com> 5253 5254 * prj-part.adb: Minor reformatting. 5255 52562011-09-01 Vincent Celier <celier@adacore.com> 5257 5258 * prj-env.adb (Create_Mapping_File.Process): Encode the upper 5259 half character in the unit name. 5260 52612011-09-01 Hristian Kirtchev <kirtchev@adacore.com> 5262 5263 * exp_ch4.adb: Minor code and comment reformatting. 5264 52652011-09-01 Thomas Quinot <quinot@adacore.com> 5266 5267 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests 5268 for Is_Limited_Type and Is_Tagged_Type in condition checking 5269 for by-reference type. 5270 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other 5271 subprograms may have a completion because of a previous 5272 Inline_Always clause, but the enclosing package must be marked 5273 inlined for the subprogram body to become visible to the backend. 5274 52752011-09-01 Thomas Quinot <quinot@adacore.com> 5276 5277 * sem_aux.adb, exp_ch4.adb: Minor reformatting 5278 52792011-09-01 Pascal Obry <obry@adacore.com> 5280 5281 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting. 5282 52832011-09-01 Ed Schonberg <schonberg@adacore.com> 5284 5285 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to 5286 the formals of a subprogram stub that acts as a spec. 5287 52882011-09-01 Ed Schonberg <schonberg@adacore.com> 5289 5290 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference 5291 type, declare a renaming for it, not an object declaration. 5292 52932011-09-01 Yannick Moy <moy@adacore.com> 5294 5295 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter 5296 Ignore_Errors to ignore failures to read ALI files when True. 5297 52982011-09-01 Javier Miranda <miranda@adacore.com> 5299 5300 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default 5301 constructor calls associated with non-tagged record types. 5302 53032011-09-01 Robert Dewar <dewar@adacore.com> 5304 5305 * g-socthi-vms.adb: Minor reformatting. 5306 53072011-09-01 Nicolas Roche <roche@adacore.com> 5308 5309 * sysdep.c: Don't use macro functions for stdio functions on VxWorks 5310 in order to avoid impact of imcompatible changes. 5311 * cstreams.c: Likewise 5312 * cio.c: Likewise 5313 * aux-io.c: Likewise 5314 53152011-09-01 Yannick Moy <moy@adacore.com> 5316 5317 * lib-writ.adb (Write_With_Lines): Always output complete information 5318 on "with" line in Alfa mode, as this is required by formal verification 5319 back-end. 5320 53212011-09-01 Tristan Gingold <gingold@adacore.com> 5322 5323 * g-socthi-vms.adb: Add comments. 5324 53252011-09-01 Pascal Obry <obry@adacore.com> 5326 5327 * prj.ads: Minor reformatting. 5328 53292011-09-01 Vincent Celier <celier@adacore.com> 5330 5331 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming 5332 exceptions in the config pragmas file. 5333 53342011-09-01 Tristan Gingold <gingold@adacore.com> 5335 5336 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS. 5337 53382011-09-01 Hristian Kirtchev <kirtchev@adacore.com> 5339 5340 * exp_ch7.adb (Find_Insertion_List): New routine. 5341 (Process_Transient_Objects): Add code to handle the abnormal 5342 finalization of a controlled transient associated with a subprogram 5343 call. Since transients are cleaned up right after the associated 5344 context, an exception raised during a subprogram call may bypass the 5345 finalization code. 5346 53472011-09-01 Robert Dewar <dewar@adacore.com> 5348 5349 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is 5350 aliased. 5351 53522011-09-01 Robert Dewar <dewar@adacore.com> 5353 5354 * exp_ch4.adb, a-exexda.adb: Minor reformatting. 5355 53562011-09-01 Robert Dewar <dewar@adacore.com> 5357 5358 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting. 5359 53602011-09-01 Thomas Quinot <quinot@adacore.com> 5361 5362 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to 5363 GNATRTL_NONTASKING_OBJS. 5364 53652011-09-01 Robert Dewar <dewar@adacore.com> 5366 5367 * einfo.ads (Is_Aliased): Fix existing documentation and add note on 5368 possibility of this flag being set for formals in Ada 2012 mode. 5369 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada 5370 2012. 5371 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012 5372 mode. 5373 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for 5374 Ada 2012. 5375 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for 5376 Ada 2012. 5377 53782011-09-01 Hristian Kirtchev <kirtchev@adacore.com> 5379 5380 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper 5381 insertion node in a tree of nested Expression_With_Actions nodes. 5382 (Process_Transient_Object): In the case where a complex if statement 5383 has been converted into nested Expression_With_Actions nodes, the 5384 "hook" object and the associated access type must be inserted before 5385 the top most Expression_With_Actions. 5386 53872011-09-01 Robert Dewar <dewar@adacore.com> 5388 5389 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads, 5390 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting. 5391 53922011-09-01 Ed Schonberg <schonberg@adacore.com> 5393 5394 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012. 5395 53962011-09-01 Jose Ruiz <ruiz@adacore.com> 5397 5398 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU 5399 aspect. 5400 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect. 5401 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect 5402 in a similar way as we do for the Priority or Dispatching_Domain aspect. 5403 * s-mudido-affinity.adb (Dispatching_Domain_Tasks, 5404 Dispatching_Domains_Frozen): Move this local data to package 5405 System.Tasking because with the CPU aspect we need to have access 5406 to this data when creating the task in System.Tasking.Stages.Create_Task 5407 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen): 5408 Move these variables from the body of 5409 System.Multiprocessors.Dispatching_Domains because with the CPU aspect 5410 we need to have access to this data when creating the task in 5411 System.Tasking.Stages.Create_Task. 5412 * s-taskin.adb (Initialize): Signal the allocation of the environment 5413 task to a CPU, if any, so that we know whether the CPU can be 5414 transferred to a different dispatching domain. 5415 * s-tassta.adb (Create_Task): Check whether the CPU to which this task 5416 is being allocated belongs to the dispatching domain where the task 5417 lives. Signal the allocation of the task to a CPU, if any, so that we 5418 know whether the CPU can be transferred to a different dispatching 5419 domain. 5420 54212011-09-01 Ed Schonberg <schonberg@adacore.com> 5422 5423 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of 5424 attributes Same_Storage and Overlaps_Storage. 5425 54262011-09-01 Hristian Kirtchev <kirtchev@adacore.com> 5427 5428 * exp_strm.adb: Remove with and use clause for Opt. 5429 (Build_Array_Input_Function): Remove the version-dependent generation 5430 of the return statement. The Ada 2005 tree is now the default. 5431 54322011-09-01 Yannick Moy <moy@adacore.com> 5433 5434 * put_alfa.adb: Unconditionnally write files in Alfa section, so that 5435 it is never empty when compiling in Alfa mode. 5436 54372011-09-01 Robert Dewar <dewar@adacore.com> 5438 5439 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb, 5440 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb, 5441 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb, 5442 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting 5443 54442011-09-01 Matthew Heaney <heaney@adacore.com> 5445 5446 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb], 5447 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb] 5448 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface 5449 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the 5450 unbounded queue container. 5451 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the 5452 bounded queue container. 5453 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the 5454 unbounded priority queue container. 5455 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the 5456 bounded priority queue container. 5457 54582011-08-31 Pascal Obry <obry@adacore.com> 5459 5460 * a-direct.adb: Do not try to create an UNC path on Windows. 5461 (Create_Path): Skip leading computer name in UNC path if any. 5462 54632011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5464 5465 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the 5466 version-dependent generation of the return statement. The Ada 2005 tree 5467 is now the default. 5468 54692011-08-31 Thomas Quinot <quinot@adacore.com> 5470 5471 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined 5472 types Stream_Element_Offset and Storage_Offset have a different native 5473 type depending on whether the platform is 32 or 64 bits. When 5474 exchanging them, always convert to 64 bits. 5475 54762011-08-31 Yannick Moy <moy@adacore.com> 5477 5478 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option 5479 --force-alfa to gnat2why. 5480 54812011-08-31 Ed Schonberg <schonberg@adacore.com> 5482 5483 * sem_ch12.adb (Save_References): If the node has aspects, save 5484 references within the corresponding expressions in a separate step, 5485 because the aspects are not directly in the tree for the declaration 5486 to which they belong. 5487 54882011-08-31 Arnaud Charlet <charlet@adacore.com> 5489 5490 * freeze.adb (Freeze_Record_Type): Omit test on variable size component 5491 in CodePeer mode, since representation clauses are partially ignored. 5492 * gcc-interface/Make-lang.in: Update dependencies. 5493 54942011-08-31 Jose Ruiz <ruiz@adacore.com> 5495 5496 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb, 5497 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned 5498 to any dispatching domain. 5499 55002011-08-31 Thomas Quinot <quinot@adacore.com> 5501 5502 * exp_ch4.adb: Minor reformatting. 5503 55042011-08-31 Bob Duff <duff@adacore.com> 5505 5506 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication 5507 on nodes for which it is not defined. 5508 (Is_Non_Overriding_Operation): Exit the loop when we find a generic 5509 parent type. 5510 55112011-08-31 Bob Duff <duff@adacore.com> 5512 5513 * sem_ch3.adb (Process_Full_View): Disable legality check if 5514 In_Instance, to avoid spurious errors. 5515 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check 5516 if In_Instance, to avoid spurious errors. 5517 55182011-08-31 Pascal Obry <obry@adacore.com> 5519 5520 * a-direct.adb: Use Dir_Seps everywhere to properly handle all 5521 directory speparators. 5522 (Compose): Use Dir_Seps to handle both forms. 5523 (Create_Path): Use Dir_Seps instead of explicit check, no semantic 5524 changes. 5525 (Extension): Use Dir_Seps to handle both forms. 5526 55272011-08-31 Pascal Obry <obry@adacore.com> 5528 5529 * prj-conf.adb: Minor reformatting. 5530 55312011-08-31 Jose Ruiz <ruiz@adacore.com> 5532 5533 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the 5534 dispatching domain aspect. 5535 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain 5536 aspect. 5537 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the 5538 Dispatching_Domain aspect in a similar way as we do for the Priority 5539 aspect. 5540 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the 5541 Dispatching_Domain component if a Dispatching_Domain pragma or aspect 5542 is present. 5543 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task 5544 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma. 5545 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma 5546 Dispatching_Domain and add it to the task definition. 5547 (Sig_Flags): Add Pragma_Dispatching_Domain. 5548 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the 5549 support to find the types Dispatching_Domain and 5550 Dispatching_Domain_Access. 5551 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain, 5552 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and 5553 query the availability of a pragma Dispatching_Domain. 5554 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by 5555 the expander to pass the Dispatching_Domain when creating a task. 5556 (Name_Dispatching_Domain): Add this new name for a pragma. 5557 (Pragma_Id): Add the new Pragma_Dispatching_Domain. 5558 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the 5559 task has been allocated at creation time. 5560 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using 5561 Ravenscar is always null. 5562 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which 5563 the task has been allocated at creation time. 5564 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have 5565 a specific dispatching domain. 5566 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb, 5567 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain 5568 and CPU are specified for the task, and the CPU value is not contained 5569 within the range of processors for the domain. 5570 55712011-08-31 Vincent Celier <celier@adacore.com> 5572 5573 * make.adb (Original_Gcc) : New constant String_Access. 5574 (Gnatmake): For VM targets, do not use VM version of the compiler if 5575 --GCC= has been specified. 5576 55772011-08-31 Thomas Quinot <quinot@adacore.com> 5578 5579 * sem_ch5.adb: Minor reformatting. 5580 55812011-08-31 Ed Schonberg <schonberg@adacore.com> 5582 5583 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do 5584 not reanalyze it. 5585 55862011-08-31 Bob Duff <duff@adacore.com> 5587 5588 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case 5589 the access type is private; we don't care about privacy in expansion. 5590 55912011-08-31 Ed Schonberg <schonberg@adacore.com> 5592 5593 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate 5594 subcomponents tnat may be limited, because they originate in view 5595 conflicts. If the original aggregate is legal and the actuals are 5596 legal, the aggregate itself is legal. 5597 55982011-08-31 Matthew Heaney <heaney@adacore.com> 5599 5600 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock 5601 status. 5602 56032011-08-31 Ed Schonberg <schonberg@adacore.com> 5604 5605 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all 5606 errors in B tests. 5607 56082011-08-31 Jose Ruiz <ruiz@adacore.com> 5609 5610 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and 5611 Interrupt_Priority aspects, force the analysis of the aspect expression 5612 (when building the equivalent pragma). Otherwise, its analysis is done 5613 too late, after the task or protected object has been created. 5614 * sem_ch9.adb (Analyze_Single_Protected_Declaration, 5615 Analyze_Single_Task_Declaration): Remove the code to move the aspects 5616 to the object declaration because they are needed in the type 5617 declaration. 5618 56192011-08-31 Robert Dewar <dewar@adacore.com> 5620 5621 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb, 5622 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor 5623 reformatting. 5624 56252011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5626 5627 * exp_util.adb (Find_Protection_Type): Do not look for fields _object 5628 if the corresponding type is malformed due to restriction violations. 5629 56302011-08-31 Robert Dewar <dewar@adacore.com> 5631 5632 * s-ransee.ads, s-ransee.adb: Minor reformatting. 5633 56342011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5635 5636 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which 5637 would cause the generation of Set_Finalize_Address if the target is a 5638 VM and the designated type is not derived from [Limited_]Controlled. 5639 56402011-08-31 Arnaud Charlet <charlet@adacore.com> 5641 5642 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New 5643 subprogram. 5644 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in 5645 case of a compilation error. 5646 56472011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5648 5649 * init.c (__gnat_error_handler): Standardize the stack overflow or 5650 erroneous memory access message. 5651 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow 5652 or erroneous memory access message. 5653 56542011-08-31 Robert Dewar <dewar@adacore.com> 5655 5656 * sem_ch4.adb: Minor reformatting. 5657 * sem_ch6.adb: Minor code reorganization (use Ekind_In). 5658 56592011-08-31 Thomas Quinot <quinot@adacore.com> 5660 5661 * scos.ads: Minor documentation clarification. 5662 * put_scos.adb: Do not generate SCO unit header line for a unit that 5663 has no SCO lines. 5664 56652011-08-31 Robert Dewar <dewar@adacore.com> 5666 5667 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting. 5668 56692011-08-31 Tristan Gingold <gingold@adacore.com> 5670 5671 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to 5672 hold variables between these following subprograms. 5673 (Build_Exception_Handler, Build_Object_Declarations, 5674 Build_Raise_Statement): Use the above type as parameter. 5675 Make the above adjustments. 5676 * exp_intr.adb (Expand_Unc_Deallocation): Adjust. 5677 56782011-08-31 Pascal Obry <obry@adacore.com> 5679 5680 * projects.texi: Minor reformatting. 5681 56822011-08-31 Tristan Gingold <gingold@adacore.com> 5683 5684 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit. 5685 * s-rannum.adb (Reset): Use Get_Seed from s-ransee. 5686 56872011-08-31 Ed Schonberg <schonberg@adacore.com> 5688 5689 * exp_ch5.adb: Minor code cleanup. 5690 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to 5691 prevent cascaded errors. 5692 (Analyze_Loop_Statement): In semantics-only mode, introduce loop 5693 variable of an iterator specification in current scope. 5694 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip 5695 postconditions on the stack, as they contain no return statements. 5696 56972011-08-31 Yannick Moy <moy@adacore.com> 5698 5699 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration, 5700 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply 5701 call Qualify_Entity_Names. 5702 (Expand_Alfa): call Qualify_Entity_Names in more cases 5703 * lib-xref-alfa.adb: Take into account system package. 5704 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to 5705 CodePeer mode in which we are interested in finding bugs even if 5706 compiler cannot compile source. 5707 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of 5708 deferred constant. 5709 57102011-08-31 Gary Dismukes <dismukes@adacore.com> 5711 5712 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype 5713 denoted by the subtype mark to ensure getting the concurrent type in 5714 the case where the subtype mark denotes a private subtype of a 5715 concurrent type (needed when using -gnatc). 5716 (Process_Subtype): For the processing specific to type kinds, case on 5717 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the 5718 subtype denotes a private subtype whose base type is nonprivate (needed 5719 for subtypes of private fulfilled by task types when compiling with 5720 -gnatc). 5721 57222011-08-31 Gary Dismukes <dismukes@adacore.com> 5723 5724 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of 5725 late primitives that override interface operations when the full 5726 expander is not active, to avoid blowups in Register_Primitive when 5727 types don't have associated secondary dispatch tables. 5728 57292011-08-31 Yannick Moy <moy@adacore.com> 5730 5731 * alfa_test.adb: Code clean up. 5732 57332011-08-31 Marc Sango <sango@adacore.com> 5734 5735 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N) 5736 by Comes_From_Source (Original_Node (N)) in order to treat also the 5737 nodes which have been rewritten. 5738 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the 5739 explicit dereference and slice violation in spark mode on the nodes 5740 coming only from the source code. 5741 57422011-08-31 Robert Dewar <dewar@adacore.com> 5743 5744 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb, 5745 lib-xref-alfa.adb: Minor reformatting. 5746 57472011-08-31 Matthew Heaney <heaney@adacore.com> 5748 5749 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component. 5750 57512011-08-31 Javier Miranda <miranda@adacore.com> 5752 5753 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search 5754 only for class-wide subprograms conflicting with entities of concurrent 5755 tagged types. 5756 57572011-08-31 Matthew Heaney <heaney@adacore.com> 5758 5759 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of 5760 node to null value. 5761 57622011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5763 5764 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more 5765 general description of the routine. 5766 57672011-08-31 Ed Schonberg <schonberg@adacore.com> 5768 5769 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded 5770 doubly-linked lists. 5771 57722011-08-31 Gary Dismukes <dismukes@adacore.com> 5773 5774 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant 5775 check is needed for a left-hand side that is a dereference, and the 5776 base type is private without discriminants (whereas the full type does 5777 have discriminants), an extra retrieval of the underlying type may be 5778 needed in the case where the subtype is a record subtype whose base 5779 type is private. Update comments. 5780 57812011-08-31 Javier Miranda <miranda@adacore.com> 5782 5783 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is 5784 found check if there is a class-wide subprogram covering the primitive. 5785 57862011-08-31 Yannick Moy <moy@adacore.com> 5787 5788 * sem_res.adb: Further cases where full expansion test is needed, 5789 rather than expansion test. 5790 57912011-08-31 Pascal Obry <obry@adacore.com> 5792 5793 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list) 5794 57952011-08-31 Ed Schonberg <schonberg@adacore.com> 5796 5797 * exp_ch5.adb: Handle iterators over derived container types. 5798 57992011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5800 5801 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master. 5802 (Has_Anonymous_Master): New routine. 5803 (Set_Has_Anonymous_Master): New routine. 5804 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master. 5805 * exp_ch4.adb: Add with and use clause for Sem_Ch8. 5806 (Current_Anonymous_Master): New routine. 5807 (Current_Unit_First_Declaration): Removed. 5808 (Current_Unit_Scope): Removed. 5809 (Expand_N_Allocator): Anonymous access-to-controlled types now chain 5810 their objects on a per-unit heterogeneous finalization master. 5811 58122011-08-31 Matthew Heaney <heaney@adacore.com> 5813 5814 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets 5815 array. 5816 58172011-08-31 Jose Ruiz <ruiz@adacore.com> 5818 5819 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask 5820 when not needed. 5821 58222011-08-31 Gary Dismukes <dismukes@adacore.com> 5823 5824 * sem_disp.adb (Propagate_Tag): Return without propagating in the case 5825 where the actual is an unexpanded call to 'Input. 5826 58272011-08-31 Yannick Moy <moy@adacore.com> 5828 5829 * sem_ch4.adb: Code clean up. 5830 58312011-08-31 Yannick Moy <moy@adacore.com> 5832 5833 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice. 5834 58352011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5836 5837 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize 5838 and TSS primitive Finalize_Address if finalization is suppressed. 5839 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS 5840 primitive Finalize_Address if finalization is suppressed. 5841 58422011-08-31 Jose Ruiz <ruiz@adacore.com> 5843 5844 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb, 5845 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make 5846 sure that the underlying task has already been created before trying 5847 to change its affinity. 5848 (Set_CPU): Use the term processor instead of CPU, as we do in 5849 Assign_Task. 5850 58512011-08-31 Vincent Celier <celier@adacore.com> 5852 5853 * prj-attr.adb: New Compiler attribute Source_File_Switches. 5854 * prj-nmsc.adb (Process_Compiler): Process attribute 5855 Source_File_Switches. 5856 * prj.ads (Language_Config): New name list component 5857 Name_Source_File_Switches. 5858 * snames.ads-tmpl (Name_Source_File_Switches): New standard name. 5859 58602011-08-31 Ed Schonberg <schonberg@adacore.com> 5861 5862 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a 5863 discriminated component of an actual, expand at once to prevent 5864 ouf-of-order references with generated subtypes. 5865 58662011-08-31 Yannick Moy <moy@adacore.com> 5867 5868 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read 5869 reference to operator in Alfa xrefs. 5870 58712011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5872 5873 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case 5874 where the parent instance was frozen before the current instance due to 5875 the presence of a source body. Update calls to Insert_After_Last_Decl. 5876 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance. 5877 Update the comment which illustrates the purpose of the routine. 5878 Package instances are now frozen by source bodies which appear after 5879 the instance. This ensures that entities coming from within the 5880 instance are available for use in the said bodies. 5881 (Install_Body): Add code to handle the case where the parent instance 5882 was frozen before the current instance due to the presence of a source 5883 body. Update calls to Insert_After_Last_Decl. 5884 58852011-08-31 Jose Ruiz <ruiz@adacore.com> 5886 5887 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous 5888 access types. 5889 * affinity.c (__gnat_set_affinity_mask): Declare index variable. 5890 58912011-08-31 Yannick Moy <moy@adacore.com> 5892 5893 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in 5894 full-expander test. 5895 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb, 5896 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb, 5897 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb, 5898 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb, 5899 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb, 5900 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, 5901 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming 5902 ALFA in Alfa (we dropped acronym). 5903 * einfo.adb (Primitive_Operations): Correctly return list of primitive 5904 operations in a case where it returned previously No_Elist. 5905 59062011-08-31 Robert Dewar <dewar@adacore.com> 5907 5908 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb, 5909 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads, 5910 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb, 5911 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb, 5912 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads, 5913 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor 5914 reformatting. 5915 59162011-08-31 Hristian Kirtchev <kirtchev@adacore.com> 5917 5918 * sem_ch12 (Check_Private_View): Revert previous change. 5919 * sem_res.adb (Conversion_Check): Do not emit the error message if the 5920 conversion is in a generic instance. 5921 59222011-08-31 Matthew Heaney <heaney@adacore.com> 5923 5924 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array. 5925 * a-chtgbo.adb (Free): Allow 0 as index value. 5926 59272011-08-31 Matthew Heaney <heaney@adacore.com> 5928 5929 * a-cborma.adb (Insert): Add comment to explain why no element 5930 assignment. 5931 59322011-08-31 Gary Dismukes <dismukes@adacore.com> 5933 5934 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the 5935 spec discriminant is already a concurrent type, in which case just use 5936 it, otherwise fetch the Corresponding_Concurrent_Type as before. 5937 59382011-08-30 Eric Botcazou <ebotcazou@adacore.com> 5939 5940 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads, 5941 system-linux-mips.ads, system-linux-mipsel.ads, 5942 system-linux-mips64el.ads, system-linux-ppc64.ads, 5943 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support. 5944 59452011-08-30 Eric Botcazou <ebotcazou@adacore.com> 5946 5947 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check. 5948 * gcc-interface/utils2.c (build_binary_op): Tighten condition. 5949 (build_unary_op): Likewise. 5950 59512011-08-30 Eric Botcazou <ebotcazou@adacore.com> 5952 5953 * raise-gcc.c: Do not include coretypes.h and tm.h. 5954 (setup_to_install): Remove test for compiler macro. 5955 * targext.c: Document use for the library. 5956 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC. 5957 59582011-08-30 Eric Botcazou <ebotcazou@adacore.com> 5959 5960 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert 5961 the expression to the nominal type if the latter is a record type with 5962 a variant part and the type of the former is a record type without one. 5963 59642011-08-30 Yannick Moy <moy@adacore.com> 5965 5966 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during 5967 expansion in Alfa mode. 5968 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public 5969 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for 5970 Alfa mode. 5971 * gnat1drv.adb (Adjust_Global_Switches): Update Comment. 5972 * sem_res.adb: Ditto. 5973 * gcc-interface/Make-lang.in: Update dependencies. 5974 59752011-08-30 Thomas Quinot <quinot@adacore.com> 5976 5977 * g-socket.ads: Minor documentation adjustment. 5978 59792011-08-30 Robert Dewar <dewar@adacore.com> 5980 5981 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting. 5982 59832011-08-30 Yannick Moy <moy@adacore.com> 5984 5985 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb, 5986 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads, 5987 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb, 5988 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb: 5989 Revert change which introduced files for "light" 5990 expansion, to be replaced by a single file for Alfa expansion. 5991 59922011-08-30 Robert Dewar <dewar@adacore.com> 5993 5994 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment. 5995 Minor code reorg/reformatting. 5996 59972011-08-30 Yannick Moy <moy@adacore.com> 5998 5999 * opt.adb, opt.ads (Full_Expander_Active): New function defines a 6000 common shorthand for (Expander_Active and not ALFA_Mode) that can be 6001 used for testing full expansion, that is active expansion not in the 6002 reduced mode for Alfa 6003 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb, 6004 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead 6005 of the verbose (Expander_Active and not ALFA_Mode) 6006 60072011-08-30 Tristan Gingold <gingold@adacore.com> 6008 6009 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb, 6010 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb, 6011 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads: 6012 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage 6013 60142011-08-30 Gary Dismukes <dismukes@adacore.com> 6015 6016 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous 6017 access conversions to check that the conversion is a rewritten node, 6018 rather than just having Comes_From_Source set to False, which wasn't 6019 sufficient. 6020 60212011-08-30 Robert Dewar <dewar@adacore.com> 6022 6023 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb, 6024 g-socket.ads: Minor reformatting. 6025 60262011-08-30 Thomas Quinot <quinot@adacore.com> 6027 6028 * sem_util.adb: Minor reformatting. 6029 60302011-08-30 Tristan Gingold <gingold@adacore.com> 6031 6032 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set, 6033 to be compliant with the ABI. 6034 60352011-08-30 Hristian Kirtchev <kirtchev@adacore.com> 6036 6037 * sem_ch12.adb (Check_Private_View): Exchange the private and full view 6038 of a designated type when the related access type is an actual in an 6039 instance. This ensures that the full view of designated type is 6040 available when inside the body of the instance. 6041 60422011-08-30 Ed Schonberg <schonberg@adacore.com> 6043 6044 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be 6045 in a position to be modified, a slice is treated like an indexed 6046 component. 6047 60482011-08-30 Thomas Quinot <quinot@adacore.com> 6049 6050 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for 6051 field tv_sec in struct timeval. 6052 60532011-08-30 Yannick Moy <moy@adacore.com> 6054 6055 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several 6056 blocks of code doing full expansion, previously only guarded by 6057 Expander_Active, by anding the test that ALFA_Mode is not set 6058 60592011-08-30 Ed Schonberg <schonberg@adacore.com> 6060 6061 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete, 6062 add the function to the list of private dependents, for subsequent 6063 legality check on Taft amendment types. 6064 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize 6065 Private_Dependents, as for other incomplete types. 6066 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a 6067 Taft-amendment type is used as the return type of a function. 6068 60692011-08-30 Javier Miranda <miranda@adacore.com> 6070 6071 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code 6072 which emits an error by a call to a new routine which report the error. 6073 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the 6074 entity does not cover an existing interface. 6075 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize 6076 code. 6077 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of 6078 protected procedures or entries whose mode is not conformant. 6079 (Check_Synchronized_Overriding): Code cleanup: replace code which emits 6080 an error by a call to a new routine which report the error. 6081 60822011-08-30 Robert Dewar <dewar@adacore.com> 6083 6084 * gnat_rm.texi: Minor change. 6085 * exp_attr_light.adb: Minor reformatting. 6086 60872011-08-30 Ed Schonberg <schonberg@adacore.com> 6088 6089 * sem_ch3.adb: Patch inheritance of aspects in 6090 Complete_Private_Subtype, to avoid infinite loop. 6091 60922011-08-30 Javier Miranda <miranda@adacore.com> 6093 6094 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have 6095 been reported and a subprogram covering an interface primitive is not 6096 found then skip generating the internal entity. Done to avoid crashing 6097 the frontend. 6098 (Check_Abstract_Overriding): Change text of error of wrong formal of 6099 protected subprogram or entry. Done for consistency to emit exactly the 6100 same error reported by Check_Synchronized_Overriding. In addition, the 6101 error is restricted to protected types (bug found working on AI05-0090) 6102 61032011-08-30 Yannick Moy <moy@adacore.com> 6104 6105 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during 6106 expansion in Alfa mode. 6107 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public. 6108 * exp_light.adb, exp_light.ads: New package defining light expansion. 6109 * expander.adb (Expand): Call light expansion in Alfa mode 6110 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6 6111 constructs. 6112 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7 6113 constructs. 6114 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes 6115 * gnat1drv.adb (Adjust_Global_Switches): Comment 6116 61172011-08-30 Yannick Moy <moy@adacore.com> 6118 6119 * lib-xref-alfa.adb: Minor refactoring. 6120 61212011-08-30 Yannick Moy <moy@adacore.com> 6122 6123 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa 6124 mode. 6125 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform 6126 expansion in Alfa mode. 6127 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa 6128 mode. 6129 61302011-08-30 Robert Dewar <dewar@adacore.com> 6131 6132 * debug_a.adb: Update comment. 6133 61342011-08-30 Robert Dewar <dewar@adacore.com> 6135 6136 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb, 6137 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb, 6138 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb, 6139 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting 6140 61412011-08-30 Robert Dewar <dewar@adacore.com> 6142 6143 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma 6144 volatile. 6145 61462011-08-30 Hristian Kirtchev <kirtchev@adacore.com> 6147 6148 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to 6149 Build_Finalization_Master by supplying an insertion node and enclosing 6150 scope. In its old version, the call did not generate a finalization 6151 master. 6152 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to 6153 recognize anonymous access-to-controlled components. Rewrite the 6154 machinery which creates finalization masters to service anonymous 6155 access-to-controlled components of a record type. In its current state, 6156 only one heterogeneous master is necessary to handle multiple anonymous 6157 components. 6158 (Freeze_Type): Comment reformatting. 6159 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and 6160 RE_Unit_Table. 6161 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which 6162 associates TSS primitive Finalize_Address with either the master itself 6163 or with the internal hash table depending on the mode of operation of 6164 the master. 6165 61662011-08-30 Javier Miranda <miranda@adacore.com> 6167 6168 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an 6169 interface type then do not generate code to compare this component. 6170 Required since they have no components and their equality operator is 6171 abstract. 6172 61732011-08-30 Steve Baird <baird@adacore.com> 6174 6175 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type 6176 of a saooaaat (i.e, a stand-alone object of an anonymous access type), 6177 returns the (static) accessibility level of the object. Otherwise, the 6178 same as Type_Access_Level. 6179 (Dynamic_Accessibility_Level): New function; given an expression which 6180 could occur as the rhs of an assignment to a saooaaat (i.e., an 6181 expression of an access-to-object type), return the new value for the 6182 saooaaat's associated Extra_Accessibility object. 6183 (Effective_Extra_Accessibility): New function; same as 6184 Einfo.Extra_Accessibility except that object renames are looked through. 6185 * sem_util.adb 6186 (Deepest_Type_Access_Level): New function; see sem_util.ads description. 6187 (Dynamic_Accessibility_Level): New function; see sem_util.ads 6188 description. 6189 (Effective_Extra_Accessibility): New function; see sem_util.ads 6190 description. 6191 * einfo.ads (Is_Local_Anonymous_Access): Update comments. 6192 (Extra_Accessibility): Update comments. 6193 (Init_Object_Size_Align): New procedure; same as Init_Size_Align 6194 except RM_Size field (which is only for types) is unaffected. 6195 * einfo.adb 6196 (Extra_Accessibility): Expand domain to allow objects, not just formals. 6197 (Set_Extra_Accessibility): Expand domain to allow objects, not just 6198 formals. 6199 (Init_Size): Add assertion that we are not trashing the 6200 Extra_Accessibility attribute of an object. 6201 (Init_Size_Align): Add assertion that we are not trashing the 6202 Extra_Accessibility attribute of an object. 6203 (Init_Object_Size_Align): New procedure; see einfo.ads description. 6204 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access 6205 differently for the type of a (non-library-level) saooaaat depending 6206 whether Ada_Version < Ada_2012. This is the only point where Ada_Version 6207 is queried in this set of changes - everything else (in particular, 6208 setting of the Extra_Accessibility attribute in exp_ch3.adb) is 6209 driven off of the setting of the Is_Local_Anonymous_Access attribute. 6210 The special treatment of library-level saooaaats is an optimization, 6211 not required for correctnesss. This is based on the observation that the 6212 Ada2012 rules (static and dynamic) for saooaaats turn out to be 6213 equivalent to the Ada2005 rules in the case of a library-level saooaaat. 6214 * exp_ch3.adb 6215 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is 6216 false for the type of a saooaaat, declare and initialize its 6217 accessibility level object and set the Extra_Accessibility attribute 6218 of the saooaaat to refer to this object. 6219 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support. 6220 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with 6221 calls to Effective_Extra_Accessibility in order to support 6222 renames of saooaaats. 6223 (Expand_N_Type_Conversion): Add new local function, 6224 Has_Extra_Accessibility, and call it when determining whether an 6225 accessibility check is needed. 6226 It returns True iff Present (Effective_Extra_Accessibility (Id)) would 6227 evaluate to True (without raising an exception). 6228 * exp_ch5.adb 6229 (Expand_N_Assignment_Statement): When assigning to an Ada2012 6230 saooaaat, update its associated Extra_Accessibility object (if 6231 it has one). This includes an accessibility check. 6232 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates 6233 a saooaaat, update its Extra_Accessibility object too (if it 6234 has one). 6235 (Expand_Call): Replace a couple of calls to Type_Access_Level 6236 with calls to Dynamic_Access_Level to handle cases where 6237 passing a literal (any literal) is incorrect. 6238 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility 6239 checks associated with "Saooaat := Some_Object'Access;"; this must 6240 be rejected if Some_Object is declared in a more nested scope 6241 than Saooaat. 6242 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an 6243 assignment to a saooaaat even if Is_Local_Anonymous_Access 6244 returns False for its type (indicating a 2012-style saooaaat). 6245 * sem_ch8.adb 6246 (Analyze_Object_Renaming): Replace a call to Init_Size_Align 6247 (which is only appropriate for objects, not types) with a call 6248 of Init_Object_Size_Align in order to avoid trashing the 6249 Extra_Accessibility attribute of a rename (the two attributes 6250 share storage). 6251 * sem_res.adb 6252 (Valid_Conversion) Replace six calls to Type_Access_Level with 6253 calls to Deepest_Type_Access_Level. This is a bit tricky. For an 6254 Ada2012 non-library-level saooaaat, the former returns library level 6255 while the latter returns the (static) accessibility level of the 6256 saooaaat. A type conversion to the anonymous type of a saooaaat 6257 can only occur as part of an assignment to the saooaaat, so we 6258 know that such a conversion must be in a lhs context, so Deepest 6259 yields the result that we need. If such a conversion could occur, 6260 say, as the operand of an equality operator, then this might not 6261 be right. Also add a test so that static accessibilty checks are 6262 performed for converting to a saooaaat's type even if 6263 Is_Local_Anonymous_Access yields False for the type. 6264 62652011-08-30 Javier Miranda <miranda@adacore.com> 6266 6267 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that 6268 controls generation of a warning associated with late declaration of 6269 dispatching functions. Required to avoid generating spurious 6270 warnings. 6271 62722011-08-30 Gary Dismukes <dismukes@adacore.com> 6273 6274 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the 6275 return object has an anonymous access type and the function's type is 6276 a named access type. 6277 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming 6278 conversions on implicit conversions, since such conversions can occur 6279 for anonymous access cases due to expansion. Issue error for attempt 6280 to rename an anonymous expression as an object of a named access type. 6281 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs, 6282 to indicate whether this function should report errors on invalid 6283 conversions. 6284 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of 6285 the expression is of an anonymous access type and the expected type is 6286 a named general access type, rewrite the expression as a type 6287 conversion, unless this is an expression of a membership test. 6288 (Valid_Conversion.Error_Msg_N): New procedure that conditions the 6289 calling of Error_Msg_N on new formal Report_Errs. 6290 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the 6291 calling of Error_Msg_NE on new formal Report_Errs. 6292 (Valid_Conversion): Move declaration of this function to the package 6293 spec, to allow calls from membership test processing. For Ada 2012, 6294 enforce legality restrictions on implicit conversions of anonymous 6295 access values to general access types, disallowing such conversions in 6296 cases where the expression has a dynamic accessibility level (access 6297 parameters, stand-alone anonymous access objects, or a component of a 6298 dereference of one of the first two cases). 6299 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type 6300 in the context of a named general access expected type. 6301 * exp_ch4.adb Add with and use of Exp_Ch2. 6302 (Expand_N_In): Add processing for membership tests applied to 6303 expressions of an anonymous access type. First, Valid_Conversion is 6304 called to check whether the test is statically False, and then the 6305 conversion is expanded to test that the expression's accessibility 6306 level is no deeper than that of the tested type. In the case of 6307 anonymous access-to-tagged types, a tagged membership test is applied 6308 as well. 6309 (Tagged_Membership): Extend to handle access type cases, applying the 6310 test to the designated types. 6311 * exp_ch6.adb (Expand_Call): When creating an extra actual for an 6312 accessibility level, and the actual is a 'Access applied to a current 6313 instance, pass the accessibility level of the type of the current 6314 instance rather than applying Object_Access_Level to the prefix. Add a 6315 ??? comment, since this level isn't quite right either (will eventually 6316 need to pass an implicit level parameter to init procs). 6317 63182011-08-30 Bob Duff <duff@adacore.com> 6319 6320 * s-taskin.ads: Minor comment fix. 6321 63222011-08-30 Ed Schonberg <schonberg@adacore.com> 6323 6324 * sem_res.adb (Check_Parameterless_Call): If the node is a selected 6325 component and the selector is a dispatching operation, check if it is 6326 a prefixed call before rewriting as a parameterless function call. 6327 63282011-08-29 Jakub Jelinek <jakub@redhat.com> 6329 6330 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy 6331 tsystem.h into $(RTSDIR) instead of rts. 6332 63332011-08-29 Robert Dewar <dewar@adacore.com> 6334 6335 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor 6336 reformatting. 6337 * gcc-interface/Make-lang.in: Update dependencies. 6338 63392011-08-29 Yannick Moy <moy@adacore.com> 6340 6341 * alfa.ads (Name_Of_Heap_Variable): New constant name. 6342 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global 6343 table to hold dereferences. 6344 (Add_ALFA_Xrefs): Take into account dereferences as special 6345 reads/writes to the variable "HEAP". 6346 (Enclosing_Subprogram_Or_Package): Move subprogram here. 6347 (Generate_Dereference): New procedure to store a read/write dereferencew 6348 in the table Drefs. 6349 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for 6350 the special "HEAP" var. 6351 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference 6352 in ALFA mode. 6353 * sem_util.adb (Note_Possible_Modification): Store write dereference 6354 in ALFA mode. 6355 63562011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 6357 6358 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which 6359 ensures that the level of the subpool access type is not deeper than 6360 that of the pool object. 6361 * sem_util.adb (Object_Access_Level): Expand to handle defining 6362 identifiers. 6363 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the 6364 subpool handle name of a rewritten allocator. 6365 63662011-08-29 Robert Dewar <dewar@adacore.com> 6367 6368 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting. 6369 63702011-08-29 Thomas Quinot <quinot@adacore.com> 6371 6372 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple 6373 values, we generate multiple triples of parameters in the TypeCode. 6374 Bump Choice_Index for each such triple so that a subsequent default 6375 choice is associated with the correct index in the typecode. 6376 63772011-08-29 Ed Schonberg <schonberg@adacore.com> 6378 6379 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null 6380 container. 6381 (First, Last): Handle properly an iterator over a null container. 6382 63832011-08-29 Bob Duff <duff@adacore.com> 6384 6385 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon 6386 processing if we run across a node with no Scope. This can happen if 6387 we're with-ing an library-level instance, and that instance got errors 6388 that caused "instantiation abandoned". 6389 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising 6390 an exception instead of using Assert, so it won't go into an infinite 6391 loop, even when assertions are turned off. 6392 63932011-08-29 Ed Schonberg <schonberg@adacore.com> 6394 6395 * a-coorse.adb: Proper handling of empty ordered sets. 6396 63972011-08-29 Johannes Kanig <kanig@adacore.com> 6398 6399 * debug.adb: Add comments. 6400 64012011-08-29 Thomas Quinot <quinot@adacore.com> 6402 6403 * a-except.adb, a-except-2005.adb: Minor comment rewording and 6404 reformatting. 6405 64062011-08-29 Yannick Moy <moy@adacore.com> 6407 6408 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of 6409 declaration for Itypes in Alfa mode. 6410 64112011-08-29 Robert Dewar <dewar@adacore.com> 6412 6413 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb, 6414 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads, 6415 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor 6416 reformatting. 6417 64182011-08-29 Tristan Gingold <gingold@adacore.com> 6419 6420 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to 6421 package spec. 6422 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler. 6423 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts 6424 while raising PE. 6425 64262011-08-29 Robert Dewar <dewar@adacore.com> 6427 6428 * a-cbhama.adb, a-cbhama.ads: Minor reformatting. 6429 64302011-08-29 Javier Miranda <miranda@adacore.com> 6431 6432 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for 6433 renamings of formal subprograms when the actual for a formal type is 6434 class-wide. 6435 64362011-08-29 Matthew Heaney <heaney@adacore.com> 6437 6438 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment 6439 to Target. 6440 64412011-08-29 Matthew Heaney <heaney@adacore.com> 6442 6443 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all 6444 components of record type. 6445 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw 6446 to Target. 6447 64482011-08-29 Ed Schonberg <schonberg@adacore.com> 6449 6450 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb, 6451 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to 6452 container packages. 6453 64542011-08-29 Robert Dewar <dewar@adacore.com> 6455 6456 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor 6457 reformatting. 6458 64592011-08-29 Matthew Heaney <heaney@adacore.com> 6460 6461 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all 6462 components of record type. 6463 64642011-08-29 Bob Duff <duff@adacore.com> 6465 6466 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated 6467 by the termination handler. 6468 64692011-08-29 Yannick Moy <moy@adacore.com> 6470 6471 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes 6472 created in Alfa mode, instead of inserting artificial declarations of 6473 non-Itypes in the tree. 6474 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to 6475 know if an Itype has a corresponding declaration, as defined in 6476 itypes.ads. 6477 64782011-08-29 Yannick Moy <moy@adacore.com> 6479 6480 * gnat1drv.adb: Minor rewrite. 6481 64822011-08-29 Bob Duff <duff@adacore.com> 6483 6484 * s-tasuti.adb (Make_Passive): Work around race condition in 6485 Make_Independent, which can cause Wait_Count to be zero. So instead of 6486 asserting that Wait_Count > 0, and then decrementing it, decrement it 6487 only if Wait_Count > 0. 6488 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these 6489 should be nonnegative, so declare them Natural instead of Integer. 6490 64912011-08-29 Robert Dewar <dewar@adacore.com> 6492 6493 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb, 6494 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb, 6495 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb, 6496 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb, 6497 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting. 6498 64992011-08-29 Tristan Gingold <gingold@adacore.com> 6500 6501 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels. 6502 65032011-08-29 Vadim Godunko <godunko@adacore.com> 6504 6505 * s-parint.ads: Minor comment clarification. 6506 65072011-08-29 Vincent Celier <celier@adacore.com> 6508 6509 * prj.adb (Initialize): Make sure that new reserved words after Ada 95 6510 may be used as identifiers. 6511 65122011-08-29 Ed Schonberg <schonberg@adacore.com> 6513 6514 * a-coinho.ads: Minor reformating. 6515 65162011-08-29 Ed Schonberg <schonberg@adacore.com> 6517 6518 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a 6519 container of a derived type. 6520 65212011-08-29 Ed Schonberg <schonberg@adacore.com> 6522 6523 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads, 6524 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers. 6525 65262011-08-29 Pascal Obry <obry@adacore.com> 6527 6528 * exp_disp.adb: Minor comment fix. 6529 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters 6530 to avoid warnings when compiling with -Wall. 6531 (Make_Disp_Conditional_Select_Body): Likewise. 6532 (Make_Disp_Timed_Select_Body): Likewise. 6533 65342011-08-29 Ed Schonberg <schonberg@adacore.com> 6535 6536 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is 6537 an entity name, generate reference for it. 6538 65392011-08-29 Ed Schonberg <schonberg@adacore.com> 6540 6541 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S" 6542 iterator form. 6543 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for 6544 the class-wide type. 6545 * sem_ch5.adb: Move some rewriting to the expander, where it belongs. 6546 65472011-08-29 Ed Schonberg <schonberg@adacore.com> 6548 6549 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual 6550 subtype for an object whose type is an unconstrained union. 6551 65522011-08-29 Ed Schonberg <schonberg@adacore.com> 6553 6554 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased" 6555 is allowed in a component definition, by AI95-406. 6556 65572011-08-29 Matthew Heaney <heaney@adacore.com> 6558 6559 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next. 6560 65612011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 6562 6563 * a-except-2005.adb: Alphabetize all routines. 6564 (Triggered_By_Abort): New routine. 6565 * a-except-2005.ads (Triggered_By_Abort): New routine. 6566 * a-except.adb Alphabetize all routines. 6567 (Triggered_By_Abort): New routine. 6568 * a-except.ads (Triggered_By_Abort): New routine. 6569 * exp_ch7.adb: Update all comments involving the detection of aborts in 6570 finalization code. 6571 (Build_Object_Declarations): Do not generate code to detect the 6572 presence of an abort at the start of finalization code, use a runtime 6573 routine istead. 6574 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and 6575 RE_Unit_Table. 6576 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to 6577 allocate a task on a subpool. 6578 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use. 6579 The flag disables all actions related to the maintenance of 6580 Finalize_Address_Table when subpools are not in use. 6581 (Allocate_Any_Controlled): Signal the machinery that subpools are in 6582 use. 6583 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which 6584 performs costly task locking when subpools are not in use. 6585 65862011-08-29 Yannick Moy <moy@adacore.com> 6587 6588 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged 6589 types and dispatching calls in Alfa mode. 6590 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of 6591 correspondance between body and spec scopes, to reuse utility functions 6592 (Traverse_Declarations_Or_Statements): Protect access to body for stub 6593 by testing the presence of the library unit for the body 6594 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa 6595 mode the expansion of accept statements is skipped 6596 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning 6597 the unique entity corresponding to the one returned by 6598 Unique_Defining_Entity applied to the enclosing declaration of the 6599 argument. 6600 66012011-08-29 Bob Duff <duff@adacore.com> 6602 6603 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in 6604 gdb when x is not a node (it can be a node list, name_id, etc). pp is 6605 an alias for pn. ppp is an alias for pt. 6606 66072011-08-29 Javier Miranda <miranda@adacore.com> 6608 6609 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing 6610 aggregate to take a consistent decision on the need to convert into 6611 assignments aggregates that initialize constant objects. 6612 66132011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 6614 6615 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to 6616 Build_Allocate_Deallocate_Proc in order to handle allocation of 6617 non-controlled objects on subpools. 6618 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant 6619 to be end-user visible. 6620 * s-finmas.adb: Add with and use clause for System.HTable. 6621 Add an instantiation of Simple_HTable which provides a mapping between 6622 the address of a controlled object and the corresponding 6623 Finalize_Address used to clean up the object. The table is used when a 6624 master is operating in heterogeneous mode. 6625 (Attach): Explain why the input node is not verified on being already 6626 attached. 6627 (Delete_Finalize_Address): New routine. 6628 (Detach): Add pragma Assert which ensures that a node is already 6629 attached. 6630 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme 6631 since nodes are no longer removed on traversal. Explain why node 6632 detachment is undesirable in this case. 6633 (Get_Finalize_Address): New routine. 6634 (Hash): New routine. 6635 (Is_Empty_List): Removed. 6636 (pm): Renamed to Print_Master. Add output for discriminant 6637 Is_Homogeneous. 6638 Comment reformatting. 6639 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine. 6640 * s-finmas.ads: Various comments additions / improvements. 6641 Type Finalization_Master has a discriminant which determines the mode of 6642 operation. 6643 (Delete_Finalize_Address): New routine. 6644 (Get_Finalize_Address): New routine. 6645 (pm): Renamed to Print_Master. 6646 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine. 6647 * s-stposu.adb: Add with clause for System.Address_Image; Add with and 6648 use clause for System.IO. 6649 (Allocate_Any_Controlled): Add machinery to set TSS primitive 6650 Finalize_Address depending on the mode of allocation and the mode of 6651 the master. 6652 (Deallocate_Any_Controlled): Remove the relation pair object - 6653 Finalize_Address regardless of the master mode. Add comment explaining 6654 the reason. 6655 (Detach): Ensure that fields Prev and Next are null after detachment. 6656 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration 6657 scheme to check whether the list of subpools is empty. There is no 6658 longer need to store the next subpool or advance the current pointer. 6659 (Is_Empty_List): New routine. 6660 (Print_Pool): New routine. 6661 (Print_Subpool): New routine. 6662 * s-stposu.ads: Various comments additions / improvements. 6663 Field Master of type Root_Subpool is now a heterogeneous collection. 6664 (Print_Pool): New routine. 6665 (Print_Subpool): New routine. 6666 66672011-08-29 Ed Schonberg <schonberg@adacore.com> 6668 6669 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator 6670 forms, using aspects of container types. 6671 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and 6672 Has_Implicit_Dereference flags, that may be set on the partial view. 6673 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a 6674 container type with an indexing aspect. 6675 (Analyze_Quantified_Expression): Analyze construct with expansion 6676 disabled, because it will be rewritten as a loop during expansion. 6677 (Try_Container_Indexing): The prefix itself may be a container type 6678 with an indexing aspect, as with a vector of vectors. 6679 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze 6680 the original doamin of iteration, for name capture. 6681 (Analyze_Iterator_Specification): If the domain is an expression that 6682 needs finalization, create a separate declaration for it. 6683 For an iterator with "of" retrieve default iterator info from aspect of 6684 container type. For "in" iterator, retrieve type of Iterate function. 6685 * sem_ch13.adb (Check_Iterator_Function): Fix typo. 6686 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before 6687 analysis, to prevent spurious errors about late attributes. 6688 * sprint.adb: Handle quantified expression with either loop or iterator 6689 specification. 6690 * a-convec.ads, a-convec.adb: Iterate function returns a reversible 6691 iterator. 6692 66932011-08-29 Vincent Celier <celier@adacore.com> 6694 6695 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler, 6696 Binder or Linker of the main project file. 6697 66982011-08-29 Ed Schonberg <schonberg@adacore.com> 6699 6700 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic 6701 unit. 6702 67032011-08-29 Yannick Moy <moy@adacore.com> 6704 6705 * exp_ch9.adb: Partial revert of previous change for Alfa mode 6706 67072011-08-29 Yannick Moy <moy@adacore.com> 6708 6709 * exp_ch11.adb: Minor expansion of comment. 6710 67112011-08-29 Yannick Moy <moy@adacore.com> 6712 6713 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities. 6714 67152011-08-29 Ed Schonberg <schonberg@adacore.com> 6716 6717 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal 6718 interpretation, set the type before resolving the operands, because 6719 legality checks on an exponention operand need to know the type of the 6720 context. 6721 67222011-08-29 Ed Schonberg <schonberg@adacore.com> 6723 6724 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed 6725 cleanups on a master if the instance is within a generic unit. 6726 Complement to the corresponding fix to inline.adb for K520-030. 6727 67282011-08-29 Tristan Gingold <gingold@adacore.com> 6729 6730 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current 6731 occurrence. 6732 * exp_intr.adb: Minor comment fix. 6733 67342011-08-29 Bob Duff <duff@adacore.com> 6735 6736 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where 6737 Delay_Required was used as an uninitialized variable. 6738 67392011-08-29 Robert Dewar <dewar@adacore.com> 6740 6741 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads, 6742 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb, 6743 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting. 6744 67452011-08-29 Thomas Quinot <quinot@adacore.com> 6746 6747 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True. 6748 Remove unused variables. 6749 67502011-08-29 Ed Schonberg <schonberg@adacore.com> 6751 6752 * sem_res.adb: Remove Build_Explicit_Dereference. 6753 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here 6754 from sem_res.adb, used in analysis of additional constructs. 6755 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012 6756 expansion of iterators. 6757 (Is_Object_Reference): Recognize variables rewritten as explicit 6758 dereferences in Ada2012. 6759 * snames.ads-tmpl: Add Has_Element, Forward_Iterator, 6760 Reversible_Iterator names, for expansion of Ada2012 iterators. 6761 * aspects.ads, aspects.adb (Find_Aspect): Utility. 6762 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly 6763 linked list container. 6764 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers. 6765 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets. 6766 67672011-08-29 Ed Schonberg <schonberg@adacore.com> 6768 6769 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map 6770 containers. 6771 67722011-08-29 Vincent Celier <celier@adacore.com> 6773 6774 * make.adb (Gnatmake): Get the maximum number of simultaneous 6775 compilation processes after the Builder switches has been scanned, as 6776 there may include -jnn. 6777 67782011-08-29 Matthew Heaney <heaney@adacore.com> 6779 6780 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next. 6781 67822011-08-29 Tristan Gingold <gingold@adacore.com> 6783 6784 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of 6785 GNAT_DRIVER_COMMAND_LINE to 255. 6786 67872011-08-29 Pascal Obry <obry@adacore.com> 6788 6789 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor 6790 reformatting and style fix (class attribute casing). 6791 67922011-08-29 Yannick Moy <moy@adacore.com> 6793 6794 * exp_ch11.adb: Yet another case where expansion should be common 6795 between CodePeer and Alfa. 6796 67972011-08-29 Yannick Moy <moy@adacore.com> 6798 6799 * exp_ch9.adb: Partial revert of previous change for Alfa mode. 6800 68012011-08-29 Ed Schonberg <schonberg@adacore.com> 6802 6803 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an 6804 incomplete type and its completion match. 6805 68062011-08-29 Yannick Moy <moy@adacore.com> 6807 6808 * exp_ch13.adb: Adjust previous change. 6809 68102011-08-29 Robert Dewar <dewar@adacore.com> 6811 6812 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb, 6813 exp_ch4.adb, sem_ch8.adb: Minor code reorganization 6814 Minor reformatting. 6815 68162011-08-29 Emmanuel Briot <briot@adacore.com> 6817 6818 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also 6819 initialize aggregated projects. 6820 68212011-08-29 Ed Schonberg <schonberg@adacore.com> 6822 6823 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope 6824 depth of candidates to resolve a potentially spurious ambiguity between 6825 two visible subprograms. 6826 68272011-08-29 Yannick Moy <moy@adacore.com> 6828 6829 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without 6830 Requires/Ensures. 6831 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma, 6832 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without 6833 Requires/Ensures. 6834 68352011-08-29 Arnaud Charlet <charlet@adacore.com> 6836 6837 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change. 6838 Add comment. 6839 68402011-08-29 Thomas Quinot <quinot@adacore.com> 6841 6842 * sem_res.adb: Minor reformatting. 6843 68442011-08-29 Johannes Kanig <kanig@adacore.com> 6845 6846 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA 6847 mode. 6848 * gnat1drv.adb (Adjust_Global_Switches): Set 6849 Use_Expressions_With_Actions to False in ALFA mode. 6850 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in 6851 ALFA mode. 6852 68532011-08-29 Yannick Moy <moy@adacore.com> 6854 6855 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode. 6856 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode. 6857 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of 6858 tagged types and dispatching calls in Alfa mode. 6859 68602011-08-29 Javier Miranda <miranda@adacore.com> 6861 6862 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that 6863 we do not report an error on an Empty node. 6864 68652011-08-29 Geert Bosch <bosch@adacore.com> 6866 6867 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o, 6868 a-nlrear.o and a-nurear.o. 6869 68702011-08-29 Robert Dewar <dewar@adacore.com> 6871 6872 * freeze.adb: Minor code reorganization. 6873 Minor reformatting. 6874 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb, 6875 sem_ch6.adb: Minor reformatting 6876 68772011-08-29 Tristan Gingold <gingold@adacore.com> 6878 6879 * s-except.ads, s-except.adb: Provide dummy body. 6880 68812011-08-29 Yannick Moy <moy@adacore.com> 6882 6883 * sem_warn.adb (Within_Postcondition): Take into account the case of 6884 an Ensures component in a Test_Case. 6885 68862011-08-29 Tristan Gingold <gingold@adacore.com> 6887 6888 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except. 6889 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by 6890 System_Exceptions_Debug 6891 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug 6892 * a-except.adb: With and use System.Exceptions_Debug instead of 6893 System.Exceptions. 6894 * a-except-2005.adb: Likewise. 6895 * s-assert.adb: Likewise. 6896 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb. 6897 * Makefile.rtl: Add s-excdeb. Adjust compilation rule. 6898 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add 6899 s-excdeb. Update dependencies. 6900 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o 6901 as these no longer need external libraries. 6902 69032011-08-29 Ed Schonberg <schonberg@adacore.com> 6904 6905 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an 6906 exponentiation operator on universal values in a context that requires 6907 a fixed-point type. 6908 69092011-08-29 Tristan Gingold <gingold@adacore.com> 6910 6911 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence 6912 before calling notify_handled_exception. 6913 * a-exextr.adb: Fix comment. 6914 69152011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 6916 6917 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute 6918 Finalize_Address of the access type's finalization master. 6919 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the 6920 access type's finalization master. Add a guard to prevent 6921 Associated_Storage_Pool from being set on .NET/JVM. 6922 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set 6923 attribute Finalize_Address of the access type's finalization master. 6924 * exp_ch7.adb (Make_Finalize_Address_Call): New routine. 6925 * exp_ch7.ads (Make_Finalize_Address_Call): New routine. 6926 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and 6927 RE_Unit_Table. 6928 * s-finmas.adb: Add with clause for System.Address_Image. Add with and 6929 use clause for System.IO 6930 (Detach): Relax the assertion, to be reinstated later. 6931 (Finalize): Rewrite the iteration loop to avoid pointer comparison. 6932 Relax the assertion on Finalize_Address, to be reinstated later. 6933 (Is_Empty_List): New routine. 6934 (pm): New debug routine. 6935 (Set_Finalize_Address): New routine. 6936 * s-finmas.ads (pm): New debug routine. 6937 (Set_Finalize_Address): New routine. 6938 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting. 6939 69402011-08-29 Tristan Gingold <gingold@adacore.com> 6941 6942 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access): 6943 Remove convention C. 6944 69452011-08-29 Tristan Gingold <gingold@adacore.com> 6946 6947 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove. 6948 (Initialize_TCB): Remove Exc_Stack_Ptr initialization. 6949 (Finalize_TCB): Remove its finalization. 6950 (Initialize): Remove assignment of GET_Exc_Stack_Addr 6951 * s-soflin.adb (NT_Exc_Stack): Remove 6952 (Get_Exc_Stack_Addr_NT): Likewise. 6953 (Get_Exc_Stack_Addr_Soft): Likewise. 6954 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove. 6955 (Get_Exc_Stack_Addr): Likewise. 6956 (Get_Exc_Stack_Addr_Soft): Likewise 6957 * s-taspri-vms.ads (Exc_Stack_T): Remove. 6958 (Exc_Stack_Ptr_T): Likewise. 6959 (Private_Data): Remove Exc_Stack_Ptr component. 6960 69612011-08-29 Tristan Gingold <gingold@adacore.com> 6962 6963 * raise-gcc.c (get_ip_from_context): New function. Factorize code. 6964 69652011-08-29 Tristan Gingold <gingold@adacore.com> 6966 6967 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time. 6968 69692011-08-29 Geert Bosch <bosch@adacore.com> 6970 6971 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate, 6972 L2_Norm, Swap_Column): New generic subprograms 6973 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate, 6974 L2_Norm, Swap_Column): Implement new subprograms in order to 6975 eliminate dependency on BLAS and LAPACK libraries in 6976 Ada.Numerics.Generic_Real_Arrays and eventually also the complex 6977 version. Forward_Eliminate/Back_Substitute can be used to put a 6978 matrix in row echelon or reduced row echelon form using partial 6979 pivoting. 6980 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate, 6981 Swap_Column): Instantiate from System.Generic_Array_Operations. 6982 ("*", "abs"): Implement by instantiation from Generic_Array_Operations. 6983 (Sqrt): Local function for simple computation of square root without 6984 adding dependencies on Generic_Elementary_Functions. 6985 (Swap): New subprogram to exchange floating point numbers. 6986 (Inverse): Reimplement using Jordan-Gauss elimination. 6987 (Jacobi): New procedure implementing Jacobi's method for computation 6988 of eigensystems, based on Rutishauser's implementation. 6989 (L2_Norm): Implement directly using the inner product. 6990 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of 6991 decreasing eigenvalue as required by the Ada RM. 6992 (Swap_Column): New helper procedure for Sort_Eigensystem. 6993 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK. 6994 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for 6995 Sort_Eigensystems. 6996 69972011-08-29 Thomas Quinot <quinot@adacore.com> 6998 6999 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty 7000 statements line. 7001 70022011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7003 7004 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather 7005 than the current node. 7006 * s-finmas.ads: Move field Finalize_Address from type FM_Node to 7007 Finalization_Master. The list headers have two fields instead of three. 7008 This should fix alignment issue but subpool allocations are now 7009 unusable. Alphabetize subprograms. 7010 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than 7011 the size of the header when converting the beginning of the object to 7012 a FM_Node. Set the master's Finalize_Address attribute if not already 7013 set. 7014 (Deallocate_Any_Controlled): Use the offset rather than the size of the 7015 header when converting the beginning of the object to a FM_Node. 7016 70172011-08-29 Gary Dismukes <dismukes@adacore.com> 7018 7019 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of 7020 reraise when compiling for CodePeer. 7021 70222011-08-29 Arnaud Charlet <charlet@adacore.com> 7023 7024 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads, 7025 now needed by a-convec.adb. Fix warning. 7026 70272011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7028 7029 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the 7030 processing of TSS routine Finalize_Address when compiling in 7031 CodePeer_Mode. 7032 70332011-08-29 Thomas Quinot <quinot@adacore.com> 7034 7035 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb, 7036 sem_warn.adb: Minor reformatting. 7037 70382011-08-29 Emmanuel Briot <briot@adacore.com> 7039 7040 * prj-conf.adb (Get_Config_Switches): Also collect the list of 7041 languages from aggregated projects. 7042 70432011-08-29 Yannick Moy <moy@adacore.com> 7044 7045 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements, 7046 Traverse_Handled_Statement_Sequence, Traverse_Package_Body, 7047 Traverse_Package_Declaration, Traverse_Subprogram_Body, 7048 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies 7049 for stubs are traversed too when parameter is set 7050 (Traverse_All_Compilation_Units): Traverse without going inside stubs 7051 (Traverse_Declarations_Or_Statements): Do the special traversing for 7052 stubs when required. 7053 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to 7054 return subprogram or package body from stub. 7055 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect 7056 stubs without prior subprogram decl. 7057 70582011-08-29 Vasiliy Fofanov <fofanov@adacore.com> 7059 7060 * gnat_ugn.texi: Fix typo. 7061 70622011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7063 7064 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism 7065 which accounts for size vs alignment issues and calculates the size of 7066 the list header. 7067 (Deallocate_Any_Controlled): Ditto. 7068 (Nearest_Multiple_Rounded_Up): New routine. 7069 70702011-08-29 Tristan Gingold <gingold@adacore.com> 7071 7072 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag. 7073 * a-exexda.adb (Set_Exception_C_Msg): Ditto. 7074 (Set_Exception_Msg): Ditto. 7075 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set 7076 Private_Data. 7077 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove. 7078 Use Save_Occurrence instead of Save_Occurrence_No_Private. 7079 (Raise_With_Msg): Remove Cleanup_Flag. 7080 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove 7081 Clean_Flag and Private_Data components. 7082 70832011-08-29 Yannick Moy <moy@adacore.com> 7084 7085 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like 7086 in CodePeer mode. 7087 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation 7088 of an explicitly declared type, so that the base types of the original 7089 type and this generated type are the same, and a "type" (not a subtype 7090 like previously). 7091 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too 7092 small" in Alfa mode, like in CodePeer mode. 7093 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep 7094 clauses in Alfa mode. 7095 70962011-08-29 Javier Miranda <miranda@adacore.com> 7097 7098 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this 7099 function to the package spec. 7100 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For 7101 internally generated bodies of null procedures locate the internally 7102 generated spec enforcing mode conformance. 7103 (Is_Interface_Conformant): Ensure that the controlling formal of the 7104 primitives match. 7105 71062011-08-29 Ed Schonberg <schonberg@adacore.com> 7107 7108 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not 7109 reject the pragma if it appears to apply to a formal subprogram. 7110 71112011-08-29 Ed Schonberg <schonberg@adacore.com> 7112 7113 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for 7114 inner expression, to prevent double evaluation. 7115 71162011-08-29 Tristan Gingold <gingold@adacore.com> 7117 7118 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as 7119 they were unused. 7120 * a-exexpr-gcc.adb (Propagate_Exception): Ditto. 7121 * a-except-2005.adb (Propagate_Exception): Adjust spec. 7122 (Raise_Current_Excep): Adjust call. 7123 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep. 7124 71252011-08-29 Thomas Quinot <quinot@adacore.com> 7126 7127 * exp_disp.adb: Minor reformatting. 7128 71292011-08-29 Tristan Gingold <gingold@adacore.com> 7130 7131 * a-exexpr.adb (Setup_Exception): Removed. 7132 * a-exexpr-gcc.adb (Setup_Exception): Removed. 7133 * a-except.adb (Exception_Propagation): Removed. 7134 * a-except-2005.adb (Setup_Exception): Removed. 7135 (Reraise): Remove call to Setup_Exception. 7136 (Reraise_Occurrence): Ditto. 7137 (Reraise_Occurrence_Always): Ditto. 7138 (Reraise_Occurrence_No_Defer): Ditto. 7139 (Transfer_Occurrence): Ditto. 7140 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception. 7141 (Set_Exception_Msg): Ditto. 7142 71432011-08-29 Robert Dewar <dewar@adacore.com> 7144 7145 * a-convec.adb, exp_disp.adb: Minor reformatting. 7146 71472011-08-29 Tristan Gingold <gingold@adacore.com> 7148 7149 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C. 7150 71512011-08-29 Gary Dismukes <dismukes@adacore.com> 7152 7153 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set 7154 Exception_Handlers to No_List instead of Empty_List in the case where 7155 there are no handlers. 7156 71572011-08-29 Tristan Gingold <gingold@adacore.com> 7158 7159 * gcc-interface/gigi.h (enum standard_datatypes): Add 7160 ADT_reraise_zcx_decl 7161 (reraise_zcx_decl): New macro. 7162 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable. 7163 (gigi): Set reraise_zcx_decl. 7164 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr. 7165 (gnat_to_gnu): Handle N_Raise_Statement. 7166 71672011-08-29 Robert Dewar <dewar@adacore.com> 7168 7169 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads, 7170 a-undesu.adb: Minor reformatting. 7171 71722011-08-29 Ed Schonberg <schonberg@adacore.com> 7173 7174 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch 7175 table, accept an unfrozen untagged component if it is an actual for a 7176 formal incomplete type. 7177 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to 7178 provide new iterator forms over vectors. 7179 Introduce type Iterator in package body to implement operations of 7180 Reversible_Iterator interface. 7181 * a-iteint.ads: Make package pure so it is usable with new container 7182 packages, that are categorized Remote_Types. 7183 71842011-08-29 Robert Dewar <dewar@adacore.com> 7185 7186 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting. 7187 71882011-08-29 Bob Duff <duff@adacore.com> 7189 7190 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case 7191 of <>, because this is the routine that checks for dimensionality 7192 errors (for example, for a two-dimensional array, (others => <>) should 7193 be (others => (others => <>)). 7194 71952011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7196 7197 * impunit.adb: Add new run-time units. 7198 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb, 7199 s-stposu.ads, s-stposu.adb: Code clean up. 7200 Handle protected class-wide or task class-wide types 7201 Handle C/C++/CIL/Java types. 7202 * s-spsufi.adb, s-spsufi.ads: New files. 7203 72042011-08-29 Yannick Moy <moy@adacore.com> 7205 7206 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on 7207 library-level subprogram. 7208 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case 7209 placement. 7210 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case 7211 component. 7212 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case 7213 component. 7214 * gnat_rm.texi: Update doc for Test_Case pragma. 7215 72162011-08-29 Tristan Gingold <gingold@adacore.com> 7217 7218 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it 7219 convention C. 7220 (GCC_Exception_Access): New type. 7221 (Unwind_DeleteException): New imported procedure 7222 (Foreign_Exception): Import it. 7223 (GNAT_GCC_Exception): Simply have the occurrence inside. 7224 (To_GCC_Exception): New function. 7225 (To_GNAT_GCC_Exception): New function. 7226 (GNAT_GCC_Exception_Cleanup): New procedure.. 7227 (Propagate_GCC_Exception): New procedure. 7228 (Reraise_GCC_Exception): New procedure. 7229 (Setup_Current_Excep): New procedure. 7230 (CleanupUnwind_Handler): Change type of UW_Exception parameter. 7231 (Unwind_RaiseException): Ditto. 7232 (Unwind_ForcedUnwind): Ditto. 7233 (Remove): Removed. 7234 (Begin_Handler): Change type of parameter. 7235 (End_Handler): Ditto. Now delete the exception if still present. 7236 (Setup_Key): Removed. 7237 (Is_Setup_And_Not_Propagated): Removed. 7238 (Set_Setup_And_Not_Propagated): Ditto. 7239 (Clear_Setup_And_Not_Propagated): Ditto. 7240 (Save_Occurrence_And_Private): Ditto. 7241 (EID_For): Add 'not null' constraint on parameter. 7242 (Setup_Exception): Does nothing. 7243 (Propagate_Exception): Simplified. 7244 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model, 7245 re-raise is not expanded anymore. 7246 * s-except.ads (Foreign_Exception): New exception - placeholder for 7247 non Ada exceptions. 7248 * raise-gcc.c (__gnat_setup_current_excep): Declare 7249 (CXX_EXCEPTION_CLASS): Define (not yet used) 7250 (GNAT_EXCEPTION_CLASS): Define. 7251 (is_handled_by): Handle foreign exceptions. 7252 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep. 7253 72542011-08-29 Jose Ruiz <ruiz@adacore.com> 7255 7256 * a-synbar.adb (Synchronous_Barrier): Some additional clarification. 7257 72582011-08-29 Thomas Quinot <quinot@adacore.com> 7259 7260 * a-synbar-posix.adb: Minor reformatting. 7261 72622011-08-29 Jose Ruiz <ruiz@adacore.com> 7263 7264 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads, 7265 a-exetim-default.ads (Interrupt_Clocks_Supported, 7266 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these 7267 definitions to be compliant with AI-0171. The target systems do not 7268 support separate account for the execution time of interrupt handlers. 7269 72702011-08-29 Jose Ruiz <ruiz@adacore.com> 7271 7272 * a-synbar.adb (Wait): Change the order of evaluation of the conditions 7273 in the barrier to put first the easiest to evaluate (and the one which 7274 will be True more often). More efficient. 7275 72762011-08-29 Eric Botcazou <ebotcazou@adacore.com> 7277 7278 * s-atocou-x86.adb: Fix constraint in machine code insertion. 7279 72802011-08-29 Bob Duff <duff@adacore.com> 7281 7282 * aspects.ads, aspects.adb: Add new aspects for various pragmas and 7283 attributes that are now aspects, as specified by AI05-0229-1. 7284 * sem_ch13.adb (Analyze_Aspect_Specifications, 7285 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into 7286 pragmas or attribute references, as appropriate. 7287 72882011-08-29 Robert Dewar <dewar@adacore.com> 7289 7290 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb, 7291 a-synbar-posix.ads: Minor reformatting. 7292 72932011-08-29 Yannick Moy <moy@adacore.com> 7294 7295 * snames.ads-tmpl: Add name Force. 7296 72972011-08-29 Pascal Obry <obry@adacore.com> 7298 7299 * prj-nmsc.adb: Minor reformatting. 7300 73012011-08-29 Jose Ruiz <ruiz@adacore.com> 7302 7303 * a-exetim.ads (Interrupt_Clocks_Supported, 7304 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these 7305 definitions to be compliant with AI-0171. 7306 73072011-08-29 Robert Dewar <dewar@adacore.com> 7308 7309 * a-ngelfu.adb: Add comments. 7310 73112011-08-29 Geert Bosch <bosch@adacore.com> 7312 7313 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is 7314 the closest machine number to Pi / 2.0. 7315 73162011-08-29 Jose Ruiz <ruiz@adacore.com> 7317 7318 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012 7319 package Ada.Synchronous_Barriers. 7320 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb: 7321 Add new specs and bodies for Ada.Synchronous_Barriers. There is a 7322 default implementation using protected objects and another one 7323 a-synbar-posix using POSIX barriers as the underlying support. 7324 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86, 7325 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of 7326 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient). 7327 Clean up dependencies. 7328 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o 7329 73302011-08-29 Robert Dewar <dewar@adacore.com> 7331 7332 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb, 7333 exp_dist.adb: Minor code reorganization. 7334 Minor reformatting. 7335 73362011-08-29 Thomas Quinot <quinot@adacore.com> 7337 7338 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW 7339 primitive operation must support external streaming if it is not a 7340 controlling access result. 7341 73422011-08-29 Thomas Quinot <quinot@adacore.com> 7343 7344 * sinfo.ads, sem_ch7.adb: Minor reformatting. 7345 73462011-08-29 Bob Duff <duff@adacore.com> 7347 7348 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization 7349 restriction on allocators, as required by AI05-0013-1. 7350 * restrict.ads: Minor comment fix. 7351 73522011-08-29 Tristan Gingold <gingold@adacore.com> 7353 7354 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb 7355 (To_Jmpbuf_Address): Ditto 7356 (builtin_longjmp): Ditto 7357 73582011-08-29 Thomas Quinot <quinot@adacore.com> 7359 7360 * sem_res.adb: Minor reformatting. 7361 73622011-08-29 Vincent Celier <celier@adacore.com> 7363 7364 * make.adb (Gnatmake): Move special processing for VM targets after the 7365 call to Get_Target_Parameters. 7366 73672011-08-29 Thomas Quinot <quinot@adacore.com> 7368 7369 * sem_ch12.adb, par-ch12.adb: Minor reformatting. 7370 73712011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7372 7373 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases 7374 where an anonymous access discriminant of a limited designated type 7375 appears in a non-immutably limited discriminated type and issue an 7376 error message. Add local variable Desig_T and replace all occurrences 7377 of Designated_Type. 7378 73792011-08-29 Jose Ruiz <ruiz@adacore.com> 7380 7381 * a-rttiev.adb (Set_Handler): Update comment to indicate that our 7382 implementation is compliant to RM D.15(15/2) after the modification 7383 imposed by AI05-0094-1 (binding interpretation). 7384 73852011-08-29 Robert Dewar <dewar@adacore.com> 7386 7387 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb, 7388 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting. 7389 73902011-08-29 Thomas Quinot <quinot@adacore.com> 7391 7392 * par-endh.adb (Check_End): For an END where it is mandatory to repeat 7393 the scope name, do not report a missing label as a style violation (it 7394 will be diagnosed as an illegality). 7395 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of 7396 variant records: Get_Enum_Lit_From_Pos already returns a usage 7397 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype 7398 on Expr in Integer_Literal case so that it can be used by 7399 Build_To_Any_Call. 7400 74012011-08-29 Tristan Gingold <gingold@adacore.com> 7402 7403 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec. 7404 Adjust comment. 7405 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler. 7406 (Build_Abort_Block_Handler): New function to build an Abort_Signal 7407 exception handler. 7408 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call 7409 Build_Abort_Block_Handler to build the exception handler. Do not 7410 undefer aborts for the Abort_Signal exception handler if back-end 7411 exception mechanism. 7412 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if 7413 back_end exceptions for all others and abort_signal. 7414 * s-except.ads (ZCX_By_Default): New constant. 7415 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX. 7416 (Raise_Exception_Always): Ditto. 7417 (Raise_From_Signal_Handler): Ditto. 7418 (Raise_With_Location_And_Msg): Ditto. 7419 (Raise_With_Msg): Ditto. 7420 (Reraise): Ditto. 7421 (Reraise_Occurence): Ditto. 7422 (Reraise_Occurrence_Always): Ditto. 7423 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX. 7424 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX. 7425 74262011-08-29 Thomas Quinot <quinot@adacore.com> 7427 7428 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation. 7429 74302011-08-29 Robert Dewar <dewar@adacore.com> 7431 7432 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting 7433 Minor code reorganization. 7434 74352011-08-29 Bob Duff <duff@adacore.com> 7436 7437 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada 7438 2012, not just Ada 2005. 7439 74402011-08-29 Vincent Celier <celier@adacore.com> 7441 7442 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake 7443 with a project file or with gprbuid, if -gnatep= is specified, the 7444 builder may need to be invoked with -x. 7445 74462011-08-29 Tristan Gingold <gingold@adacore.com> 7447 7448 * a-exexpr-gcc.adb: Minor comment fix. 7449 74502011-08-29 Robert Dewar <dewar@adacore.com> 7451 7452 * sem_ch8.adb: Minor reformatting. 7453 74542011-08-29 Bob Duff <duff@adacore.com> 7455 7456 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012. 7457 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for 7458 treating "some" as unreserved in earlier Ada versions. This is now 7459 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some, 7460 rather than Name_Some, since Tok_Some is now recognized as reserved. 7461 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other 7462 reserved word. 7463 * scans.ads: Minor comment fixes. 7464 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as 7465 for other language versions. 7466 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for 7467 treating "some" as unreserved in earlier Ada versions. This is now 7468 handled in Snames.Is_Keyword_Name. 7469 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in 7470 Ada 2012. 7471 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as 7472 unreserved in earlier Ada versions. This is now handled in 7473 Snames.Is_Keyword_Name. 7474 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved 7475 words as for other language versions. 7476 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to 7477 Ada 2012, not just Ada 2005. 7478 74792011-08-29 Ed Schonberg <schonberg@adacore.com> 7480 7481 * sem_ch13.adb: Additional semantic checks for aspects involved in 7482 iterators. 7483 74842011-08-29 Matthew Heaney <heaney@adacore.com> 7485 7486 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb, 7487 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous 7488 Container parameter. 7489 (Ancestor_Find): ditto. 7490 74912011-08-29 Thomas Quinot <quinot@adacore.com> 7492 7493 * par-endh.adb: Minor reformatting. 7494 74952011-08-29 Tristan Gingold <gingold@adacore.com> 7496 7497 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants. 7498 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component. 7499 (Adjust_N_CLeanups_For): Remove. 7500 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of 7501 stack is reached. 7502 (Propgate_Exception): Adjust. 7503 * raise-gcc.c: Add a few static/const. 7504 (Adjust_N_Cleanups_For): Remove declaration. 7505 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger. 7506 75072011-08-29 Ed Schonberg <schonberg@adacore.com> 7508 7509 * sem_ch8.adb: Use type of function return when rewriting as object 7510 declaration. 7511 75122011-08-29 Gary Dismukes <dismukes@adacore.com> 7513 7514 * sem_type.adb: Minor reformatting. 7515 75162011-08-29 Robert Dewar <dewar@adacore.com> 7517 7518 * makeutl.adb: Minor reformatting. 7519 75202011-08-29 Ed Schonberg <schonberg@adacore.com> 7521 7522 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a 7523 function call of a limited type, the expansion of the renaming is 7524 complicated by the presence of various temporaries and subtypes that 7525 capture constraints of the renamed object. 7526 Rewrite node as an object declaration, whose expansion is simpler. 7527 Given that the object is limited there is no copy involved and no 7528 performance hit. 7529 75302011-08-29 Robert Dewar <dewar@adacore.com> 7531 7532 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb, 7533 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting. 7534 75352011-08-29 Tristan Gingold <gingold@adacore.com> 7536 7537 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads, 7538 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads, 7539 system-linux-hppa.ads, system-linux-s390.ads, 7540 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads, 7541 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads, 7542 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads, 7543 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads, 7544 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads, 7545 system-solaris-sparc.ads, system-lynxos-x86.ads, 7546 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads, 7547 system-solaris-x86_64.ads, system-mingw-x86_64.ads, 7548 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads, 7549 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads, 7550 system-vxworks-x86.ads: Remove GCC_ZCX_Support. 7551 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb, 7552 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto. 7553 * opt.ads: Adjust comment. 7554 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target. 7555 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target. 7556 * system.ads: Move GCC_ZCX_Support to obsolete entries. 7557 75582011-08-29 Emmanuel Briot <briot@adacore.com> 7559 7560 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative 7561 file name is specified on the gnatmake or gprbuild command line, and 7562 before we search for that file in the project. 7563 75642011-08-29 Ed Schonberg <schonberg@adacore.com> 7565 7566 * sem_type.adb (Within_Instance): New predicate in Collect_Interps, 7567 used to determine whether a possible interpretation for an overloadable 7568 entity is declared within the current instantiation and should be 7569 included in the candidate set. 7570 75712011-08-29 Vasiliy Fofanov <fofanov@adacore.com> 7572 7573 * gnat_rm.texi, gnat_ugn.texi: Clean ups. 7574 75752011-08-29 Ed Schonberg <schonberg@adacore.com> 7576 7577 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an 7578 access subtype is access_to_subprogram, when applying checks for 7579 RM 3.10.2 (27). 7580 75812011-08-29 Matthew Heaney <heaney@adacore.com> 7582 7583 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check 7584 for sibling when common parent. 7585 75862011-08-29 Thomas Quinot <quinot@adacore.com> 7587 7588 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with 7589 "pragma_". 7590 75912011-08-29 Ed Schonberg <schonberg@adacore.com> 7592 7593 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions 7594 for the return type when in ASIS mode. 7595 75962011-08-29 Vincent Celier <celier@adacore.com> 7597 7598 * make.adb (Gnatmake): Get the default search dirs, then the target 7599 parameters after getting the Builder switches, as the Builder switches 7600 may include --RTS= and that could change the default search dirs. 7601 76022011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7603 7604 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of 7605 Make_Final_Call. Move the processing for class-wide types before the 7606 processing for derivations from [Limited_]Controlled. 7607 (Make_Final_Call): Move the processing for class-wide types before the 7608 processing for derivations from [Limited_]Controlled. 7609 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check. 7610 Add code to account for alignments larger than the list header. Add a 7611 comment illustrating the structure of the allocated object + padding + 7612 header. 7613 (Deallocate_Any_Controlled): Add code to account for alignments larger 7614 than the list header. 7615 76162011-08-29 Ed Schonberg <schonberg@adacore.com> 7617 7618 * sinfo.ads, sinfo.adb: New node kind 7619 N_Formal_Incomplete_Type_Definition, related flags. 7620 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition): 7621 Parse formal incomplete types. 7622 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in 7623 sem_ch12. 7624 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body): 7625 Formal incomplete types do not need completion. 7626 * sem_ch12.adb (Analyze_Formal_Incomplete_Type, 7627 Validate_Incomplete_Type_Instance): New procedures to handle formal 7628 incomplete types. 7629 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual 7630 that corresponds to a formal incomplete type. 7631 * sprint.adb: Handle formal incomplete type declarations. 7632 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not 7633 an insertion point. 7634 76352011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7636 7637 * a-fihema.ads, a-fihema.adb: Unit removed. 7638 * a-undesu.ads, a-undesu.adb: New unit implementing 7639 Ada.Unchecked_Deallocate_Subpool. 7640 * einfo.adb: Remove Associated_Collection from the node usage. 7641 Add Finalization_Master to the node usage. 7642 (Associated_Collection): Removed. 7643 (Finalization_Master): New routine. 7644 (Set_Associated_Collection): Removed. 7645 (Set_Finalization_Master): New routine. 7646 (Write_Field23_Name): Remove Associated_Collection from the output. Add 7647 Finalization_Master to the output. 7648 * einfo.ads: Remove attribute Associated_Collection and its uses in 7649 entities. 7650 Add new attribute Finalization_Master along with its uses in entitites. 7651 (Associated_Collection): Removed along with its pragma import. 7652 (Finalization_Master): New routine along with a pragma import. 7653 (Set_Associated_Collection): Removed along with its pragma import. 7654 (Set_Finalization_Master): New routine along with a pragma import. 7655 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to 7656 Build_Finalization_Collection with Build_Finalization_Master. 7657 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address 7658 before the bodies of the predefined routines. Add comment explaining 7659 this. Replace call to Build_Finalization_Collection with 7660 Build_Finalization_Master. 7661 (Freeze_Type): Replace call to Build_Finalization_Collection with 7662 Build_Finalization_Master. 7663 (Make_Finalize_Address_Body): Comment reformatting. 7664 (Make_Predefined_Primitive_Specs): Code reformatting. 7665 (Stream_Operation_OK): Update comment mentioning finalization 7666 collections. Replace RE_Finalization_Collection with 7667 RE_Finalization_Master. 7668 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to 7669 Associated_Collection with Finalization_Master. Replace call to 7670 Build_Finalization_Collection with Build_Finalization_Master. 7671 (Expand_Allocator_Expression): Replace call to Associated_Collection 7672 with Finalization_Master. Replace call to Set_Associated_Collection with 7673 Set_Finalization_Master. Remove the generation of 7674 Set_Finalize_Address_Ptr. 7675 (Expand_N_Allocator): Replace call to Associated_Collection with 7676 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr. 7677 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to 7678 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the 7679 comment on usage. Replace call to Needs_BIP_Collection with 7680 Needs_BIP_Finalization_Master Remplace BIP_Collection with 7681 BIP_Finalization_Master. Update all comments which mention finalization 7682 collections. Replace Associated_Collection with 7683 Finalization_Master. Replace Build_Finalization_Collection with 7684 Build_Finalization_Master. 7685 (BIP_Formal_Suffix): Update BIP_Collection's case. 7686 (Build_Heap_Allocator): Update the related comment. Rename local 7687 variable Collect to Fin_Mas_Id and update its occurrences. Update 7688 comments which mention finalization collections. Replace 7689 Set_Associated_Collection with Set_Finalization_Master. 7690 (Expand_Call): Update the code which detects a special piece of library 7691 code for .NET/JVM. 7692 (Make_Build_In_Place_Call_In_Allocator): Replace the call to 7693 Add_Collection_Actual_To_Build_In_Place_Call with 7694 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code 7695 which generates a call to Make_Set_Finalize_Address_Ptr_Call. 7696 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to 7697 Add_Collection_Actual_To_Build_In_Place_Call with 7698 Add_Finalization_Master_Actual_To_Build_In_Place_Call. 7699 (Make_Build_In_Place_Call_In_Assignment): Replace call to 7700 Add_Collection_Actual_To_Build_In_Place_Call with 7701 Add_Finalization_Master_Actual_To_Build_In_Place_Call. 7702 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master. 7703 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master. 7704 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master. 7705 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage. 7706 Rename local variable Collect to Fin_Mas_Id and update its occurrences. 7707 Replace call to Set_Associated_Collection with Set_Finalization_Master. 7708 (Build_Finalization_Collection): Renamed to Build_Finalization_Master. 7709 Replace the call to Associated_Collection with Finalization_Master. 7710 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences. 7711 Update the way finalization master names are generated. Update the 7712 retrieval of the correct access type which will carry the pool and 7713 master attributes. 7714 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved. 7715 (Make_Finalize_Address_Body): Abstract types do not need 7716 Finalize_Address. Code reformatting. 7717 (Make_Finalize_Address_Stmts): Update comment on usage. 7718 (Make_Set_Finalize_Address_Ptr_Call): Removed. 7719 (Process_Declarations): Update comments. 7720 * exp_ch7.ads (Build_Finalization_Collection): Renamed to 7721 Build_Finalization_Master. Update associated comment. 7722 (Make_Set_Finalize_Address_Ptr_Call): Removed. 7723 * exp_ch13.adb: Update comments which mention finalization collections. 7724 (Expand_N_Free_Statement): Replace the call to Associated_Collection 7725 with Finalization_Master. 7726 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to 7727 create calls to routines Allocate_Any_Controlled and 7728 Deallocate_Any_Controlled. 7729 (Find_Finalize_Address): New routine. 7730 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the 7731 comparison. 7732 (Requires_Cleanup_Actions): Update the comment on freeze node 7733 inspection. 7734 * exp_util.ads: Remove comment on generated code for 7735 Build_Allocate_Deallocate_Proc. The code is now quite complex and it 7736 is better to simply look in the body. 7737 * freeze.adb (Freeze_All): Update the comment of finalization 7738 collections. Replace the call to Associated_Collection with 7739 Finalization_Master. Replace the call to Build_Finalization_Collection 7740 with Build_Finalization_Master. 7741 * impunit.adb: Add a-undesu and s-stposu to the list of units. 7742 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file 7743 a-fihema. 7744 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of 7745 Ada.Finalization. Add processing for children of System.Storage_Pools. 7746 * rtsfind.ads: Remove the naming of second level children of 7747 Ada.Finalization. 7748 Remove Ada_Finalization_Heap_Management from the list of units. 7749 Remove subtype Ada_Finalization_Child. 7750 Remove the following subprogram entities: 7751 7752 RE_Allocate 7753 RE_Deallocate 7754 RE_Finalization_Collection 7755 RE_Finalization_Collection_Ptr 7756 RE_Set_Finalize_Address_Ptr 7757 7758 Add the naming of second level children of System.Storage_Pools. 7759 Add System_Finalization_Masters and System_Storage_Pools_Subpools to 7760 the list of units. 7761 Add subtype System_Storage_Pools_Child. 7762 Add the following subprogram entities to System.Finalization_Masters: 7763 7764 RE_Finalization_Master 7765 RE_Finalization_Master_Ptr 7766 7767 Add the following subprogram entities to System.Storage_Pools.Subpools: 7768 7769 RE_Allocate_Any_Controlled 7770 RE_Deallocate_Any_Controlled 7771 RE_Root_Storage_Pool_With_Subpools 7772 RE_Root_Subpool 7773 RE_Subpool_Handle 7774 7775 Move the following subprogram entities from 7776 Ada.Finalization.Heap_Management to System.Finalization_Masters: 7777 7778 RE_Add_Offset_To_Address 7779 RE_Attach 7780 RE_Base_Pool 7781 RE_Detach 7782 7783 * sem_ch3.adb (Access_Type_Declaration): Replace the call to 7784 Set_Associated_Collection with Set_Finalization_Master. 7785 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal 7786 BIP_Finalization_Master is created. 7787 * s-finmas.adb: New unit System.Finalization_Masters. 7788 * s-finmas.ads: New unit System.Finalization_Masters. 7789 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting. 7790 * s-stposu.ads, s-stposu.adb: New unit implementing 7791 System.Storage_Pools.Subpools. 7792 77932011-08-29 Bob Duff <duff@adacore.com> 7794 7795 * tbuild.adb: Add assertion. 7796 77972011-08-29 Thomas Quinot <quinot@adacore.com> 7798 7799 * s-pooglo.adb: Minor reformatting. 7800 78012011-08-29 Ed Schonberg <schonberg@adacore.com> 7802 7803 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is 7804 an indexed component of a packed array whose element type is a record 7805 with a representation clause different from that of the right-hand 7806 side, generate a temporary to minimuze the number of bit-field 7807 operations generated. 7808 78092011-08-29 Ed Schonberg <schonberg@adacore.com> 7810 7811 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of 7812 declarations, and thus are likely insertion points for actions. 7813 78142011-08-29 Bob Duff <duff@adacore.com> 7815 7816 * einfo.ads: Minor comment fix. 7817 78182011-08-29 Robert Dewar <dewar@adacore.com> 7819 7820 * frontend.adb, gnat1drv.adb: Minor reformatting. 7821 78222011-08-29 Tristan Gingold <gingold@adacore.com> 7823 7824 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment. 7825 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding 7826 space in front of the header. 7827 78282011-08-29 Johannes Kanig <kanig@adacore.com> 7829 7830 * frontend.adb (Frontend): Exit after creating Standard package when 7831 -gnatd.H is present. 7832 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is 7833 present. 7834 78352011-08-29 Robert Dewar <dewar@adacore.com> 7836 7837 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb, 7838 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl, 7839 snames.ads-tmpl: Minor reformatting. 7840 78412011-08-29 Philippe Gil <gil@adacore.com> 7842 7843 * prj.adb (Reset_Units_In_Table): New procedure. 7844 Reset units to avoid access to freed memory. 7845 78462011-08-29 Thomas Quinot <quinot@adacore.com> 7847 7848 * get_scos.adb: When reading a P statement SCO without a pragma name 7849 (from an older ALI file), ensure that the Pragma_Name component is set 7850 to Unknown_Pragma (not left uninitialized). 7851 78522011-08-29 Vincent Celier <celier@adacore.com> 7853 7854 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and 7855 modified to compute correctly the object path of a SAL project that is 7856 extending another library project. 7857 (Write_Path_File): New procedure. 7858 * makeutl.ads (Directories): New table moved from Buildgpr 7859 (Get_Directories): New procedure moved from Buildgpr 7860 (Write_Path_File): New procedure 7861 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the 7862 paths before binding SALs, instead of Set_Ada_Paths. 7863 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package 7864 Prj. 7865 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env 7866 (Current_Source_Path_File_Of): New function 7867 (Set_Current_Object_Path_File_Of): New procedure 7868 (Current_Source_Object_File_Of): New function 7869 (Set_Current_Object_Path_File_Of): New procedure 7870 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env 7871 (Current_Source_Path_File_Of): New function 7872 (Set_Current_Object_Path_File_Of): New procedure 7873 (Current_Source_Object_File_Of): New function 7874 (Set_Current_Object_Path_File_Of): New procedure 7875 78762011-08-29 Ed Schonberg <schonberg@adacore.com> 7877 7878 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a 7879 packed entity, use a bit-field assignment only if there is no change of 7880 representation. 7881 78822011-08-29 Thomas Quinot <quinot@adacore.com> 7883 7884 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use 7885 Is_RTU instead of using Chars comparisons. 7886 78872011-08-29 Thomas Quinot <quinot@adacore.com> 7888 7889 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a 7890 temporary object if the actual is constrained, and the discriminants 7891 read from the stream don't match. 7892 78932011-08-29 Tristan Gingold <gingold@adacore.com> 7894 7895 * sem_attr.adb, exp_attr.adb: Add handling of 7896 Attribute_System_Allocator_Alignment 7897 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and 7898 Attribute_System_Allocator_Alignment. 7899 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment. 7900 * gcc-interface/targtyps.c, gcc-interface/utils2.c, 7901 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to 7902 get_target_system_allocator_alignment. 7903 79042011-08-29 Arnaud Charlet <charlet@adacore.com> 7905 7906 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update 7907 dependencies. 7908 79092011-08-29 Arnaud Charlet <charlet@adacore.com> 7910 7911 * exp_ch3.adb (In_Runtime): Fix typo. 7912 79132011-08-29 Bob Duff <duff@adacore.com> 7914 7915 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification. 7916 79172011-08-29 Ed Schonberg <schonberg@adacore.com> 7918 7919 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged 7920 and a separate tag assignment is generated, ensure that the tag 7921 assignment is analyzed. 7922 79232011-08-29 Ed Schonberg <schonberg@adacore.com> 7924 7925 * atree.ads, atree.adb (Copy_Separate_List): New function that applies 7926 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies 7927 of statement lists that may contain local declarations. 7928 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to 7929 duplicate the triggering statements needed for the expansion of this 7930 construct, when the trigger is a dispatching call to a synchronized 7931 primitive. 7932 79332011-08-29 Arnaud Charlet <charlet@adacore.com> 7934 7935 * gnat_rm.texi: Add doc for 'Elab_Subp_Body. 7936 * bindgen.adb: Add comments. 7937 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body 7938 in CodePeer mode. 7939 79402011-08-29 Robert Dewar <dewar@adacore.com> 7941 7942 * exp_attr.adb: Minor reformatting. 7943 Minor code reorganization and commenting. 7944 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor 7945 reformatting. 7946 79472011-08-29 Thomas Quinot <quinot@adacore.com> 7948 7949 * get_scos.adb: Ignore chaining indicators not currently supported 7950 by Ada. 7951 79522011-08-29 Arnaud Charlet <charlet@adacore.com> 7953 7954 * system.ads: Minor editing. 7955 79562011-08-29 Arnaud Charlet <charlet@adacore.com> 7957 7958 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in 7959 CodePeer mode. 7960 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of 7961 Attribute_Elab_Subp_Body. 7962 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New. 7963 * sem_util.adb: Update comments. 7964 79652011-08-29 Thomas Quinot <quinot@adacore.com> 7966 7967 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record 7968 pragma name for each SCO statement corresponding to a pragma. 7969 79702011-08-29 Arnaud Charlet <charlet@adacore.com> 7971 7972 * opt.ads: Minor editing. 7973 79742011-08-29 Yannick Moy <moy@adacore.com> 7975 7976 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode 7977 that only made sense for CodePeer mode. 7978 79792011-08-29 Jose Ruiz <ruiz@adacore.com> 7980 7981 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag 7982 which is no longer used. 7983 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the 7984 handling of the 64-bit division check. 7985 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit 7986 division available. 7987 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no 7988 longer used. 7989 79902011-08-29 Thomas Quinot <quinot@adacore.com> 7991 7992 * get_scos.adb: Minor reformatting. 7993 79942011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 7995 7996 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a 7997 statement list is wrapped in a block, the block is explicitly analyzed 7998 in order to properly redecorate the entities and create a servicing 7999 finalizer. 8000 80012011-08-29 Tristan Gingold <gingold@adacore.com> 8002 8003 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove. 8004 (Set_Zero_Cost_Handling): Remove. 8005 80062011-08-29 Thomas Quinot <quinot@adacore.com> 8007 8008 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting 8009 80102011-08-29 Geert Bosch <bosch@adacore.com> 8011 8012 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation 8013 instruction, as the latter may produce -0.0, which is not a valid VAX 8014 F float number. 8015 (Neg_G): Likewise for VAX F float. 8016 80172011-08-29 Robert Dewar <dewar@adacore.com> 8018 8019 * exp_util.adb: Minor reformatting. 8020 80212011-08-29 Yannick Moy <moy@adacore.com> 8022 8023 * sem_ch3.adb: Minor comment update. 8024 80252011-08-29 Thomas Quinot <quinot@adacore.com> 8026 8027 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of 8028 the operand type. 8029 80302011-08-29 Thomas Quinot <quinot@adacore.com> 8031 8032 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush 8033 current statement sequence on a generic instantiation or a subprogram 8034 declaration. 8035 80362011-08-29 Robert Dewar <dewar@adacore.com> 8037 8038 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb: 8039 Minor reformatting. 8040 80412011-08-29 Hristian Kirtchev <kirtchev@adacore.com> 8042 8043 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)): 8044 Correct the check which involves the freeze node of a controlled or 8045 access-to-controlled type. 8046 80472011-08-29 Geert Bosch <bosch@adacore.com> 8048 8049 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm 8050 statements. 8051 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from 8052 Asm statements. 8053 80542011-08-29 Yannick Moy <moy@adacore.com> 8055 8056 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration 8057 for every index type and component type that is not a subtype_mark. 8058 (Process_Subtype): Set Etype of subtype. 8059 80602011-08-29 Robert Dewar <dewar@adacore.com> 8061 8062 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code 8063 reorganization. Minor reformatting. 8064 80652011-08-29 Steve Baird <baird@adacore.com> 8066 8067 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion 8068 for CodePeer and ALFA modes. 8069 80702011-08-29 Ed Schonberg <schonberg@adacore.com> 8071 8072 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym 8073 that comes from an enclosing scope if it is not the renaming of an 8074 actual, to handle properly a spurious ambiguity in an instance. 8075 80762011-08-29 Eric Botcazou <ebotcazou@adacore.com> 8077 8078 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to... 8079 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and 8080 use it instead of the Esize of the first parameter. 8081 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to 8082 above change. 8083 <Size>: Likewise. Call it for composite types on the RM size. 8084 80852011-08-29 Yannick Moy <moy@adacore.com> 8086 8087 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array. 8088 * sem_util.adb (Unique_Name): Correct behaviour for names of 8089 compilation units. 8090 80912011-08-29 Yannick Moy <moy@adacore.com> 8092 8093 * sem_prag.adb (Check_Precondition_Postcondition): In formal 8094 verification mode, analyze pragma expression for correctness, for 8095 pre/post on library-level subprogram, as it is not expanded later. 8096 80972011-08-29 Yannick Moy <moy@adacore.com> 8098 8099 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates 8100 in formal verification. 8101 81022011-08-29 Thomas Quinot <quinot@adacore.com> 8103 8104 * sem_util.adb: Minor reformatting. 8105 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute, 8106 there's no pragma. 8107 * par_sco.ads, par_sco.adb: Update comments. 8108 81092011-08-29 Yannick Moy <moy@adacore.com> 8110 8111 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and 8112 associated getter/setter. 8113 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc. 8114 81152011-08-29 Vincent Celier <celier@adacore.com> 8116 8117 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind 8118 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler 8119 with declarations for Language_Kind and Dependency_Kind for Ada. 8120 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name 8121 (Process_Compiler): Take into account the new attributes Dependency_Kind 8122 and Language_Kind. 8123 (Check_Configuration): Check if language kind is unit based, not if the 8124 language name is Ada. 8125 (Process_Exceptions_Unit_Based): Ditto 8126 (Add_Language): Remove default additions of language and dependency kind 8127 * prj.ads: Minor comment change 8128 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind 8129 81302011-08-29 Johannes Kanig <kanig@adacore.com> 8131 8132 * debug.adb: Update comments. 8133 81342011-08-24 Joseph Myers <joseph@codesourcery.com> 8135 8136 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o) 8137 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o) 8138 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New. 8139 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o) 8140 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules. 8141 81422011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 8143 8144 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New. 8145 (GNATLIBCFLAGS_FOR_C): Replace 8146 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET. 8147 (gnatlib-shared-default, gnatlib-shared-dual-win32) 8148 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared) 8149 (gnatlib-sjlj, gnatlib-zcx): Likewise. 8150 81512011-08-07 Eric Botcazou <ebotcazou@adacore.com> 8152 8153 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change. 8154 8155 * gcc-interface/gigi.h (enumerate_modes): Fix formatting. 8156 8157 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change. 8158 81592011-08-05 Nicolas Roche <roche@adacore.com> 8160 8161 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared 8162 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with 8163 canadian cross. 8164 * gcc-interface/Make-lang.in: Add support for canadian cross setting. 8165 81662011-08-05 Matthew Heaney <heaney@adacore.com> 8167 8168 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth): 8169 subprogram bodies declared out-of-order. 8170 81712011-08-05 Yannick Moy <moy@adacore.com> 8172 8173 * sem_util.adb (Unique_Name): only prefix with "standard" the names of 8174 entities directly in package Standard, otherwise skip the standard 8175 prefix. 8176 81772011-08-05 Robert Dewar <dewar@adacore.com> 8178 8179 * a-cbmutr.adb: Minor reformatting 8180 (Allocate_Node): refactor node allocation algorithm 8181 81822011-08-05 Robert Dewar <dewar@adacore.com> 8183 8184 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch. 8185 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable 8186 mode. 8187 (Analyze_Pragma, case Check_Policy): Ditto. 8188 * sem_prag.ads (Check_Disabled): New function 8189 * snames.ads-tmpl: Add Name_Disable. 8190 81912011-08-05 Robert Dewar <dewar@adacore.com> 8192 8193 * gnat_rm.texi: Document implementation-defined policy DISABLE for 8194 pragmas Assertion_Policy, Check_Policy, Debug_Policy. 8195 81962011-08-05 Ed Schonberg <schonberg@adacore.com> 8197 8198 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma 8199 that appears in a generic formal part and applies to a formal 8200 subprogram. 8201 82022011-08-05 Robert Dewar <dewar@adacore.com> 8203 8204 * a-cbmutr.ads: Minor reformatting. 8205 82062011-08-05 Matthew Heaney <heaney@adacore.com> 8207 8208 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid 8209 to check count, check sign of value instead. 8210 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty 8211 (Copy_Subtree): allocate copy of source element 8212 (Equal_Subtree): compare elements, not access objects 8213 82142011-08-05 Vincent Celier <celier@adacore.com> 8215 8216 * gnat_ugn.texi: Fix VMS alternative. 8217 82182011-08-05 Thomas Quinot <quinot@adacore.com> 8219 8220 * sem_ch11.adb: Add comment. 8221 82222011-08-05 Robert Dewar <dewar@adacore.com> 8223 8224 * exp_util.adb: Minor comment fix. 8225 82262011-08-05 Robert Dewar <dewar@adacore.com> 8227 8228 * scng.adb (Error_Unterminated_String): Improve flag position when 8229 comma present. 8230 82312011-08-05 Matthew Heaney <heaney@adacore.com> 8232 8233 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway 8234 tree containers). 8235 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded 8236 multiway tree containers. 8237 82382011-08-05 Robert Dewar <dewar@adacore.com> 8239 8240 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2 8241 * stylesw.adb: Implement -gnatyC to control comment spacing 8242 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by 8243 -gnatyc/C). 8244 * usage.adb: Add line for -gnatyC. 8245 82462011-08-05 Robert Dewar <dewar@adacore.com> 8247 8248 * gnat_ugn.texi: Document -gnatyC. 8249 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a 8250 synonym for COMMENTS2). 8251 82522011-08-05 Robert Dewar <dewar@adacore.com> 8253 8254 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb, 8255 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb, 8256 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb, 8257 a-comutr.ads, lib-xref.adb: Minor reformatting. 8258 82592011-08-05 Robert Dewar <dewar@adacore.com> 8260 8261 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal 8262 warning if there is an exception handler present. 8263 82642011-08-05 Pascal Obry <obry@adacore.com> 8265 8266 * a-iteint.ads: Fix copyright year. 8267 82682011-08-05 Thomas Quinot <quinot@adacore.com> 8269 8270 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a 8271 statement SCO for a USE clause or a representation clause. 8272 82732011-08-05 Yannick Moy <moy@adacore.com> 8274 8275 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation 8276 between body and spec for stub. 8277 (Detect_And_Add_ALFA_Scope): take into account subprogram stub 8278 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a 8279 pragma precondition or postcondition, for which the enclosing 8280 subprogram or package in the AST is not the desired one, return empty. 8281 82822011-08-05 Thomas Quinot <quinot@adacore.com> 8283 8284 * g-expect.adb: Minor reformatting. 8285 82862011-08-05 Bob Duff <duff@adacore.com> 8287 8288 * a-fihema.adb: Comment out OS_Lib. 8289 82902011-08-05 Matthew Heaney <heaney@adacore.com> 8291 8292 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb] 8293 (unbounded multiway tree containers) and a-iteint.ads. 8294 * a-comutr.ads, a-comutr.adb: 8295 This is the new Ada 2012 unit for unbounded multiway tree containers 8296 * a-cimutr.ads, a-cimutr.adb 8297 This is the new Ada 2012 unit for indefinite multiway tree containers 8298 * a-iteint.ads: New file. 8299 83002011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 8301 8302 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc. 8303 83042011-08-05 Bob Duff <duff@adacore.com> 8305 8306 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for 8307 subpools. 8308 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax. 8309 83102011-08-05 Ed Schonberg <schonberg@adacore.com> 8311 8312 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the 8313 general indexing aspects of Ada2012. Called when analyzing indexed 8314 components when other interpretations fail. 8315 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only 8316 in an expression context where overloading is meaningful. This excludes 8317 the occurrence in an aspect specification (efficiency only). 8318 * sem_attr.adb (Analyze_Attribute): indicate that the attributes 8319 related to iterators can be set by an attribute specification, but 8320 cannot be queried. 8321 * sem_ch13.adb (Analyze_Aspect_Specifications): handle 8322 Constant_Indexing and Variable_Indexing. 8323 (Check_Indexing_Functions): New procedure to perform legality checks. 8324 Additional semantic checks at end of declarations. 8325 83262011-08-05 Sergey Rybin <rybin@adacore.com> 8327 8328 * tree_io.ads: Update ASIS_Version_Number because of the change of the 8329 order of calling Tree_Write/Tree_Read routines made for aspects. 8330 83312011-08-05 Bob Duff <duff@adacore.com> 8332 8333 * a-fihema.adb (Finalize): Fix race condition. 8334 83352011-08-05 Yannick Moy <moy@adacore.com> 8336 8337 * sem_ch12.adb (Analyze_Package_Instantiation, 8338 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA 8339 mode. 8340 83412011-08-05 Ed Schonberg <schonberg@adacore.com> 8342 8343 * sem_type.adb (Specific_Type): in an instance, the type-specific 8344 operand of an equality check that involves null may have a private 8345 type. Use full view to determine legality of construct. 8346 83472011-08-05 Vincent Celier <celier@adacore.com> 8348 8349 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to 8350 delete or close the file when the call to gnatmake was successful. 8351 83522011-08-05 Yannick Moy <moy@adacore.com> 8353 8354 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set 8355 Global_Discard_Names. 8356 83572011-08-05 Ed Schonberg <schonberg@adacore.com> 8358 8359 * sinfo.ads: comments on use of entity field for aspect specifications. 8360 83612011-08-05 Ed Schonberg <schonberg@adacore.com> 8362 8363 * sem_ch12.adb (Reset_Entity): If the entity field of the associated 8364 node is not itself an entity but a selected component, it is a 8365 rewritten parameterless call to an en enclosing synchronized operation, 8366 and this expansion will be performed again in the instance, so there is 8367 no global information to preserve. 8368 83692011-08-05 Javier Miranda <miranda@adacore.com> 8370 8371 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support 8372 for renamings of predefined primitives. 8373 (In_Predef_Prims_DT): New subprogram. 8374 83752011-08-05 Ed Schonberg <schonberg@adacore.com> 8376 8377 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a 8378 possible interpretation of name is a reference type, add an 8379 interpretation that is the designated type of the reference 8380 discriminant of that type. 8381 * sem_res.adb (resolve): If the interpretation imposed by context is an 8382 implicit dereference, rewrite the node as the deference of the 8383 reference discriminant. 8384 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type, 8385 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from 8386 parent type or base type. 8387 * sem_ch4.adb (Process_Indexed_Component, 8388 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type, 8389 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component): 8390 Check for implicit dereference. 8391 (List_Operand_Interps): Indicate when an implicit dereference is 8392 ambiguous. 8393 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference. 8394 83952011-08-05 Thomas Quinot <quinot@adacore.com> 8396 8397 * scos.ads: Update documentation of SCO table. Pragma statements can now 8398 be marked as disabled (using 'p' instead of 'P' as the statement kind). 8399 * par_sco.ads, par_sco.adb: Implement the above change. 8400 (Process_Decisions_Defer): Generate a P decision for the first parameter 8401 of a dyadic pragma Debug. 8402 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if 8403 necessary. 8404 * put_scos.adb: Code simplification based on above change. 8405 84062011-08-05 Robert Dewar <dewar@adacore.com> 8407 8408 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb, 8409 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb, 8410 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads, 8411 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting 8412 84132011-08-05 Bob Duff <duff@adacore.com> 8414 8415 * a-stunau.ads, g-spipat.adb: Update comments. 8416 84172011-08-05 Bob Duff <duff@adacore.com> 8418 8419 * a-fihema.ads: Minor comment fix. 8420 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is 8421 correct. 8422 (Attach, Detach): Remove some unnecessary code. 8423 (Finalize): Remove Node_Ptr_To_Address, replace with a constant. 8424 84252011-08-05 Bob Duff <duff@adacore.com> 8426 8427 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap 8428 allocation for Objects component. This simplifies the code somewhat. It 8429 is also a little more efficient in the not-so-unusual case where there 8430 are no controlled objects allocated. 8431 Make Finalization_Started flag atomic. 8432 (Finalize): Avoid unnecessary detachment of items from the list. 8433 (pcol): Minor cleanup. 8434 84352011-08-05 Ed Schonberg <schonberg@adacore.com> 8436 8437 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal 8438 package whose name is the same as that of the generic unit, or its 8439 ultimate prefix. 8440 84412011-08-05 Bob Duff <duff@adacore.com> 8442 8443 * a-fihema.adb, a-fihema.ads: Minor comment improvements. 8444 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb: 8445 Minor comment fixes. 8446 84472011-08-05 Arnaud Charlet <charlet@adacore.com> 8448 8449 * make.adb (Linking_Phase): No longer need to set source search path 8450 before calling gnatlink in CodePeer mode. 8451 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to 8452 gcc in CodePeer mode, since the binder generated file no longer has a 8453 'with Main'. 8454 * switch.ads, switch.adb (Is_Language_Switch): Removed. 8455 * switch-c.adb: Update comment. 8456 84572011-08-05 Thomas Quinot <quinot@adacore.com> 8458 8459 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting. 8460 84612011-08-05 Nicolas Roche <roche@adacore.com> 8462 8463 * gnat_ugn.texi: Fix minor syntax error issue. 8464 84652011-08-05 Vincent Celier <celier@adacore.com> 8466 8467 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to 8468 delete or close the file when the call to gnatmake returns a non 8469 successful return code. 8470 84712011-08-05 Ed Schonberg <schonberg@adacore.com> 8472 8473 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate 8474 check, indicate that the copy of the original node does not come from 8475 source, to prevent an infinite recursion of the expansion. 8476 84772011-08-05 Johannes Kanig <kanig@adacore.com> 8478 8479 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates 8480 VC generation for subprogram bodies. 8481 84822011-08-05 Yannick Moy <moy@adacore.com> 8483 8484 * einfo.ads: Typo. 8485 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define 8486 the base type with the smallest allowed base type. 8487 84882011-08-05 Sergey Rybin <rybin@adacore.com> 8489 8490 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for 8491 aspects. 8492 84932011-08-05 Ed Schonberg <schonberg@adacore.com> 8494 8495 * sem_ch12.ads: minor comment updates. 8496 84972011-08-05 Ed Schonberg <schonberg@adacore.com> 8498 8499 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an 8500 instantiation and a formal package the compiler generates a package 8501 renaming declaration so that the generic name within the declaration 8502 is interpreted as a renaming of the instance. At the end of a formal 8503 package declaration, this renaming must become invisible. 8504 85052011-08-05 Hristian Kirtchev <kirtchev@adacore.com> 8506 8507 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character 8508 comparison and rely on concrete entities instead. 8509 85102011-08-05 Ed Schonberg <schonberg@adacore.com> 8511 8512 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types 8513 and discriminants, to indicate that the type has an access discriminant 8514 that supports implicit dereference. 8515 * snames.ads-tmpl: Add names of aspects and attributes related to 8516 Ada2012 iterators: constant_indexing, default_iterator, 8517 iterator_element, implicit_dereference, variable_indexing. 8518 * aspects.ads, aspects.adb: entries for iterator-related aspects. 8519 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for 8520 iterator-related aspects. 8521 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects. 8522 85232011-08-05 Sergey Rybin <rybin@adacore.com> 8524 8525 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling 8526 metrics in gnatmetric to cover new kinds of coupling mentrics. 8527 85282011-08-05 Steve Baird <baird@adacore.com> 8529 8530 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead 8531 of calling the user-defined main subprogram. 8532 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode 8533 is set) Call_Main_Subprogram ahead of, as opposed to 8534 inside of, Main. 8535 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional 8536 generation of a "with" of the user-defined main subprogram. 8537 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper 8538 (which is now called from Gen_Main instead). 8539 85402011-08-05 Emmanuel Briot <briot@adacore.com> 8541 8542 * projects.texi: Added reference to the Makefile package. 8543 85442011-08-05 Thomas Quinot <quinot@adacore.com> 8545 8546 * exp_ch7.adb: Minor comment rewording. 8547 85482011-08-05 Ed Falis <falis@adacore.com> 8549 8550 * env.c: Fix comment. 8551 85522011-08-05 Hristian Kirtchev <kirtchev@adacore.com> 8553 8554 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid 8555 character comparison and rely on concrete entities instead. 8556 85572011-08-05 Ed Schonberg <schonberg@adacore.com> 8558 8559 * sem_ch3.adb: (Check_Private_Overriding): better error message, 8560 suggested by AI95-0068. 8561 85622011-08-05 Hristian Kirtchev <kirtchev@adacore.com> 8563 8564 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve 8565 the two potential initialization calls. This accounts for any 8566 access-before-elaboration checks which may precede the initialization 8567 calls. 8568 (Next_Suitable_Statement): New routine. Returns the next real statement 8569 after the input node while skipping generated checks. 8570 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along 8571 with comment on usage. 8572 Do not generate Elaborate_All when the trigger is a finalization call 8573 coming from a type init proc. 8574 (Check_Elab_Call): Propagate the initialization procedure context to 8575 subsequent calls to Check_A_Call. 8576 (Check_Internal_Call_Continue): Propagate the initialization procedure 8577 context to subsequent calls to Check_Elab_Call. 8578 (Is_Finalization_Procedure): New routine. Returns True if the input 8579 entity denotes a [Deep_]Finalize routine. 8580 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc 8581 along with comment on usage. 8582 85832011-08-05 Vadim Godunko <godunko@adacore.com> 8584 8585 * s-atocou.ads: Add list of supported platforms. 8586 85872011-08-05 Yannick Moy <moy@adacore.com> 8588 8589 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables 8590 8591 * opt.ads (Disable_ALI_File): new Boolean flag 8592 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing 8593 85942011-08-05 Ed Falis <falis@adacore.com> 8595 8596 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that 8597 environ is properly defined. 8598 85992011-08-05 Vincent Celier <celier@adacore.com> 8600 8601 * make.adb (Compilation_Phase): Exit immediately when all objects have 8602 been found up to date, to avoid multiple exit messages. 8603 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the 8604 same project for languages with no compiler. 8605 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch 8606 -eI. 86072011-08-05 Robert Dewar <dewar@adacore.com> 8608 8609 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb, 8610 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb, 8611 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb, 8612 s-atocou-builtin.adb: Minor reformatting. 8613 86142011-08-05 Yannick Moy <moy@adacore.com> 8615 8616 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode, 8617 if the node to wrap is a pragma check, this node and enclosed 8618 expression are not expanded, so do not apply any transformations here. 8619 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid 8620 introducing transient scopes. 8621 86222011-08-05 Jose Ruiz <ruiz@adacore.com> 8623 8624 * adaint.c (__gnat_set_writable, __gnat_set_readable, 8625 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable, 8626 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod 8627 routine is available, so we use the default implementation of these 8628 functions. 8629 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is 8630 support for copying attributes on VxWorks 6. 8631 86322011-08-05 Yannick Moy <moy@adacore.com> 8633 8634 * debug.adb: Remove use of -gnatd.D. 8635 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode 8636 * opt.ads: Simplify variables for ALFA mode, to keep one only 8637 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode 8638 to ALFA mode. 8639 86402011-08-05 Vincent Celier <celier@adacore.com> 8641 8642 * prj-conf.adb (Do_Autoconf): Look also for --RTS in 8643 Builder'Default_Switches. 8644 86452011-08-05 Vincent Celier <celier@adacore.com> 8646 8647 * makeusg.adb: Add lines for --create-map-file switches. 8648 86492011-08-05 Ed Schonberg <schonberg@adacore.com> 8650 8651 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the 8652 profile is incomplete and the full view is available, replace it with 8653 the full view. 8654 * sem_ch6.adb (Possible_Freeze): if a type in the profile is 8655 incomplete, freezing the subprogram is delayed until the full view is 8656 frozen. 8657 * sem_type.adb (Disambiguate): an ambiguity between a user-defined 8658 fixed-point multiplication operator and the predefined operator is 8659 resolved in favor of the user-defined one. 8660 86612011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 8662 8663 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use 8664 CONST_CAST. 8665 86662011-08-04 Ed Schonberg <schonberg@adacore.com> 8667 8668 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine 8669 whether a type lacks user-defined Read or Write operations, or has a 8670 component that lacks them. 8671 * sem_attr.adb (Check_Stream_Attribute): if restriction 8672 No_Default_Stream_Attributes is active, verify that all subcomponent 8673 types of the target have user-defined stream operations, and report 8674 error otherwise. 8675 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation. 8676 * exp_strm.adb: Build_Elementary_Input_Call, 8677 Build_Elementary_Write_Call): remove checks for restriction 8678 No_Default_Stream_Attributes, now checked in semantics. 8679 86802011-08-04 Vincent Celier <celier@adacore.com> 8681 8682 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS 8683 switches on the command line, look for all valid --RTS switches in the 8684 Builder switches and for each language use the first runtime name found 8685 to invoke gprconfig. 8686 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the 8687 command line and there is no auto-configuration. 8688 (Runtime_Name_Set_For): New function. 8689 86902011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 8691 8692 * exp_ch7.adb (Build_Object_Declarations): Do not generate the 8693 elaborate initialization expression for variable Abort when processing 8694 a package body or a declaration. 8695 (Create_Finalizer): Propagate the package context when creating the 8696 exception-related variables. 8697 * exp_ch7.ads (Build_Object_Declarations): New formal parameter 8698 For_Package along with usage comment. 8699 87002011-08-04 Arnaud Charlet <charlet@adacore.com> 8701 8702 * gcc-interface/Makefile.in: Clean up targets. 8703 Enable new package for atomic counters and copy-on-write implementation 8704 of unbounded strings on x86 platforms. 8705 * gcc-interface/Make-lang.in: Update dependencies. 8706 87072011-08-04 Robert Dewar <dewar@adacore.com> 8708 8709 * exp_ch7.adb: Minor reformatting. 8710 87112011-08-04 Robert Dewar <dewar@adacore.com> 8712 8713 * exp_strm.adb: Minor reformatting. 8714 87152011-08-04 Vadim Godunko <godunko@adacore.com> 8716 8717 * s-atocou.adb: Replace by dummy version and use on targets where atomic 8718 operations are not supported. 8719 * s-atocou-builtin.adb: Renamed from s-atocou.adb. 8720 * s-atocou-x86.adb: New file. 8721 * Makefile.rtl: Add s-atocou.o file 8722 87232011-08-04 Arnaud Charlet <charlet@adacore.com> 8724 8725 * make.adb (Compile): Move setting of CodePeer_Mode to ... 8726 (Compilation_Phase): ... here. 8727 (Scan_Make_Arg): Now bind and link by default in CodePeer mode. 8728 87292011-08-04 Thomas Quinot <quinot@adacore.com> 8730 8731 * Make-generated.in: Fix minor typo in comment. 8732 87332011-08-04 Thomas Quinot <quinot@adacore.com> 8734 8735 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve 8736 the project path. 8737 87382011-08-04 Robert Dewar <dewar@adacore.com> 8739 8740 * a-coinho.adb: Minor reformatting. 8741 87422011-08-04 Robert Dewar <dewar@adacore.com> 8743 8744 * a-coinho.ads: Minor reformatting. 8745 87462011-08-04 Vadim Godunko <godunko@adacore.com> 8747 8748 * s-atocou.ads, s-atocou.adb: New files. 8749 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads, 8750 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove 8751 direct use of GCC's atomic builtins and replace them by use of new 8752 atomic counter package. 8753 87542011-08-04 Ed Schonberg <schonberg@adacore.com> 8755 8756 * exp_strm.adb: better error message for No_Default_Stream_Attributes. 8757 87582011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 8759 8760 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic 8761 with a call to Get_External_Tag. 8762 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on 8763 subprogram usage. Remove the guard against package declarations and 8764 bodies since Build_Cleanup_Statements is no longer invoked in that 8765 context. 8766 (Build_Components): Initialize Tagged_Type_Stmts when the context 8767 contains at least one library-level tagged type. 8768 (Build_Finalizer): New local variables Has_Tagged_Types and 8769 Tagged_Type_Stmts along with associated comments on usage. Update the 8770 logic to include tagged type processing. 8771 (Create_Finalizer): Insert all library-level tagged type unregistration 8772 code before the jump block circuitry. 8773 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements. 8774 (Expand_N_Package_Declaration): Remove the call to 8775 Build_Cleanup_Statements. 8776 (Process_Tagged_Type_Declaration): New routine. Generate a call to 8777 unregister the external tag of a tagged type. 8778 (Processing_Actions): Reimplemented to handle tagged types. 8779 (Process_Declarations): Detect the declaration of a library-level 8780 tagged type and carry out the appropriate actions. 8781 (Unregister_Tagged_Types): Removed. The machinery has been directly 8782 merged with Build_Finalizer. 8783 87842011-08-04 Robert Dewar <dewar@adacore.com> 8785 8786 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb, 8787 gnatls.adb, exp_ch3.adb: Minor reformatting. 8788 87892011-08-04 Marc Sango <sango@adacore.com> 8790 8791 * sem_attr.adb (Analyze_Attribute): Replace the message 8792 "invisible attribute of}" of the spark restriction violation in 8793 attribute reference by the simple message "invisible attribute of type". 8794 Indeed, the node value Error_Msg_Node_1 used is in conflit with the 8795 two insertion characters: '&' and '}'. 8796 87972011-08-04 Vadim Godunko <godunko@adacore.com> 8798 8799 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho". 8800 * a-coinho.ads, a-coinho.adb: New file. 8801 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders. 8802 88032011-08-04 Nicolas Roche <roche@adacore.com> 8804 8805 * alfa_test.adb: Not all ali files are containing alfa information even 8806 if compiled with -gnatd.F. So suppress warning about missing ALFA 8807 information. 8808 88092011-08-04 Yannick Moy <moy@adacore.com> 8810 8811 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for 8812 scope. 8813 * put_alfa.adb: Check that scope name is not empty. 8814 88152011-08-04 Ed Schonberg <schonberg@adacore.com> 8816 8817 * exp_ch3.adb (Stream_Operation_Ok): new predicate 8818 Needs_Elementary_Stream_Operation, to determine whether user-defined 8819 Read and Write attributes are available for the elementary components 8820 of the given type. If only the predefined attributes are available, 8821 then when restriction No_Default_Stream_Attributes is active the 8822 predefined stream attributes for the composite type cannot be created. 8823 88242011-08-04 Robert Dewar <dewar@adacore.com> 8825 8826 * bindgen.adb: Fix obsolete comments and names from Ada/C days. 8827 Put routines in alpha order 8828 88292011-08-04 Jose Ruiz <ruiz@adacore.com> 8830 8831 * gcc-interface/Makefile.in: Remove xenomai specific versions of system. 8832 * gcc-interface/Make-lang.in: Update dependencies. 8833 88342011-08-04 Arnaud Charlet <charlet@adacore.com> 8835 8836 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada. 8837 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls 8838 gnat1why). 8839 88402011-08-04 Robert Dewar <dewar@adacore.com> 8841 8842 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb, 8843 lib-xref-alfa.adb: Minor reformatting. 8844 88452011-08-04 Marc Sango <sango@adacore.com> 8846 8847 * sem_ch12.adb (Analyze_Generic_Package_Declaration, 8848 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation, 8849 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK 8850 mode. 8851 88522011-08-04 Tristan Gingold <gingold@adacore.com> 8853 8854 * bindgen.adb (Gen_Adainit_C): Remove. 8855 (Gen_Adafinal_C): Ditto. 8856 (Gen_Elab_Externals_C): Ditto. 8857 (Gen_Elab_Calls_C): Ditto. 8858 (Gen_Elab_Order_C): Ditto. 8859 (Gen_Elab_Defs_C): Ditto. 8860 (Gen_Finalize_Library_C): Ditto. 8861 (Gen_Finalize_Library_Defs_C): Ditto. 8862 (Gen_Main_C): Ditto. 8863 (Gen_Output_File_C): Ditto. 8864 (Gen_Restrictions_C): Ditto. 8865 (Gen_Versions_C): Ditto. 8866 (Write_Info_Ada_C): Ditto. 8867 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C 8868 (Gen_Output_File): Do not force Ada_Bind_File anymore. 8869 Always call Gen_Output_File_Ada. 8870 * gnatlink.adb (Begin_Info): Now a constant. 8871 (End_Info): Ditto. 8872 (Ada_Bind_File): Remove 8873 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases. 8874 * switch-b.adb (Scan_Binder_Switches): Do not handle -C. 8875 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases. 8876 * opt.ads (Ada_Bind_File): Remove. 8877 88782011-08-04 Thomas Quinot <quinot@adacore.com> 8879 8880 * projects.texi: Document target-specific directory in default project 8881 path for gnatmake. 8882 88832011-08-04 Thomas Quinot <quinot@adacore.com> 8884 8885 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project 8886 path in all cases . 8887 88882011-08-04 Yannick Moy <moy@adacore.com> 8889 8890 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb, 8891 opt.ads, lib-xref.ads: Code clean up. 8892 88932011-08-04 Yannick Moy <moy@adacore.com> 8894 8895 * gnat_rm.texi: Update description of Test_Case 8896 * gnat_ugn.texi: Typo. 8897 88982011-08-04 Ed Falis <falis@adacore.com> 8899 8900 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin. 8901 89022011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 8903 8904 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when 8905 it is of type Root_Controlled. This action eliminates fields Prev and 8906 Next from type equality. 8907 89082011-08-04 Yannick Moy <moy@adacore.com> 8909 8910 * lib-xref-alfa.adb: Correct typo. 8911 89122011-08-04 Matthew Heaney <heaney@adacore.com> 8913 8914 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes 8915 component. 8916 89172011-08-04 Yannick Moy <moy@adacore.com> 8918 8919 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure 8920 (Analyze_Pragma): allow static string expression for name of Test_Case, 8921 instead of simply string literals. 8922 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string 8923 expressions. 8924 89252011-08-04 Vincent Celier <celier@adacore.com> 8926 8927 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical 8928 case suffixes to find truncated main sources. 8929 89302011-08-04 Tristan Gingold <gingold@adacore.com> 8931 8932 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus. 8933 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put. 8934 (Compute_Current_Task): Ditto. 8935 89362011-08-04 Tristan Gingold <gingold@adacore.com> 8937 8938 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage. 8939 89402011-08-04 Yannick Moy <moy@adacore.com> 8941 8942 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects 8943 library-level constant. 8944 (Add_ALFA_Xrefs): ignore global constants in ALFA xref. 8945 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal 8946 used as selector of parameter association, in ALFA mode. 8947 89482011-08-04 Robert Dewar <dewar@adacore.com> 8949 8950 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb, 8951 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor 8952 reformatting. 8953 89542011-08-04 Arnaud Charlet <charlet@adacore.com> 8955 8956 * make.adb (Linking_Phase): Set source search path before calling 8957 gnatlink in CodePeer mode. 8958 89592011-08-04 Javier Miranda <miranda@adacore.com> 8960 8961 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration): 8962 Remove code which takes care of building TSDs. 8963 * rtsfind.ads (RE_Check_Interface_Conversion): New entity. 8964 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating 8965 the accessibility check in VM targets. 8966 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads 8967 (Building_Static_DT): Now returns false for VM targets. 8968 (Build_VM_TSDs): Removed. 8969 (Expand_Interface_Conversion): Generate missing runtime check for 8970 conversions to interface types whose target type is unknown at compile 8971 time. 8972 (Make_VM_TSD): Add missing code to disable the generation of calls to 8973 Check_TSD if the tagged type is not defined at library level, or not 8974 has a representation clause specifying its external tag, or -gnatdQ is 8975 active. 8976 * exp_disp.ads (Build_VM_TSDs): Removed. 8977 (Make_VM_TSDs): Spec relocated from exp_disp.adb 8978 * sem_disp.adb (Check_Dispatching_Operation): No code required to 8979 register primitives in the dispatch tables in VM targets. 8980 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of 8981 initialization of class-wide interface objects in VM targets. 8982 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead 8983 of Make_DT). 8984 89852011-08-04 Jerome Lambourg <lambourg@adacore.com> 8986 8987 * gnatlink.adb (Gnatlink): Correct missleading error message displayed 8988 when dotnet-ld cannot be found. 8989 89902011-08-04 Arnaud Charlet <charlet@adacore.com> 8991 8992 * bindgen.adb: Simplify significantly generation of binder body file in 8993 CodePeer mode. 8994 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure 8995 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec 8996 not expanded). 8997 89982011-08-04 Yannick Moy <moy@adacore.com> 8999 9000 * sem_prag.adb, sem.ads: Code cleanup. 9001 90022011-08-04 Tristan Gingold <gingold@adacore.com> 9003 9004 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part. 9005 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate 9006 results if possible. 9007 * s-stusta.adb (Print): Adjust after changes in s-stausa. 9008 * gnat_ugn.texi: Update dynamic stack usage section. 9009 90102011-08-04 Steve Baird <baird@adacore.com> 9011 9012 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure. 9013 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which 9014 contains only a call to the user-defined main subprogram. 9015 (Gen_Main_Ada) - If CodePeer_Mode is set, then 9016 call the "wrapper" subprogram instead of directly 9017 calling the user-defined main subprogram. 9018 90192011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9020 9021 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all 9022 alternatives of a case statement for controlled objects. Rename local 9023 variable A to Dead_Alt. 9024 (Expand_N_If_Statement): Check the then and else statements of an if 9025 statement for controlled objects. Check the then statements of all 9026 elsif parts of an if statement for controlled objects. 9027 (Expand_N_Loop_Statement): Check the statements of a loop for controlled 9028 objects. 9029 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which 9030 detects a loop associated with the expansion of an array object. 9031 Augment the processing of the loop statements to account for a possible 9032 wrap done by Process_Statements_For_Controlled_Objects. 9033 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering 9034 statements and abortable part of an asynchronous select for controlled 9035 objects. 9036 (Expand_N_Conditional_Entry_Call): Check the else statements of a 9037 conditional entry call for controlled objects. 9038 (Expand_N_Selective_Accept): Check the alternatives of a selective 9039 accept for controlled objects. 9040 (Expand_N_Timed_Entry_Call): Check the entry call and delay 9041 alternatives of a timed entry call for controlled objects. 9042 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an 9043 exception handler for controlled objects. 9044 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)): 9045 Add formal parameter Nested_Constructs along with its associated 9046 comment. 9047 (Requires_Cleanup_Actions (Node_Id)): Update all calls to 9048 Requires_Cleanup_Actions. 9049 (Process_Statements_For_Controlled_Objects): New routine. 9050 * exp_util.ads (Process_Statements_For_Controlled_Objects): New 9051 routine. Inspect a node which contains a non-handled sequence of 9052 statements for controlled objects. If such an object is found, the 9053 statements are wrapped in a block. 9054 90552011-08-04 Bob Duff <duff@adacore.com> 9056 9057 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we 9058 need to compare with Class_Wide_Type (T2), in order to get at the 9059 original class-wide type node. 9060 * sem_type.ads (Covers): Improve the comment. 9061 * einfo.ads (Class_Wide_Type): Improve the comment. 9062 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of 9063 the type of the Deref. 9064 90652011-08-04 Yannick Moy <moy@adacore.com> 9066 9067 * gnat_rm.texi: Document that Test_Case pragma can only appear on 9068 separate declarations. 9069 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to 9070 check identifier of pragma argument. 9071 (Chain_TC): check that no other test case associated to the same entity 9072 share the same name. 9073 (Check_Test_Case): disallow test case inside subprogram body 9074 (Analyze_Pragma): correct call to check identifier and not argument 9075 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new 9076 function gets name from test case pragma. 9077 90782011-08-04 Yannick Moy <moy@adacore.com> 9079 9080 * gnat_rm.texi: Document new pragma and aspect. 9081 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case 9082 (No_Duplicates_Allowed): new constant array defining whether duplicates 9083 aspects of each kind can appear on the same declaration. 9084 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract 9085 field, which points to a node holding the previous Spec_PPC_List. 9086 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List 9087 through the indirection with Contract. 9088 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node 9089 * par-prag.adb (Prag): do nothing on Test_Case pragma 9090 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not 9091 be called directly. 9092 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in 9093 component Ensures of Test_Case. 9094 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb 9095 (Analyze_Generic_Subprogram_Declaration, 9096 Analyze_Subprogram_Instantiation, 9097 Analyze_Abstract_Subprogram_Declaration, 9098 Analyze_Subprogram_Body_Helper, 9099 Analyze_Subprogram_Specification, Analyze_Entry_Declaration): 9100 insert contract in subprogram node at point of definition 9101 * sem_ch13.adb 9102 (Aspect_Loop): do not raise error on duplicate Test_Case aspect 9103 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create 9104 corresponding pragma 9105 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect 9106 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases, 9107 similar to the analysis of pre/post 9108 (Derive_Subprogram): insert contract in subprogram node at point of 9109 derivation. 9110 * sem_prag.adb, sem_prag.ads 9111 (Check_Arg_Is_String_Literal, Check_Identifier): 9112 new checking procedures to be called in treatment of pragmas 9113 (Check_Test_Case): new procedure to check that a Test_Case aspect or 9114 pragma is well-formed. This does not check currently that 'Result is 9115 used only in the Ensures component of a Test_Case. 9116 (Analyze_Pragma): add case for Test_Case 9117 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures 9118 components of a Test_Case. 9119 (Preanalyze_TC_Args): new procedure to preanalyze the boolean 9120 expressions in the 3rd (and 4th if present) arguments of a Test_Case 9121 pragma, treated as spec expressions. 9122 (Sig_Flags): add value -1 for Test_Case. 9123 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma, 9124 Get_Requires_From_Test_Case_Pragma): getters for both expression 9125 components of a Test_Case. 9126 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as 9127 indirection between an entry or [generic] subprogram entity and its 9128 pre/post + test-cases. 9129 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List): 9130 get/set for fields of an N_Contract node. 9131 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode, 9132 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new 9133 names and pragma for Test_Case. 9134 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node 9135 91362011-08-04 Vincent Celier <celier@adacore.com> 9137 9138 * gnat_ugn.texi: Improve documentation of gnatmake switch 9139 --source-info-file=. 9140 91412011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9142 9143 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion 9144 type). Initialize Atyp to the appropriate type which is later checked 9145 for completion. Rewrite the assertion associated with private type 9146 completion. 9147 91482011-08-04 Ed Falis <falis@adacore.com> 9149 9150 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to 9151 initialize the number of CPUs. 9152 91532011-08-04 Ed Schonberg <schonberg@adacore.com> 9154 9155 * sem_type.adb (Disambiguate): New subsidiary routine 9156 In_Same_Declaration_List, to implement AI05-0020: a user-defined 9157 equality on an anonymous access type whose designated type is private 9158 does not lead to an ambiguity with the universal access equality 9159 operator in the body or child units of the defining package. The same 9160 is true for a multiplication operator on a private type completed with 9161 a fixed-point-type. 9162 91632011-08-04 Javier Miranda <miranda@adacore.com> 9164 9165 * opt.ads (Init_Or_Norm_Scalars_Config): Removed. 9166 (Normalize_Scalars_Config): Removed. 9167 * opt.adb 9168 (Register_Opt_Config_Switches): Remove registering config values of 9169 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config. 9170 (Restore_Opt_Config_Switches): Remove code which restores the values of 9171 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of 9172 Init_Or_Norm_Scalars. 9173 (Save_Opt_Config_Switches): Remove code which saves values of 9174 Init_Or_Norm_Scalars and Normalize_Scalars. 9175 (Set_Opt_Config_Switches): Remove code which restores config values of 9176 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of 9177 Init_Or_Norm_Scalars. 9178 91792011-08-04 Yannick Moy <moy@adacore.com> 9180 9181 * frontend.adb (Frontend): remove previous patch to avoid full 9182 qualification in ALFA mode. 9183 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables. 9184 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a 9185 unique name for an entity, which could be used to identify the entity 9186 across compilation units. 9187 91882011-08-04 Thomas Quinot <quinot@adacore.com> 9189 9190 * prj-env.adb 9191 (Initialize_Default_Project_Path): Add target specific directory 9192 ($prefix/$target/lib/gnat) in front of project path in all cases 9193 (making gnatmake's behaviour consistent with gprbuild). 9194 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: 9195 Pass target name from Sdefault to project subsystem. 9196 * gnatls.adb: Show new target specific default project directory. 9197 91982011-08-04 Johannes Kanig <kanig@adacore.com> 9199 9200 * cstand.adb: Add Information to Identifier in Standard 9201 (Identifer_For): Set Entity to the corresponding entity 9202 92032011-08-04 Sergey Rybin <rybin@adacore.com> 9204 9205 * gnat_ugn.texi: Update doc on gnatcheck. 9206 92072011-08-04 Yannick Moy <moy@adacore.com> 9208 9209 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of 9210 xrefs in a scope. 9211 92122011-08-04 Yannick Moy <moy@adacore.com> 9213 9214 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without 9215 performing expansion. 9216 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, 9217 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that 9218 it is not called in ALFA mode. 9219 92202011-08-04 Emmanuel Briot <briot@adacore.com> 9221 9222 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used 9223 after all, so removed. 9224 92252011-08-04 Sergey Rybin <rybin@adacore.com> 9226 9227 * vms_data.ads: Add missing VMS qualifiers. 9228 92292011-08-04 Emmanuel Briot <briot@adacore.com> 9230 9231 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild 9232 the list of files on the command line after processing it through 9233 Complete_Mains. 9234 92352011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9236 9237 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized 9238 processing for .NET/JVM. These targets can now benefit from 9239 Raise_From_Controlled_Operation and they share the same processing with 9240 standard targets. 9241 (Establish_Transient_Scope): Remove the restriction for .NET/JVM. 9242 These targets need transient scopes in order to properly finalize short 9243 lived controlled objects. 9244 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for 9245 NET/JVM. These targets can now benefit from 9246 Raise_From_Controlled_Operation and they share the same processing with 9247 standard targets. 9248 92492011-08-04 Geert Bosch <bosch@adacore.com> 9250 9251 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack 9252 92532011-08-04 Ed Schonberg <schonberg@adacore.com> 9254 9255 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to 9256 Expand_Record_Aggregate, to determine whether aggregate must be 9257 expanded into assignments. This is the case if the ancestor part is 9258 private, regarless of the setting of the flag Has_Private_Ancestor. 9259 92602011-08-04 Ed Falis <falis@adacore.com> 9261 9262 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts 9263 92642011-08-04 Bob Duff <duff@adacore.com> 9265 9266 * sinfo.ads: Fix comment. 9267 92682011-08-04 Steve Baird <baird@adacore.com> 9269 9270 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then 9271 choose a package name in much the same way as is 9272 done for JGNAT when VM_Target /= No_VM, except that 9273 a slightly more distinctive prefix string is used. 9274 92752011-08-04 Emmanuel Briot <briot@adacore.com> 9276 9277 * makeutl.adb (Complete_Mains): no longer accept unit names on the 9278 gnatmake command line. 9279 This behavior was never documented (and was supported only because of 9280 an early bug in the code). This case might lead to ambiguous cases 9281 (between unit names and truncated base names without suffixes). 9282 92832011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9284 9285 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine. 9286 Remove the external tag of a tagged type from the internal hash table. 9287 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the 9288 expanded usage of the routine. Strenghten the check for Is_Master. Add 9289 processing for tagged types. 9290 (Build_Finalizer): Create all the necessary lists used in finalizer 9291 creation when the processed context is a package that may contain 9292 tagged types. 9293 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to 9294 Requires_Cleanup_Actions. 9295 (Expand_N_Package_Body): Package bodies may need clean up code 9296 depending on whether they contain tagged types. 9297 (Expand_N_Package_Declaration): Package declarations may need clean up 9298 code depending on whether they contain tagged types. 9299 (Unregister_Tagged_Types): New routine. Search through a list of 9300 declarations or statements, looking for non-abstract Ada tagged types. 9301 For each such type, generate code to unregister the external tag. 9302 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to 9303 Requires_Cleanup_Actions. 9304 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search 9305 through a list of declarations or statements looking for non-abstract 9306 Ada tagged types or controlled objects. 9307 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to 9308 Requires_Cleanup_Actions. 9309 (Has_Controlled_Objects (List_Id, Boolean)): Removed. 9310 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and 9311 RE_Unit_Table. 9312 93132011-08-04 Vincent Celier <celier@adacore.com> 9314 9315 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj 9316 has Ada sources, not project Project, because if the root project 9317 Project has no sources of its own, all projects will be deemed without 9318 sources. 9319 93202011-08-04 Gary Dismukes <dismukes@adacore.com> 9321 9322 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration 9323 of the No_Param_Proc acc-to-subp type used for initialization of 9324 __gnat_finalize_library_objects so that it's declared at library level 9325 rather than nested inside of the adainit routine. 9326 93272011-08-04 Javier Miranda <miranda@adacore.com> 9328 9329 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY 9330 if the tagged type has a representation clause which specifies its 9331 external tag. 9332 93332011-08-04 Ed Schonberg <schonberg@adacore.com> 9334 9335 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types. 9336 Remove previous procedure with that name. 9337 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor 9338 when appropriate. 9339 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a 9340 subtype mark, the ancestor cannot have unknown discriminants. 9341 (Resolve_Record_Aggregate): if the type has invisible components 9342 because of a private ancestor, the aggregate is illegal. 9343 93442011-08-04 Vincent Celier <celier@adacore.com> 9345 9346 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into 9347 account switches -gnat2005, -gnat12 and -gnat2012. 9348 93492011-08-04 Bob Duff <duff@adacore.com> 9350 9351 * s-tasdeb.ads: Minor comment fix. 9352 93532011-08-04 Arnaud Charlet <charlet@adacore.com> 9354 9355 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in 9356 CodePeer mode. 9357 * switch.ads, switch.adb (Is_Language_Switch): New function. 9358 93592011-08-04 Vincent Celier <celier@adacore.com> 9360 9361 * switch-c.adb: Minor comment addition. 9362 93632011-08-04 Vincent Celier <celier@adacore.com> 9364 9365 * vms_conv.adb (Process_Argument): Fail graciously when qualifier 9366 ending with '=' is followed by a space (missing file name). 9367 93682011-08-04 Pascal Obry <obry@adacore.com> 9369 9370 * g-regist.ads: Fix size of HKEY on x86_64-windows. 9371 93722011-08-04 Ed Schonberg <schonberg@adacore.com> 9373 9374 * sem_ch12.adb (Analyze_Associations): New routine 9375 Check_Overloaded_Formal_Subprogram to reject a formal package when 9376 there is a named association or a box initialisation for an overloaded 9377 formal subprogram of the corresponding generic. 9378 93792011-08-04 Yannick Moy <moy@adacore.com> 9380 9381 * alfa.ads (ALFA_Xref_Record): add component for type of entity 9382 * get_alfa.adb, put_alfa.adb: Read and write new component of 9383 cross-reference. 9384 * lib-xref-alfa.adb (Collect_ALFA): generate new component. 9385 93862011-08-04 Pascal Obry <obry@adacore.com> 9387 9388 * urealp.adb: Minor reformatting. 9389 93902011-08-04 Tristan Gingold <gingold@adacore.com> 9391 9392 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions): 9393 Handle the case when Cleanup_Protected_Object returns Empty. 9394 93952011-08-04 Yannick Moy <moy@adacore.com> 9396 9397 * frontend.adb (Frontend): only qualify names in non-ALFA mode 9398 93992011-08-04 Ed Schonberg <schonberg@adacore.com> 9400 9401 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure 9402 call, ignore functions. 9403 94042011-08-04 Geert Bosch <bosch@adacore.com> 9405 9406 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating 9407 point. 9408 94092011-08-04 Emmanuel Briot <briot@adacore.com> 9410 9411 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name 9412 as an index for Builder'Switches. This conforms to the documentation. 9413 * make.adb (Insert_Project_Sources): avoid duplicate code 9414 94152011-08-04 Emmanuel Briot <briot@adacore.com> 9416 9417 * makeutl.adb (Complete_Mains): if the user has passed a relative file 9418 name on the command line (for instance "../dummy"), never assume it can 9419 be a unit name. 9420 94212011-08-04 Tristan Gingold <gingold@adacore.com> 9422 9423 * bindgen.adb: Remove code the reference or create the 9424 Break_Start/__gnat_break_start procedure. 9425 * s-stalib.adb (Break_Start): Removed. 9426 94272011-08-04 Emmanuel Briot <briot@adacore.com> 9428 9429 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now 9430 shared with gprbuild. 9431 94322011-08-04 Yannick Moy <moy@adacore.com> 9433 9434 * par-ch4.adb (P_Primary): preferentially issue an error message about 9435 a missing parenthesis arount a conditional or case expression in Ada 9436 2012 mode, if we detect that the alignment is not correct for a 9437 statement. 9438 94392011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9440 9441 * exp_ch7.adb (Process_Declarations): Do not consider the result of a 9442 tag-to-class-wide conversion as needing finalization actions. 9443 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of 9444 a tag-to-class-wide conversion as needing finalization actions. 9445 (Is_Finalizable_Transient): The result of a tag-to-class-wide 9446 conversion does not need finalization actions. 9447 (Is_Tag_To_CW_Conversion): New routine. 9448 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines 9449 whether an object is the result of a tag-to-class-wide conversion. 9450 94512011-08-04 Yannick Moy <moy@adacore.com> 9452 9453 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which 9454 the left-hand-side and right-hand-side of a conjunct are inserted when 9455 translating a pre- or postcondition 9456 * sem_ch6.adb: Correct typo in comment 9457 94582011-08-04 Ed Schonberg <schonberg@adacore.com> 9459 9460 * gnat_rm.texi: Ravenscar does not prohibit dependence on 9461 Unchecked_Conversion and Unchecked_Deallocation. 9462 94632011-08-04 Thomas Quinot <quinot@adacore.com> 9464 9465 * make.adb: Minor reformatting. 9466 94672011-08-04 Emmanuel Briot <briot@adacore.com> 9468 9469 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the 9470 sources in the project and its imported projects, but not in the whole 9471 tree. 9472 94732011-08-04 Emmanuel Briot <briot@adacore.com> 9474 9475 * make.adb: Remove debug trace. 9476 94772011-08-04 Vincent Celier <celier@adacore.com> 9478 9479 * makeutl.adb (Do_Complete): Get the absolute path name of a relative 9480 path in canonical form, to be able to compare path names on platforms 9481 such as Windows or Darwin. 9482 94832011-08-04 Thomas Quinot <quinot@adacore.com> 9484 9485 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry): 9486 For a pragma (statement with C1 = 'P'), record the sloc of the pragma. 9487 * scos.ads: Update documentation accordingly. 9488 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled 9489 pragmas. 9490 94912011-08-04 Ed Schonberg <schonberg@adacore.com> 9492 9493 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of 9494 attribute only if prefix type is scalar. 9495 94962011-08-04 Emmanuel Briot <briot@adacore.com> 9497 9498 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support 9499 in gnatmake for specifying mains on the command line that do not belong 9500 to the main project. These mains must currently all belong to the same 9501 project, though. 9502 (Ultimate_Extension_Of): removed, since duplicated 9503 Ultimate_Extending_Project. 9504 95052011-08-04 Arnaud Charlet <charlet@adacore.com> 9506 9507 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode 9508 instead. 9509 (CodePeer_Mode_String): New. 9510 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in 9511 CodePeer mode. 9512 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode. 9513 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer 9514 mode, since no useful elaboration subprogram is needed by CodePeer. 9515 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode). 9516 In this mode, compile binder file with -gnatC and do stop after this 9517 step. 9518 95192011-08-04 Vincent Celier <celier@adacore.com> 9520 9521 * exp_ch7.adb: Minor comment fix. 9522 95232011-08-04 Robert Dewar <dewar@adacore.com> 9524 9525 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb, 9526 exp_ch4.adb, makeutl.adb: Minor reformatting. 9527 95282011-08-04 Emmanuel Briot <briot@adacore.com> 9529 9530 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring. 9531 Create several new subprograms to move code out of Make. This makes the 9532 code more readable, removes code duplication, and is a preparation work 9533 for adding support for aggregate projects. 9534 95352011-08-04 Tristan Gingold <gingold@adacore.com> 9536 9537 * s-po32gl.ads, s-po32gl.adb: New files. 9538 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function. 9539 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function. 9540 (Build_Finalization_Collection): Use it. 9541 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto. 9542 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New 9543 literals. 9544 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS. 9545 * gcc-interface/Make-lang.in: Update dependencies. 9546 95472011-08-04 Emmanuel Briot <briot@adacore.com> 9548 9549 * makeutl.adb (Complete_Mains): add support for specs with no suffix on 9550 the command line. 9551 95522011-08-04 Emmanuel Briot <briot@adacore.com> 9553 9554 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the 9555 command line is not a file name, also check whether it could be a unit 9556 name. 9557 95582011-08-04 Eric Botcazou <ebotcazou@adacore.com> 9559 9560 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate 9561 the header of the finalization routine. 9562 If the unit has no finalizer but is a body whose spec has one, then 9563 generate the decrement of the elaboration entity only. 9564 If the unit has a finalizer and is a spec, then do not generate the 9565 decrement of the elaboration entity. 9566 (Gen_Finalize_Library_C): Likewise. 9567 95682011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9569 9570 * exp_ch7.adb (Alignment_Of): New subsidiary routine. 9571 (Bounds_Size_Expression): Removed. 9572 (Double_Alignment_Of): New subsidiary routine. 9573 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account 9574 for a hole in the dope vector of unconstrained arrays due to different 9575 index and element alignments. 9576 95772011-08-04 Ed Schonberg <schonberg@adacore.com> 9578 9579 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will 9580 raise program_error because body has not been seen yet. 9581 95822011-08-04 Ed Schonberg <schonberg@adacore.com> 9583 9584 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with 9585 an unresolved name. 9586 95872011-08-04 Vincent Celier <celier@adacore.com> 9588 9589 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms 9590 95912011-08-04 Yannick Moy <moy@adacore.com> 9592 9593 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here 9594 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here 9595 95962011-08-04 Thomas Quinot <quinot@adacore.com> 9597 9598 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for 9599 instantiation in RCI. 9600 96012011-08-04 Emmanuel Briot <briot@adacore.com> 9602 9603 * make.adb: Share more code with gprbuild 9604 96052011-08-04 Emmanuel Briot <briot@adacore.com> 9606 9607 * projects.texi: Added documentation for the IDE'Gnat project file 9608 attribute. 9609 96102011-08-04 Nicolas Roche <roche@adacore.com> 9611 9612 * gnat_rm.texi: Minor editing. 9613 96142011-08-04 Javier Miranda <miranda@adacore.com> 9615 9616 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case 9617 and the library case for VM targets. 9618 (Gen_Adainit_Ada): Likewise. 9619 96202011-08-04 Robert Dewar <dewar@adacore.com> 9621 9622 * g-altive.ads: Minor comment updates. 9623 * prj-nmsc.adb: Minor reformatting. 9624 96252011-08-04 Javier Miranda <miranda@adacore.com> 9626 9627 * opt.ads 9628 (Normalize_Scalars_Config): Value of the configuration switch set by 9629 pragma Normalize_Scalars when it appears in the gnat.adc file. 9630 (Normalize_Scalars): New field for record Config_Switches_Type. Used 9631 to save and restore settings of this pragma. 9632 * opt.adb 9633 (Register_Opt_Config_Switches, Save_Opt_Config_Switches, 9634 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars. 9635 96362011-08-04 Vincent Celier <celier@adacore.com> 9637 9638 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile 9639 96402011-08-04 Arnaud Charlet <charlet@adacore.com> 9641 9642 * makeutl.adb: Minor reformatting. 9643 96442011-08-04 Olivier Hainque <hainque@adacore.com> 9645 9646 * g-altive.ads: Update comments to reflect that only the soft 9647 binding is available today. 9648 96492011-08-04 Robert Dewar <dewar@adacore.com> 9650 9651 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb, 9652 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting 9653 * gcc-interface/Make-lang.in: Update dependencies. 9654 96552011-08-04 Arnaud Charlet <charlet@adacore.com> 9656 9657 * prj-env.adb: Remove local debug traces. 9658 96592011-08-04 Yannick Moy <moy@adacore.com> 9660 9661 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK 9662 was used instead of Hi_OK, which could cause a read of an uninitialized 9663 value later on. Detected while working on the new warning. 9664 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment 9665 to local variable. 9666 * sem_ch5.adb (Analyze_Assignment): set the last assignment component 9667 in more cases, in order to detect more unreferenced values. 9668 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing 9669 object for expression, if any. 9670 96712011-08-04 Eric Botcazou <ebotcazou@adacore.com> 9672 9673 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of 9674 the operand types instead of the Esize. 9675 96762011-08-04 Steve Baird <baird@adacore.com> 9677 9678 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to 9679 enable CodePeer_Mode. 9680 * bindusg.adb (Display): Add help message describing -P binder switch. 9681 * gnat_ugn.texi: Document -P binder switch. 9682 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the 9683 user-defined main program directly. 9684 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the 9685 user-defined main program in the context clause of the package body. 9686 96872011-08-04 Yannick Moy <moy@adacore.com> 9688 9689 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial 9690 duplicate of Defining_Entity 9691 (Get_Unique_Entity_For_Decl): rename function into 9692 Unique_Defining_Entity 9693 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags 9694 (Formal_Proof_On): remove synthesized flag 9695 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, 9696 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb, 9697 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA 9698 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma 9699 Annotate (Formal_Proof) 9700 97012011-08-04 Emmanuel Briot <briot@adacore.com> 9702 9703 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit 9704 source files with non-standard naming schemes, in imported projects 9705 97062011-08-04 Emmanuel Briot <briot@adacore.com> 9707 9708 * makeutl.adb (Complete_Mains): when a multi-unit source file is 9709 specified on the gprbuild command line, we need to compile all units 9710 within that file, not just the first one we find 9711 Fix error message for mains that are not found. 9712 97132011-08-04 Thomas Quinot <quinot@adacore.com> 9714 9715 * sem_ch6.adb: Update comment. 9716 * sem_ch12.adb: Minor reformatting. 9717 97182011-08-04 Bob Duff <duff@adacore.com> 9719 9720 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading 9721 Acceptor.Terminate_Alternative without locking Acceptor, which causes a 9722 race condition whose symptom is to fail to lock Parent. That, in turn, 9723 causes Parent.Awake_Count to be accessed without locking Parent, which 9724 causes another race condition whose symptom is that Parent.Awake_Count 9725 can be off by 1 (either too high or too low). The solution is to lock 9726 Parent unconditionally, and then lock Acceptor, before reading 9727 Acceptor.Terminate_Alternative. 9728 97292011-08-04 Arnaud Charlet <charlet@adacore.com> 9730 9731 * debug.adb: Update comment. 9732 97332011-08-04 Robert Dewar <dewar@adacore.com> 9734 9735 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb, 9736 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads, 9737 exp_ch6.adb: Minor reformatting. 9738 97392011-08-04 Gary Dismukes <dismukes@adacore.com> 9740 9741 * gnat_ugn.texi: Add sentence about the case of compile-time-detected 9742 checks for -gnateE. 9743 97442011-08-04 Ed Schonberg <schonberg@adacore.com> 9745 9746 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM. 9747 97482011-08-04 Thomas Quinot <quinot@adacore.com> 9749 9750 * sinfo.ads: Minor reformatting. 9751 97522011-08-04 Emmanuel Briot <briot@adacore.com> 9753 9754 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error 9755 even if there is no location. 9756 97572011-08-04 Ed Schonberg <schonberg@adacore.com> 9758 9759 * sem_res.adb, sem_ch4.adb: move check for restriction 9760 No_Task_Hierarchy to resolve_allocator. 9761 97622011-08-04 Thomas Quinot <quinot@adacore.com> 9763 9764 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled): 9765 This flag of N_Pragma nodes is not used, remove it as well as all of 9766 the associated circuitry. 9767 97682011-08-04 Javier Miranda <miranda@adacore.com> 9769 9770 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the 9771 runtime check on duplicated externa tags 9772 * debug.adb Document switch -gnatdQ. 9773 97742011-08-04 Gary Dismukes <dismukes@adacore.com> 9775 9776 * a-fihema.ads: Minor typo fix. 9777 97782011-08-04 Yannick Moy <moy@adacore.com> 9779 9780 * sem_ch10.adb: Minor comment update. 9781 97822011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9783 9784 * einfo.adb: Update the node field usage to reflect the renaming of 9785 Return_Flag to Return_ Flag_Or_Transient_Decl. 9786 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. 9787 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. 9788 (Write_Field15_Name): Change Return_Flag to 9789 Return_Flag_Or_Transient_Decl. 9790 * einfo.ads: Rename node field Return_Flag to 9791 Return_Flag_Or_Transient_Decl. Update the associated comment and all 9792 occurrences in entities. 9793 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update 9794 associated Inline pragma. 9795 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update 9796 associated Inline pragma. 9797 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New 9798 routine. 9799 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to 9800 Return_Flag and Set_Return_Flag. 9801 * exp_ch7.adb (Process_Declarations): Add code to recognize hook 9802 objects generated for controlled transients declared inside an 9803 Exception_With_Actions. Update the calls to Return_Flag. 9804 (Process_Object_Declaration): Add code to add a null guard for hook 9805 objects generated for controlled transients declared inside an 9806 Exception_With_Actions. Update related comment. 9807 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook 9808 objects generated for controlled transients declared inside an 9809 Exception_With_Actions. Update the calls to Return_Flag. 9810 * expander.adb (Expand): Add new case for N_Expression_With_Actions. 9811 98122011-08-04 Ed Schonberg <schonberg@adacore.com> 9813 9814 * sem_util.adb:(Wrong_Type): Improve error message on a one-element 9815 positional aggregate. 9816 98172011-08-04 Vincent Celier <celier@adacore.com> 9818 9819 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma 9820 SLOC only for pragmas. 9821 98222011-08-04 Emmanuel Briot <briot@adacore.com> 9823 9824 * projects.texi: Minor typo fix. 9825 98262011-08-04 Emmanuel Briot <briot@adacore.com> 9827 9828 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging 9829 on case-sensitive file systems. 9830 98312011-08-04 Thomas Quinot <quinot@adacore.com> 9832 9833 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision 9834 nested in a disabled pragma. 9835 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of 9836 enclosing pragma, if any, for X decisions. 9837 98382011-08-04 Thomas Quinot <quinot@adacore.com> 9839 9840 * sem_prag.adb: Minor reformatting. 9841 98422011-08-04 Vincent Celier <celier@adacore.com> 9843 9844 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not 9845 allowed in no run time mode. 9846 98472011-08-04 Vincent Celier <celier@adacore.com> 9848 9849 * make.adb (Check): When -gnatc is used, check for the source file 9850 inside the ALI file with a canonical case file name. 9851 98522011-08-04 Emmanuel Briot <briot@adacore.com> 9853 9854 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for 9855 overriding the separator. 9856 98572011-08-04 Robert Dewar <dewar@adacore.com> 9858 9859 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb, 9860 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting. 9861 98622011-08-04 Robert Dewar <dewar@adacore.com> 9863 9864 * gnat_rm.texi: Minor documentation fix for pragma Annotate. 9865 98662011-08-04 Yannick Moy <moy@adacore.com> 9867 9868 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that 9869 'Result only appears in postcondition of function. 9870 98712011-08-04 Thomas Quinot <quinot@adacore.com> 9872 9873 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated 9874 external tag, include the value of the external tag in the exception 9875 message. 9876 98772011-08-04 Yannick Moy <moy@adacore.com> 9878 9879 * sem_attr.adb (Result): modify error message for misplaced 'Result 9880 98812011-08-04 Sergey Rybin <rybin@adacore.com> 9882 9883 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it 9884 clear that the second argument must be an identifier. 9885 98862011-08-04 Thomas Quinot <quinot@adacore.com> 9887 9888 * exp_ch9.adb (Build_Barrier_Function): When compiling with 9889 -fpreserve-control-flow, insert an IF statement on the barrier 9890 condition to ensure that a conditional branch instruction is generated. 9891 98922011-08-04 Emmanuel Briot <briot@adacore.com> 9893 9894 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads 9895 (Processing_Flags.Ignore_Missing_With): new flag. 9896 98972011-08-04 Emmanuel Briot <briot@adacore.com> 9898 9899 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of 9900 Source_List_File on case-insensitive systems where the file is actually 9901 on a case-sensitive file system (NFS,...). 9902 99032011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9904 9905 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a 9906 function return contains a controlled [extension] aggregate and the 9907 return statement is not part of a handled sequence of statements, wrap 9908 the return in a block. This ensures that all controlled temporaries 9909 generated during aggregate resolution will be picked up by the 9910 finalization machinery. 9911 99122011-08-04 Ed Schonberg <schonberg@adacore.com> 9913 9914 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized 9915 components, freeze type before resolution, to ensure that default 9916 initializations are present for all components. 9917 * sem_res.adb (Resolve_Actuals): the designated object of an 9918 accces-to-constant type is a legal actual in a call to an 9919 initialization procedure. 9920 99212011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 9922 9923 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and 9924 N_Unchecked_Type_Conversion to the possible containers of a renamed 9925 transient variable. 9926 99272011-08-04 Yannick Moy <moy@adacore.com> 9928 9929 * par-ch13.adb (Aspect_Specifications_Present): recognize 9930 "with Identifier'Class =>" as an aspect, so that a meaningful warning 9931 is issued in Strict mode. 9932 * par.adb: Fix typos in comments. 9933 99342011-08-04 Yannick Moy <moy@adacore.com> 9935 9936 * sem_attr.adb (Result): modify error message to take into account Post 9937 aspect when compiling Ada 2012 (or newer) code. 9938 99392011-08-04 Nicolas Roche <roche@adacore.com> 9940 9941 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to 9942 remove need for GCC exceptions. 9943 99442011-08-04 Vincent Celier <celier@adacore.com> 9945 9946 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the 9947 project, not the source file name. 9948 * prj.adb (Find_Sources.Look_For_Sources): If the source has been 9949 excluded, continue looking. This excluded source will only be returned 9950 if there is no other source with the same base name that is not locally 9951 removed. 9952 99532011-08-04 Ed Schonberg <schonberg@adacore.com> 9954 9955 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is 9956 private and one of the operands is a real literal, use a qualified 9957 expression rather than a conversion which is not meaningful to the 9958 back-end. 9959 99602011-08-04 Yannick Moy <moy@adacore.com> 9961 9962 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise 9963 corresponding aspect X'Class are allowed, proceed with analysis of the 9964 aspect instead of skipping it. 9965 99662011-08-04 Tristan Gingold <gingold@adacore.com> 9967 9968 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads 9969 This will allow to have an Ada implementation for the subprogram. 9970 99712011-08-04 Ed Schonberg <schonberg@adacore.com> 9972 9973 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a 9974 completion and aspects are present, apply them to the entity for the 9975 type which is currently the partial view, but which is the one that 9976 will be frozen. 9977 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate 9978 applies to a partial view, indicate that the full view has predicates 9979 and delayed aspects. 9980 (Replace_Type_Reference): Handle properly predicates that apply to the 9981 full view of a private completion. 9982 99832011-08-04 Eric Botcazou <ebotcazou@adacore.com> 9984 9985 * layout.adb (Layout_Type): For composite types, do not set Esize. 9986 * freeze.adb (Set_Small_Size): Remove test on alignment and do not 9987 set Esize. 9988 (Size_Known): Look at the RM size of components instead of the Esize. 9989 (Freeze_Record_Type): Look at the RM size instead of the Esize to 9990 issue warning and activate Implicit_Packing. 9991 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic 9992 if the Esize is not known. 9993 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize 9994 for elementary types only. 9995 (Analyze_Record_Representation_Clause): Look at the RM size instead 9996 of the Esize to issue errors. 9997 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it 9998 is not known. 9999 <E_Record_Type>: Look at the RM size instead of the Esize. Remove 10000 obsolete block. 10001 Look at the RM size instead of the Esize for types if the latter is 10002 not known. 10003 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize. 10004 100052011-08-04 Ed Schonberg <schonberg@adacore.com> 10006 10007 * sem_type.adb: proper handling of equality not involving anonymous 10008 access types. 10009 100102011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10011 10012 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and 10013 Vis_Decls. When creating a library-level finalizer for a package spec, 10014 both the declaration and body of the finalizer are inserted either in 10015 the visible or private declarations of the package spec. 10016 100172011-08-04 Javier Miranda <miranda@adacore.com> 10018 10019 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the 10020 use of the full-view of a type when invoking Is_Ancestor. 10021 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of 10022 the full-view of private parents is requested, then use also the 10023 full-view of the parent of the first derivation. 10024 100252011-08-04 Tristan Gingold <gingold@adacore.com> 10026 10027 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset 10028 instead of the locally imported procedure. 10029 * s-taprop-mingw.adb (Enter_Task): Ditto. 10030 * s-valrea.adb (Scan_Real): Ditto. 10031 * s-imgrea.adb (Set_Image_Real): Ditto. 10032 * s-flocon.ads: Make the package pure. 10033 100342011-08-04 Thomas Quinot <quinot@adacore.com> 10035 10036 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove. 10037 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly. 10038 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement): 10039 New subprogram, moved here from... 10040 * par.adb, par-ch5.adb (P_Statement_Name): ... here. 10041 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any 10042 rewriting of the last argument into a procedure call statement here... 10043 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there 10044 instead. 10045 100462011-08-04 Thomas Quinot <quinot@adacore.com> 10047 10048 * par_sco.adb: Minor reformatting. 10049 100502011-08-04 Robert Dewar <dewar@adacore.com> 10051 10052 * erroutc.adb: Minor reformatting. 10053 100542011-08-04 Thomas Quinot <quinot@adacore.com> 10055 10056 * par_sco.adb: Comment update. 10057 100582011-08-04 Tristan Gingold <gingold@adacore.com> 10059 10060 * s-flocon.ads: New file. 10061 * g-flocon.ads: Now a renaming of s-flocon. 10062 * Makefile.rtl: Add s-flocon.o 10063 100642011-08-04 Javier Miranda <miranda@adacore.com> 10065 10066 * exp_strm.adb (Build_Array_Input_Function): if the array type is 10067 constrained, do not attempt to build a subtype of it. 10068 100692011-08-04 Yannick Moy <moy@adacore.com> 10070 10071 * errout.ads Change comments: remove 'R'M as an example where quotes 10072 are needed; add ALFA as another case where quotes are not needed 10073 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another 10074 case where quotes are not needed. 10075 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, 10076 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb: 10077 Remove all occurrences of 'A'L'F'A 10078 100792011-08-04 Ed Schonberg <schonberg@adacore.com> 10080 10081 * sem_ch13.adb: check legality of invariant pragma. 10082 100832011-08-04 Eric Botcazou <ebotcazou@adacore.com> 10084 10085 * bindgen.adb: Add comments. 10086 100872011-08-04 Yannick Moy <moy@adacore.com> 10088 10089 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a 10090 synthesized flag. 10091 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate 10092 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram. 10093 100942011-08-04 Robert Dewar <dewar@adacore.com> 10095 10096 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb, 10097 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb, 10098 sem_ch13.adb, s-pooloc.adb: Minor reformatting. 10099 101002011-08-04 Thomas Quinot <quinot@adacore.com> 10101 10102 * s-pooloc.ads, s-pooglo.ads: Minor reformatting 10103 101042011-08-04 Thomas Quinot <quinot@adacore.com> 10105 10106 PR ada/47880 10107 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only 10108 allocated object. 10109 101102011-08-04 Robert Dewar <dewar@adacore.com> 10111 10112 * einfo.ads, exp_ch4.adb: Minor reformatting. 10113 101142011-08-04 Jerome Lambourg <lambourg@adacore.com> 10115 10116 * back_end.ads (Gen_Or_Update_Object_File): Add more comments. 10117 101182011-08-04 Ed Schonberg <schonberg@adacore.com> 10119 10120 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component 10121 type in all cases to compute list of primitive operations, because full 10122 view may be an itype that is not attached to the list of declarations. 10123 101242011-08-04 Eric Botcazou <ebotcazou@adacore.com> 10125 10126 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the 10127 library has already been finalized. 10128 (Gen_Adafinal_C): Likewise. 10129 (Gen_Adainit_Ada): Generate an early return if the library has 10130 already been elaborated. 10131 (Gen_Adainit_C): Likewise. 10132 (Gen_Output_File_Ada): Generate an elaboration flag. 10133 (Gen_Output_File_C): Likewise. 10134 101352011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10136 10137 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of 10138 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not 10139 built in the first place. 10140 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr 10141 for CodePeer because Finalize_Address was not built to begin with. 10142 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto. 10143 101442011-08-04 Pascal Obry <obry@adacore.com> 10145 10146 * adaint.c (__gnat_tmp_name): Use current process id to create temp 10147 filenames, this ensures unicity of filenames across processes. 10148 101492011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10150 10151 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine 10152 Raise_Controlled to Raise_From_Controlled_Operation. Update the 10153 signature of Raise_From_Controlled_Operation by adding flag From_Abort. 10154 Add False as the actual to From_Abort in the generated call to 10155 Raise_From_Controlled_Operation. 10156 101572011-08-04 Jerome Lambourg <lambourg@adacore.com> 10158 10159 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration 10160 so that the ali file name can be retrieved from outside of this package. 10161 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method 10162 doing nothing in the general case, but used to update the object file 10163 timestamp if directly generated by the backend. 10164 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set 10165 to a later time than the ali file one. 10166 101672011-08-04 Yannick Moy <moy@adacore.com> 10168 10169 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram 10170 entities whose body contains an Annotate pragma which forces formal 10171 proof on this body. 10172 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, 10173 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to 10174 Mark_Non_ALFA_Subprogram to pass in a message and node. 10175 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate 10176 (Forma_Proof, On) which sets the flag Formal_Proof_On in the 10177 surrounding subprogram. 10178 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram, 10179 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked 10180 as not in ALFA is annotated with Formal_Proof being On, then an error 10181 is issued based on the additional parameters for message and node. 10182 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation. 10183 * gcc-interface/Make-lang.in: Update dependencies. 10184 101852011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10186 10187 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate 10188 Finalize_Address when CodePeer is enabled. 10189 101902011-08-04 Pascal Obry <obry@adacore.com> 10191 10192 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as 10193 the latter returns a pointer to a static buffer which is deallocated 10194 at the end of the routine. 10195 101962011-08-04 Yannick Moy <moy@adacore.com> 10197 10198 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA 10199 after index creation; mark unconstrained base array type generated as 10200 being in/not in ALFA as well 10201 (Make_Index): mark subtype created as in/not in ALFA 10202 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating 10203 over a loop as in/not in ALFA, depending on its type and form of loop 10204 iteration. 10205 102062011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10207 10208 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort 10209 directly to False on .NET and JVM. 10210 102112011-08-04 Yannick Moy <moy@adacore.com> 10212 10213 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove 10214 constraint that subtype must come from source code to be in ALFA, so 10215 that anonymous subtypes can be in ALFA too. 10216 102172011-08-04 Yannick Moy <moy@adacore.com> 10218 10219 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of 10220 reference for ALFA mode. 10221 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make 10222 procedure public so as to use it from formal verification back-end. 10223 102242011-08-04 Jerome Lambourg <lambourg@adacore.com> 10225 10226 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the 10227 invalid checks of the Parameter, making Remove_Switch not working 10228 correctly. 10229 102302011-08-04 Arnaud Charlet <charlet@adacore.com> 10231 10232 * targparm.ads: Update header: no run-time exception is needed on this 10233 file. 10234 102352011-08-04 Vincent Celier <celier@adacore.com> 10236 10237 * a-fihema.adb: Use System.IO instead of GNAT.IO 10238 102392011-08-04 Thomas Quinot <quinot@adacore.com> 10240 10241 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types 10242 are forbidden in Compiler_Unit mode. 10243 102442011-08-04 Robert Dewar <dewar@adacore.com> 10245 10246 * sem_util.adb: Minor reformatting. 10247 102482011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10249 10250 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for 10251 library-level finalizers. 10252 (Gen_Finalize_Library_C): Update the import string for library-level 10253 finalizers. 10254 (Gen_Finalize_Library_Defs_C): Update the definition name of a 10255 library-level finalizer. 10256 * exp_ch7.adb: Remove with and use clauses for Stringt. 10257 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl, 10258 Spec_Decl. Add local variable Body_Id. The names of library-level 10259 finalizers are now manually fully qualified and are no longer external. 10260 A single name is now capable of servicing .NET, JVM and non-VM targets. 10261 Pragma Export is no longer required to provide visibility for the name. 10262 (Create_Finalizer_String): Removed. 10263 (New_Finalizer_Name): New routine which mimics New_..._Name. 10264 102652011-08-04 Eric Botcazou <ebotcazou@adacore.com> 10266 10267 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the 10268 elaboration counter to Standard_Short_Integer. 10269 * sem_util.adb (Build_Elaboration_Entity): Likewise. 10270 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change. 10271 (Gen_Elab_Externals_C): Likewise. 10272 102732011-08-04 Ed Falis <falis@adacore.com> 10274 10275 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads, 10276 system-vxworks-ppc.ads, system-vxworks-m68k.ads, 10277 system-vxworks-mips.ads, system-vxworks-x86.ads 10278 (Always_Compatible_Rep): set to False for all VxWorks targets. 10279 102802011-08-04 Robert Dewar <dewar@adacore.com> 10281 10282 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads, 10283 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb, 10284 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb, 10285 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb, 10286 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb, 10287 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb, 10288 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb: 10289 Minor reformatting and code reorganization. 10290 102912011-08-04 Emmanuel Briot <briot@adacore.com> 10292 10293 * projects.texi: Added doc for aggregate projects. 10294 102952011-08-04 Emmanuel Briot <briot@adacore.com> 10296 10297 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items): 10298 Add support for overriding the Project_Path in aggregate projects. 10299 103002011-08-04 Robert Dewar <dewar@adacore.com> 10301 10302 * a-cofove.ads: Minor reformatting. 10303 103042011-08-04 Hristian Kirtchev <kirtchev@adacore.com> 10305 10306 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment 10307 on the generated code. 10308 (Build_Finalize_Statements): Update the comment on the generated code. 10309 (Build_Initialize_Statements): Update the comment on the generated code. 10310 (Build_Object_Declarations): Add local variable Result. The object 10311 declarations are now built in sequence. 10312 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and 10313 RE_Unit_Table. 10314 103152011-08-04 Robert Dewar <dewar@adacore.com> 10316 10317 * checks.adb, alfa.adb, alfa.ads: Minor reformatting. 10318 103192011-08-04 Eric Botcazou <ebotcazou@adacore.com> 10320 10321 * einfo.ads (Elaboration_Entity): Document new definition and use. 10322 (Elaboration_Entity_Required): Adjust to above change. 10323 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise. 10324 * exp_ch12.adb: And with and use for Snames. 10325 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute. 10326 * exp_util.adb (Set_Elaboration_Flag): Likewise. 10327 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete. 10328 <Check_Unit_Name>: Deal with N_Expanded_Name. 10329 <Attribute_Elaborated>: Extend to all unit names. 10330 * sem_elab.adb: And with and use for Uintp. 10331 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change. 10332 * sem_util.ads (Build_Elaboration_Entity): Adjust comment. 10333 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer. 10334 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken 10335 from Gen_Adainit_Ada. 10336 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C. 10337 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program 10338 case, do not call System.Standard_Library.Adafinal; instead call 10339 finalize_library if needed. 10340 (Gen_Adafinal_C): Likewise. 10341 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the 10342 non-main program case. 10343 (Gen_Adainit_C): Generate a couple of external declarations here. 10344 In the main program case, set SSL.Finalize_Library_Objects. 10345 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change. 10346 (Gen_Elab_Calls_C): Likewise. 10347 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units. 10348 (Gen_Finalize_Library_C): Likewise. Generate a full function. 10349 (Gen_Main_C): Put back call to Ada_Final and don't finalize library 10350 objects here. 10351 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final 10352 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to 10353 Gen_Adafinal_Ada. 10354 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final 10355 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple 10356 of external declarations. Call Gen_Finalize_Library_C. 10357 103582011-08-04 Emmanuel Briot <briot@adacore.com> 10359 10360 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains, 10361 Compute_Compilation_Phases): new subprogram. 10362 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type 10363 The number of mains as well as the various compilation phases that 10364 need to be run are now project tree specific, since various 10365 aggregated trees might have different requirements. In particular, 10366 they do not all require bind or link phases. 10367 103682011-08-04 Emmanuel Briot <briot@adacore.com> 10369 10370 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb 10371 (Project_Tree_Appdata): New type. 10372 It is now possible to associate application-specific data to a project 10373 tree. In particular, this is used in the gprbuild builder to avoid a 10374 number of global tables and htables, especially now that there can be 10375 several project trees loaded at once because of aggregate projects. 10376 (Debug_Name): new procedure. 10377 * projects.texi: Clarify syntax of "**" for Source_Dirs 10378 103792011-08-03 Emmanuel Briot <briot@adacore.com> 10380 10381 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts 10382 the "roots" for a main. 10383 (Fill_From_Project): add support for aggregate projects. Main units 10384 in aggregated projects are now automatically added in the list of 10385 files to build (although this fails later on in gprbuild, because 10386 these files are not using the root proejct tree, so this needs 10387 further cleanup) 10388 * gcc-interface/Make-lang.in: Update dependencies. 10389 103902011-08-03 Yannick Moy <moy@adacore.com> 10391 10392 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean 10393 conditional expression in ALFA. 10394 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean 10395 expressions as not in ALFA. 10396 103972011-08-03 Robert Dewar <dewar@adacore.com> 10398 10399 * a-cofove.adb: Minor reformatting. 10400 104012011-08-03 Emmanuel Briot <briot@adacore.com> 10402 10403 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads 10404 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the 10405 gprbuild sources. 10406 These packages are more logically placed in the Queue package, since 10407 they manipulate the queue. It is also likely that they can be adapted 10408 for gnatmake, thus sharing more code. 10409 (Finish_Program, Fail_Program): moved from the gprbuild sources, so 10410 that we could move the above. 10411 104122011-08-03 Emmanuel Briot <briot@adacore.com> 10413 10414 * errutil.adb (Finalize): clean up the list of error messages on exit. 10415 Calling this subprogram multiple times will no longer show duplicate 10416 error messages on stderr. 10417 104182011-08-03 Emmanuel Briot <briot@adacore.com> 10419 10420 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter 10421 Getopt_Switches when we have already define a command line 10422 configuration. 10423 104242011-08-03 Yannick Moy <moy@adacore.com> 10425 10426 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not 10427 in ALFA. Instead, they are considered as assertions to prove. 10428 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such 10429 nodes as not in ALFA. Instead, include conditional expressions in ALFA 10430 if they have no ELSE part, or if they occur in pre- and postconditions, 10431 where the Condition cannot have side-effects in ALFA 10432 (Analyze_Membership_Op): do not mark such nodes as not in ALFA 10433 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA. 10434 Instead, include type conversion between scalar types in ALFA. 10435 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA 10436 if-and-only-if its type is in ALFA. 10437 104382011-08-03 Thomas Quinot <quinot@adacore.com> 10439 10440 * scos.adb, get_scos.adb, put_scos.adb 10441 New code letter for decisions: G (entry guard) 10442 * par_sco.adb 10443 (Traverse_Subprogram_Body): Rename to... 10444 (Traverse_Subprogram_Or_Task_Body): New subrpogram. 10445 (Traverse_Protected_Body): New subprogram 10446 (Traverse_Declarations_Or_Statements): Add traversal of task bodies, 10447 protected bodies and entry bodies. 10448 104492011-08-03 Yannick Moy <moy@adacore.com> 10450 10451 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure 10452 entities with get/set subprograms, which is set on procedure entities 10453 generated by the compiler for a postcondition. 10454 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures 10455 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the 10456 entity for a declaration 10457 (Get_Unique_Entity_For_Decl): new function returning an entity which 10458 represents a declaration, so that matching spec and body have the same 10459 entity. 10460 104612011-08-03 Robert Dewar <dewar@adacore.com> 10462 10463 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads, 10464 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting 10465 104662011-08-03 Yannick Moy <moy@adacore.com> 10467 10468 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram 10469 library-level because retriction No_Implicit_Dynamic_Code in the 10470 front-end prevents its definition as a local subprogram 10471 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File, 10472 for reuse in other contexts 10473 (Traverse_Declarations_Or_Statements, 10474 Traverse_Handled_Statement_Sequence, Traverse_Package_Body, 10475 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these 10476 procedures take a callback parameter to be called on all declarations 10477 * lib-xref.ads 10478 (Traverse_All_Compilation_Units): new generic function to traverse a 10479 compilation unit and call a callback parameter on all declarations 10480 104812011-08-03 Javier Miranda <miranda@adacore.com> 10482 10483 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names 10484 in Java since they are always enclosed in a namespace that 10485 differentiates them, and overloaded entities are supported by the VM. 10486 104872011-08-03 Ed Schonberg <schonberg@adacore.com> 10488 10489 * checks.adb (Determine_Range): If a computed bound of an operation is 10490 outside the range of the base type of the expression, and overflow 10491 checks are enabled, the result is unknown and cannot be used for any 10492 subsequent constant folding. 10493 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are 10494 unknown, so is the result of the comparison. 10495 104962011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10497 10498 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal 10499 From_Abort. When finalization was triggered by an abort, propagate 10500 Standard'Abort_Signal rather than Program_Error. 10501 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal 10502 From_Abort. 10503 * a-except.adb (Raise_From_Controlled_Operation): Add new formal 10504 From_Abort. When finalization was triggered by an abort, propagate 10505 Standard'Abort_Signal rather than Program_Error. 10506 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal 10507 From_Abort. 10508 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable 10509 Abort_Id. Update the calls to Build_Object_Declarations and 10510 Build_Raise_Statement to include Abort_Id. 10511 (Build_Adjust_Statements): New local variable Abort_Id. Update the 10512 calls to Build_Object_Declarations and Build_Raise_Statement to include 10513 Abort_Id. 10514 (Build_Finalize_Statements): New local variable Abort_Id. Update the 10515 calls to Build_Object_Declarations and Build_Raise_Statement to include 10516 Abort_Id. 10517 (Build_Components): Create an entity for Abort_Id when exceptions are 10518 allowed on the target. 10519 (Build_Finalizer): New local variable Abort_Id. 10520 (Build_Initialize_Statements): New local variable Abort_Id. Update the 10521 calls to Build_Object_Declarations and Build_Raise_Statement to include 10522 Abort_Id. 10523 (Build_Object_Declarations): Add new formal Abort_Id. Create the 10524 declaration of flag Abort_Id to preserve the original abort status 10525 before finalization code is executed. 10526 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to 10527 runtime routine Raise_From_Controlled_Operation. 10528 (Create_Finalizer): Update the call to Build_Raise_Statement to include 10529 Abort_Id. Update the call to Build_Object_Declarations to include 10530 Abort_Id. Update the layout of the finalizer body. 10531 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort. 10532 (Process_Transient_Objects): New local variable Abort_Id. Remove the 10533 clunky code to create all flags and objects related to 10534 exception propagation and replace it with a call to 10535 Build_Object_Declarations. Update the call to Build_Raise_Statement to 10536 include Abort_Id. 10537 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec. 10538 Add new formal Abort_Id and associated comment on its use. 10539 (Build_Raise_Statement): Add new formal Abort_Id and associated comment 10540 on its use. 10541 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id. 10542 Remove the clunky code to create all flags and objects related to 10543 exception propagation and replace it with a call to 10544 Build_Object_Declarations. Update the call to Build_Raise_Statement. 10545 105462011-08-03 Eric Botcazou <ebotcazou@adacore.com> 10547 10548 * s-tassta.adb: Fix minor typos. 10549 105502011-08-03 Robert Dewar <dewar@adacore.com> 10551 10552 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb, 10553 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting. 10554 105552011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10556 10557 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion 10558 to packages. This ensures that the finalizer body will not end up 10559 inside the freeze node. 10560 (Process_Declarations): Add code to detect whether a freeze node has a 10561 nested finalization collection. 10562 105632011-08-03 Pascal Obry <obry@adacore.com> 10564 10565 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005. 10566 (Current_Session): Return a not null access to Session_Type. 10567 (Default_Session): Likewise. 10568 105692011-08-03 Robert Dewar <dewar@adacore.com> 10570 10571 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb, 10572 exp_ch3.adb, exp_ch3.ads: Minor reformatting. 10573 105742011-08-03 Pascal Obry <obry@adacore.com> 10575 10576 * g-awk.ads: Minor comment fix. 10577 105782011-08-03 Sergey Rybin <rybin@adacore.com> 10579 10580 * tree_io.ads (ASIS_Version_Number): Update because of the changes in 10581 the tree structure related to discriminant constraints. 10582 Original_Discriminant cannot be used any more for computing the 10583 defining name for the reference to a discriminant. 10584 105852011-08-03 Ed Schonberg <schonberg@adacore.com> 10586 10587 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the 10588 function is not visibly tagged, this is not a dispatching call and 10589 therfore is not Tag_Indeterminate, even if the function is marked as 10590 dispatching on result. 10591 105922011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10593 10594 * exp_ch13.adb: Add with and use clauses for Restrict and Rident. 10595 (Expand_N_Free_Statement): Add a guard to protect against run-times 10596 which do not support controlled types. 10597 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect 10598 against run-times which do not support controlled types. 10599 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect 10600 against run-times which do not support controlled types. 10601 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect 10602 against run-times which do not support controlled types. 10603 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to 10604 protect against run-times which do not support controlled types. 10605 106062011-08-03 Eric Botcazou <ebotcazou@adacore.com> 10607 10608 * exp_intr.adb: Put back with and use clauses for Exp_Ch11. 10609 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end. 10610 106112011-08-03 Ed Schonberg <schonberg@adacore.com> 10612 10613 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is 10614 modified in the source, to prevent spurious warnings when compiling 10615 with -gnatg. 10616 106172011-08-03 Thomas Quinot <quinot@adacore.com> 10618 10619 * a-except-2005.adb: Minor reformatting. 10620 106212011-08-03 Ed Schonberg <schonberg@adacore.com> 10622 10623 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit 10624 is a renaming declaration in the private part of a package, do not emit 10625 a warning that the with_clause could be moved because the renaming may 10626 be used in the body or in a child unit. 10627 106282011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10629 10630 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): 10631 Propagate the Comes_From_Source attribute from the original return 10632 object to the renaming. 10633 106342011-08-03 Jose Ruiz <ruiz@adacore.com> 10635 10636 * exp_ch7.adb (Build_Raise_Statement): Do not call 10637 Raise_From_Controlled_Operation when this routine is not present in 10638 the run-time library. 10639 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time 10640 libraries (Ravenscar), tasks are non-terminating, and protected objects 10641 and tasks can only appear at library level, so we do not want 10642 finalization of protected objects nor tasks. 10643 * exp_intr.adb: Minor clarification in comment. 10644 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada, 10645 Gen_Output_File_C): Remove references to finalization of library-level 10646 objects when using restricted run-time libraries. 10647 106482011-08-03 Ed Schonberg <schonberg@adacore.com> 10649 10650 * sem_ch3.adb (Build_Discriminant_Constraints): Set 10651 Original_Discriminant only if the parent type is a generic formal. 10652 106532011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10654 10655 * exp_ch13.adb: Add with and use clause for Targparm; 10656 (Expand_N_Free_Statement): Prevent the generation of a custom 10657 Deallocate on .NET/JVM targets since this requires pools and address 10658 arithmetic. 10659 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for 10660 .NET/JVM targets, attach the newly allocated object to the access 10661 type's finalization collection. Do not generate a call to 10662 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not 10663 exist in the runtime. 10664 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not 10665 create a custom Allocate for object that do not require initialization. 10666 Attach a newly allocated object to the access type's finalization 10667 collection on .NET/JVM. 10668 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for 10669 assignment of controlled types on .NET/JVM. The two hidden pointers 10670 Prev and Next and stored and later restored after the assignment takes 10671 place. 10672 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized 10673 kludge for .NET/JVM to recognize a particular piece of code coming from 10674 Heap_Management and change the call to Finalize into Deep_Finalize. 10675 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of 10676 finalization collections on .NET/JVM only for types derived from 10677 Controlled. Separate the association of storage pools with a collection 10678 and only allow it on non-.NET/JVM targets. 10679 (Make_Attach_Call): New routine. 10680 (Make_Detach_Call): New routine. 10681 (Process_Object_Declarations): Suppress the generation of 10682 build-in-place return object clean up code on .NET/JVM since it uses 10683 pools. 10684 * exp_ch7.ads (Make_Attach_Call): New routine. 10685 (Make_Detach_Call): New routine. 10686 * exp_intr.adb Add with and use clause for Targparm. 10687 (Expand_Unc_Deallocation): Detach a controlled object from a collection 10688 on .NET/JVM targets. 10689 * rtsfind.ads: Add entries RE_Attach, RE_Detach and 10690 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table. 10691 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special 10692 names used in finalization. 10693 106942011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10695 10696 * a-fihema.adb: Add with and use clauses for System.Soft_Links. 10697 (Attach, Detach): Lock the current task when chaining an object onto a 10698 collection. 10699 107002011-08-03 Hristian Kirtchev <kirtchev@adacore.com> 10701 10702 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation): 10703 Rewritten to create the message strings when the exception is not 10704 raised by an abort during finalization. 10705 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure 10706 Raise_From_Controlled_Operation and update its associated comment. 10707 * a-fihema.ads, a-fihema.adb: New GNAT unit. 10708 Ada.Finalization.Heap_Management provides key functionality 10709 associated with controlled objects on the heap, their creation, 10710 finalization and reclamation. Type Finalization_Collection is 10711 effectively a wrapper which sits ontop of a storage pool and performs 10712 all necessary bookkeeping for all the objects it contains. Each 10713 access-to-controlled or access-to-class-wide type receives a collection 10714 as part of its expansion. The compiler generates buffer code and 10715 invokes Allocate / Deallocate to create and destroy allocated 10716 controlled objects. 10717 * a-finali.adb ("="): Removed. 10718 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden 10719 fields Prev and Next. 10720 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer. 10721 A library unit with at least one controlled object on the library level 10722 has a special finalizer which is invoked by the binder. To signal this, 10723 ali files carry field PF. 10724 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add 10725 associated comment on field usage. 10726 * a-tags.adb (Get_RC_Offset): Removed. 10727 (Needs_Finalization): New routine. 10728 * a-tags.ads: Update the structure of the GNAT dispatch tables. 10729 Dispatch tables now carry field Needs_Finalization which provides 10730 runtime indication whether a type is controlled or has controlled 10731 components or both. Remove field RC_Offset. 10732 (Get_RC_Offset): Removed along with its associated pragma Export. 10733 Since tagged types with controlled components no longer carry hidden 10734 field _controller, the special mechanism to retrieve its location is no 10735 longer needed. 10736 (Needs_Finalization): New routine. 10737 * atree.ads, atree.adb (Elist24): New routine. 10738 (Set_Elist24): New routine. 10739 * atree.h: Add a define clause for Elist24. 10740 * bindgen.adb New library-level variable Lib_Final_Built. 10741 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the 10742 presence of a VM target, the routine generates calls to the proper 10743 library finalization routine. 10744 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM 10745 targets. Set the correct library finalization routine depending on 10746 whether the library has controlled objects or this is a VM compilation. 10747 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls 10748 to library-level finalizers of compiled units in reverse order of 10749 elaboration. It also produces exception management code and reraises a 10750 potential exception after all units have been finalized. 10751 (Gen_Finalize_Library_C): New routine. This procedure generates calls to 10752 library-level finalizers of compiled units in reverse order of 10753 elaboration. 10754 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the 10755 definitions of all library-level finalizers available to the compilation 10756 (Gen_Main_Ada): Directly call Adafinal which now contails all target 10757 dependent code. 10758 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call 10759 System.Standard_Library.Adafinal directly. If the library needs 10760 finalization actions, create the sequence of finalization calls. 10761 (Gen_Output_File_Ada): Alphabetize local variables and constants. 10762 Generate a with clause for System.Soft_Links when compiling for a VM. 10763 Remove the code which imports System.Standard_Library.Adafinal as 10764 Do_Finalize. Generate the library finalization routine. 10765 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization. 10766 If the library needs finalization actions, create all the definitions 10767 of library- level finalizers. 10768 (Has_Finalizer): New routine. Determines whether at least one compiled 10769 unit has a library-level finalizer. 10770 Add type Qualification_Mode. 10771 (Set_Unit_Name): Add a formal which controls the replacement of a dot. 10772 * einfo.adb: New usage of field 15 as Return_Flag. 10773 Remove Finalization_Chain_Entity from the usages of field 19. 10774 Remove Associated_Final_Chain from the usages of field 23. 10775 New usage of field 23 as Associated_Collection. 10776 New usage of field 24 as Finalizer. 10777 New usage of flag 252 as Is_Processed_Transient. 10778 (Associated_Final_Chain): Removed. 10779 (Associated_Collection): New routine. 10780 (Finalization_Chain_Entity): Removed. 10781 (Finalizer): New routine. 10782 (Is_Finalizer): New routine. 10783 (Is_Processed_Transient): New routine. 10784 (Return_Flag): New routine. 10785 (Set_Associated_Final_Chain): Removed. 10786 (Set_Associated_Collection): New routine. 10787 (Set_Finalization_Chain_Entity): Removed. 10788 (Set_Finalizer): New routine. 10789 (Set_Is_Processed_Transient): New routine. 10790 (Set_Return_Flag): New routine. 10791 (Write_Entity_Flags): Include Is_Processed_Transient to the list of 10792 displayed flags. 10793 (Write_Field8_Name): Alphabetize the output. 10794 (Write_Field11_Name): Alphabetize the output. 10795 (Write_Field12_Name): Alphabetize the output. 10796 (Write_Field13_Name): Alphabetize the output. 10797 (Write_Field14_Name): Alphabetize the output. 10798 (Write_Field15_Name): Alphabetize the output. 10799 (Write_Field16_Name): Alphabetize the output. 10800 (Write_Field17_Name): Alphabetize the output. 10801 (Write_Field18_Name): Alphabetize the output. 10802 (Write_Field19_Name): Alphabetize the output. Remove the output of 10803 Finalization_Chain_Entity. 10804 (Write_Field20_Name): Alphabetize the output. 10805 (Write_Field21_Name): Alphabetize the output. 10806 (Write_Field22_Name): Alphabetize the output. 10807 (Write_Field23_Name): Alphabetize the output. Remove the output of 10808 Associated_Final_Chain. Add output for Associated_Collection. 10809 (Write_Field24_Name): Alphabetize the output. 10810 (Write_Field25_Name): Add output for Finalizer. 10811 (Write_Field26_Name): Alphabetize the output. 10812 (Write_Field27_Name): Alphabetize the output. 10813 (Write_Field28_Name): Alphabetize the output. 10814 * einfo.ads: Add new field description for Associated_Collection and 10815 its uses in nodes. 10816 Remove Associated_Final_Chain and its uses in nodes. 10817 Remove Finalization_Chain_Entity and its uses in nodes. 10818 Add new field description for Finalizer and its uses in nodes. 10819 Add new synthesized attribute Is_Finalizer. 10820 Add new flag description for Is_Processed_Transient and its uses in 10821 nodes. 10822 Add new field description for Return_Flag and its uses in nodes. 10823 (Associated_Final_Chain): Removed along with its pragma Inline. 10824 (Associated_Collection): New routine and pragma Inline. 10825 (Finalization_Chain_Entity): Removed along with its pragma Inline. 10826 (Finalizer): New routine and pragma Inline. 10827 (Is_Finalizer): New routine and pragma Inline. 10828 (Is_Processed_Transient): New routine and pragma Inline. 10829 (Return_Flag): New routine and pragma Inline. 10830 (Set_Associated_Final_Chain): Removed along with its pragma Inline. 10831 (Set_Associated_Collection): New routine and pragma Inline. 10832 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline. 10833 (Set_Finalizer): New routine and pragma Inline. 10834 (Set_Is_Processed_Transient): New routine and pragma Inline. 10835 (Set_Return_Flag): New routine and pragma Inline. 10836 * exp_aggr.adb: Alphabetize subprograms. 10837 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment. 10838 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their 10839 associated comments. Remove local variables External_Final_List and 10840 Attach. 10841 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to 10842 Ancestor. Remove the retrieval of finalization lists. Update the call to 10843 Make_Adjust_Call. 10844 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization 10845 lists. Update the call to Late_Expansion. 10846 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion. 10847 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion. 10848 (Gen_Assign): Remove the retrieval of the finalization list used to 10849 build the assignment. Update the calls to Make_Init_Call and 10850 Make_Adjust_Call. 10851 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions. 10852 Remove the mechanism to determine attachment levels and finalization 10853 list retrieval. Remove the processing for coextensions. 10854 (Init_Controller): Removed. Controllers no longer exist. 10855 (Late_Expansion): Remove formals Flist and Obj along with their 10856 associated comments. Update the calls to Build_Record_Aggr_Code and 10857 Build_Array_Aggr_Code. 10858 * exp_ch13.adb (Expand_N_Free_Statement): New routine. 10859 (Expand_N_Freeze_Entity): Add special processing for finalizers which 10860 appear in entry bodies, protected subprograms and task bodies. 10861 * exp_ch13.ads (Expand_N_Free_Statement): New routine. 10862 * exp_ch3.adb (Add_Final_Chain): Removed. 10863 (Build_Array_Init_Proc): Alphabetize local variables. 10864 (Build_Assignment): Alphabetize local variables. Update the call to 10865 Maked_Adjust_Call. 10866 (Build_Class_Wide_Master): Rename local variables to better reflect 10867 their role. 10868 (Build_Discriminant_Assignments): Code reformatting. 10869 (Build_Init_Call_Thru): Code reformatting. 10870 (Build_Init_Procedure): Code reformatting. Generate a special version 10871 of Deep_Finalize which is capable of finalizing all initialized 10872 components and ignore the rest. 10873 (Build_Init_Statements): Rename local variables to better reflect their 10874 role. 10875 Reimplement the mechanism to include the creation and update of an index 10876 variable called a "counter". It is used as a bookmark for tracing 10877 initialized and non-initialized components. 10878 (Build_Initialization_Call): Remove local variable Controller_Typ. 10879 Alphabetize all local variables. Remove the initialization of the 10880 record controller and update the call to Make_Init_Call. 10881 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent. 10882 New local variable Counter. 10883 (Constrain_Array): Alphabetize. 10884 (Expand_Freeze_Array_Type): Create a collection instead of a 10885 finalization list. 10886 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive 10887 Finalize_Address which is used in conjunction with allocated controlled 10888 objects. 10889 (Expand_N_Object_Declaration): Remove the creation of a finalization 10890 list for anonymous access types. Update the calls to Make_Init_Call and 10891 Make_Adjust_Call. 10892 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the 10893 retrieval of finalization lists. Remove the expansion of the record 10894 controller. Create TSS primitive Finalize_Address used in conjunction 10895 with controlled objects on the heap. Create finalization collections 10896 for access-to-controlled record components. 10897 (Expand_Record_Controller): Removed. 10898 (Freeze_Type): Remove the freezing of record controllers. Freezing of 10899 class-wide types now requires additional processing. Create 10900 finalization collections for access-to-controlled types. 10901 (Increment_Counter): New routine. 10902 (Make_Counter): New routine. 10903 (Make_Eq_If): Remove the mention of Name_uController. 10904 (Make_Predefined_Primitive_Specs): There is no longer need to skip 10905 types coming from System.Finalization_Root. 10906 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles. 10907 (Predefined_Primitive_Bodies): There is no longer need to skip types 10908 coming from System.Finalization_Root. 10909 (Stream_Operation_OK): Do not generate stream routines for 10910 type Ada.Finalization.Heap_Management.Finalization_Collection. 10911 * exp_ch3.ads: Alphabetize subprograms. 10912 * exp_ch4.adb: Remove with and use clause for Sem_Ch8. 10913 Add with and use clause for Lib. 10914 (Complete_Coextension_Finalization): Removed. 10915 (Complete_Controlled_Allocation): New routine. Create a finalization 10916 collection for anonymous access-to-controlled types. Create a custom 10917 Allocate which interfaces with the back end and the machinery in 10918 Heap_Management. 10919 (Expand_Allocator_Expression): Add necessary calls to 10920 Complete_Controlled_Allocation. Remove the retrieval of finalization 10921 lists. Update the calls to Make_Adjust_Call. Generate a call to 10922 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate 10923 the associated collection. 10924 (Expand_N_Allocator): Remove the processing for dynamic coextensions. 10925 Code clean up. Remove the retrieval of finalization lists and 10926 attachment levels. 10927 Update the call to Make_Init_Call. Generate a call to 10928 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate 10929 the associated collection. 10930 (Get_Allocator_Final_List): Removed. Finalization lists are not 10931 available. 10932 (Suitable_Element): Remove the mention of Name_uController. 10933 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp. 10934 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of 10935 the left hand side, carry out the assignment and adjust the left hand 10936 side. 10937 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed. 10938 (Add_Collection_Actual_To_Build_In_Place_Call): New routine. 10939 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to 10940 BIP_Collection and BIPcollection. 10941 (Build_Heap_Allocator): New routine used to allocate the return object 10942 of a build-in-place function onto a collection. 10943 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7. 10944 (Expand_Call): Do not replace direct calls to Deep routines with their 10945 aliases. 10946 (Expand_N_Extended_Return_Statement): Give all variables shorter names 10947 and update their occurrences. Add a special return flag to monitor the 10948 [ab]normal execution of the function. The flag is set right before the 10949 return statement. 10950 Rewrite the mechanism used to allocate a build-in-place return object 10951 on the heap or on a storage pool. 10952 (Is_Direct_Deep_Call): New routine. 10953 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a 10954 build-in-place function call instead of a final list. Build a call to 10955 Set_Finalize_Address_Ptr to decorate the associated collection. 10956 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in 10957 order to name the build-in-place function call's result for later 10958 finalization. Add a collection to a build-in-place function call 10959 instead of a final list. 10960 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a 10961 build-in-place function call instead of a final list. Remove the code 10962 which moves one final list and transforms it into the actual in a 10963 nested build-in-place call. 10964 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a 10965 build-in-place function call instead of a final list. 10966 (Move_Final_List): Removed. 10967 (Needs_BIP_Collection): New routine. 10968 (Needs_BIP_Final_List): Removed. 10969 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in 10970 enumeration type BIP_Formal_Kind. 10971 Update the related comment. 10972 (Needs_BIP_Collection): New routine. 10973 (Needs_BIP_Final_List): Removed. 10974 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt 10975 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the 10976 majority of subprograms in this unit. Add Name_Finalize_Address to 10977 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of. 10978 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization 10979 statements for an array type. 10980 (Build_Adjust_Statements): Create the adjust statements for a record 10981 type. 10982 (Build_Cleanup_Statements): New routine. A procedure which given any 10983 construct containing asynchronous calls, references to _master, or is a 10984 task body, a task allocation or a protected body produces the necessary 10985 runtime calls to clean up these constructs. 10986 (Build_Exception_Handler): New routine. 10987 (Build_Final_List): Removed. 10988 (Build_Finalization_Collection): New routine. A core procedure which 10989 creates a collection to service heap allocated controlled objects 10990 associated with an access-to-controlled type. 10991 (Build_Finalize_Statements): Create the finalization statements for a 10992 record types. 10993 (Build_Finalizer): New routine. A core procedure which given any 10994 construct with declarations and/or statements detects all objects which 10995 need any type of clean up (controlled objects, protected objects) and 10996 generates all necessary code to clean up the said objects in the proper 10997 order. 10998 (Build_Finalizer_Call): New routine. 10999 (Build_Initialize_Statements): Create the initialization statements for 11000 an array type. The generated routine contains code to finalize partially 11001 initialized arrays. 11002 (Build_Object_Declarations): New routine. 11003 (Build_Raise_Statement): New routine. 11004 (Clean_Simple_Protected_Objects): Removed. 11005 (Controller_Component): Removed. 11006 (Enclosing_Function): New routine. 11007 (Expand_Cleanup_Actions): Create a finalizer for a construct which has 11008 either declarations or statements or both. 11009 (Expand_N_Package_Body): Create a finalizer for a non-generic package. 11010 (Expand_N_Package_Declaration): Create a finalizer for a non-generic 11011 package. 11012 (Find_Final_List): Removed. 11013 (Global_Flist_Ref): Removed. 11014 (In_Finalization_Root): Removed. 11015 (Insert_Actions_In_Scope_Around): Determine the range of the transient 11016 scope in terms of tree nodes. Process all transient variables within 11017 that range. 11018 (Make_Adjust_Call): Rewritten. There is no longer an attach call 11019 generated after the adjust. 11020 (Make_Attach_Call): Removed. 11021 (Make_Call): New routine. 11022 (Make_Clean): Removed. 11023 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate 11024 build routines. 11025 (Make_Deep_Proc): Rewritten to generate the new profile signature used 11026 in Deep routines. 11027 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate 11028 build routines. 11029 (Make_Final_Call): Modified to simply create a call to either 11030 Deep_Finalize or Finalize. 11031 (Make_Finalize_Address_Body): New routine. 11032 (Make_Finalize_Address_Stmts): New routine. A function which produces 11033 TSS primitive Finalize_Address used in conjunction with heap allocated 11034 controlled objects. 11035 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM. 11036 (Make_Init_Call): Rewritten. There is no longer an attach call 11037 generated after initialization. 11038 (Make_Local_Deep_Finalize): New routine. 11039 (Make_Set_Finalize_Address_Ptr_Call): New routine. 11040 (Make_Transient_Block): Remove the finalization list retrieval and 11041 manipulation. 11042 (Needs_Finalization): Moved to Exp_Util. 11043 (Parent_Field_Type): New routine. 11044 (Preprocess_Components): New routine. 11045 (Process_Transient_Objects): New routine. 11046 (Wrap_HSS_In_Block): New routine. 11047 (Wrap_Transient_Declaration): Remove finalization list management and 11048 controller insertion. 11049 (Wrap_Transient_Expression): Code reformatting. 11050 (Wrap_Transient_Statement): Code reformatting. 11051 * exp_ch7.ads (Build_Final_List): Removed. 11052 (Build_Finalization_Collection): New routine. 11053 (Build_Raise_Statement): New routine. 11054 (Controller_Component): Removed. 11055 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6. 11056 (Find_Final_List): Removed. 11057 (In_Finalization_Root): Removed. 11058 (Is_Simple_Protected_Type): Update related comment. 11059 (Make_Adjust_Call): New parameter profile and associated comments. 11060 (Make_Attach_Call): Removed. 11061 (Make_Final_Call): New parameter profile and associated comments. 11062 (Make_Finalize_Address_Body): New routine. 11063 (Make_Init_Call): New parameter profile and associated comments. 11064 (Make_Local_Deep_Finalize): New routine. 11065 (Make_Set_Finalize_Address_Ptr_Call): New routine. 11066 (Needs_Finalization): Moved to Exp_Util. 11067 * exp_ch9.adb (Add_Object_Pointer): Code reformatting. 11068 (Expand_N_Protected_Body): Remove the handling of finalization lists. 11069 (Find_Protection_Type): Moved to Exp_Util. 11070 * exp_disp.adb: Remove with and use clauses for Exp_Ch7. 11071 (Make_DT): Update sequence of dispatch table initialization. Remove the 11072 initialization of field RC_Offset. Add initialization of field Needs_ 11073 Finalization. 11074 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting. 11075 Reimplement how an object is first finalized, then deallocated. 11076 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): 11077 Code reformatting. 11078 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address. 11079 Register TSS_Finalize_Address with type TSS_Names. 11080 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core 11081 procedure provides the interface between an allocation / deallocation 11082 and the support machinery in Ada.Finalization.Heap_Management. 11083 (Find_Init_Call): Code reformatting. 11084 (Find_Init_Call_In_List): Code reformatting. 11085 (Find_Protection_Type): Moved from Exp_Ch9. 11086 (Find_Prim_Op): Reimplement to add preference of recovered primitive. 11087 (Has_Controlled_Coextensions): Removed. 11088 (Has_Controlled_Objects): New routine. 11089 (In_Library_Level_Package_Body): New routine. 11090 (Insert_Action_After): New routine. 11091 (Is_Finalizable_Transient): New routine. This predicate determines 11092 whether an object declaration is one of the many variants of controlled 11093 transients. 11094 (Is_Null_Access_BIP_Func_Call): New routine. 11095 (Is_Non_BIP_Func_Call): New routine. 11096 (Is_Related_To_Func_Return): New routine. 11097 (Needs_Finalization): Moved from Exp_Ch7. 11098 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine. 11099 (Find_Protection_Type): Moved from Exp_Ch9. 11100 (Has_Controlled_Coextensions): Removed. 11101 (Has_Controlled_Objects): New routine. 11102 (In_Library_Level_Package_Body): New routine. 11103 (Insert_Action_After): New routine. 11104 (Is_Finalizable_Transient): New routine. 11105 (Is_Null_Access_BIP_Func_Call): New routine. 11106 (Is_Non_BIP_Func_Call): New routine. 11107 (Is_Related_To_Func_Return): New routine. 11108 (Needs_Finalization): Moved from Exp_ch7. 11109 * expander.adb (Expand): Add a case for N_Free_Statement. 11110 * freeze.adb (Freeze_All): Replace the generation of a finalization 11111 list with a collection for access-to-controlled types. 11112 (Freeze_Entity): Code reformatting. 11113 (Freeze_Record_Type): Remove the freezing of a record controller 11114 component. 11115 (Freeze_Subprogram): Code reformatting. 11116 * inline.adb (Cleanup_Scopes): Remove the reset of the scope 11117 finalization list. 11118 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package 11119 has a library-level finalizer. 11120 * lib-writ.ads: Add "PF" to the sequence of unit attributes. 11121 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed. 11122 * Makefile.rtl: Remove a-filico and s-finimp from the list of object 11123 files. Add a-fihema to the list of object files. 11124 * par-ch4.adb: 11125 Alphabetize the associations in type Is_Parameterless_Attribute. 11126 * rtsfind.ads: Ada.Finalization_List.Controller and 11127 System.Finalization_Implementation are no longer a GNAT unit. 11128 Update the range of type Ada_Finalization_Child. Remove the following 11129 recoverable entities: 11130 11131 RE_Attach_To_Final_List 11132 RE_Deep_Tag_Attach 11133 RE_Finalize_List 11134 RE_Finalize_One 11135 RE_Finalizable_Ptr_Ptr 11136 RE_Global_Final_List 11137 RE_Limited_Record_Controller 11138 RE_List_Controller 11139 RE_Move_Final_List 11140 RE_Record_Controller 11141 RE_Simple_List_Controller 11142 11143 Add the following recoverable entities: 11144 11145 RE_Add_Offset_To_Address 11146 RE_Allocate 11147 RE_Base_Pool 11148 RE_Deallocate 11149 RE_Exception_Identity 11150 RE_Finalization_Collection 11151 RE_Finalization_Collection_Ptr 11152 RE_Needs_Finalization 11153 RE_Save_Library_Occurrence 11154 RE_Set_Finalize_Address_Ptr 11155 RE_Set_Storage_Pool_Ptr 11156 RE_Storage_Count 11157 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of 11158 Name_uController. 11159 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController. 11160 (First_Stored_Discriminant): Remove the mention of Name_uController. 11161 * sem_aux.ads: Comment reformatting. 11162 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery 11163 to redecorate an already existing class-wide type. 11164 (Decorate_Tagged_Type): New parameter profile and associated comment. 11165 Create a "shadow class-wide type" for a shadow entity. 11166 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting 11167 of the final chain along with the associated comment. 11168 * sem_ch3.adb (Access_Type_Declaration): Add new local variable 11169 Full_Desig and set it to the full view of the designated type. 11170 Initialize the finalization collection to empty. 11171 (Build_Derived_Record_Type): Alphabetize local variables. Code 11172 reformatting. 11173 (Collect_Fixed_Components): Remove the mention of Name_uController. 11174 (Create_Constrained_Components): Remove the mention of Name_uController. 11175 (Make_Class_Wide_Type): Add specialized code to redecorate an existing 11176 class-wide type of a shadow entity. 11177 (Process_Full_View): Update the machinery which marks type 11178 Limited_Controlled's entity as limited. 11179 * sem_ch4.adb (Analyze_One_Call): Code reformatting. 11180 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization 11181 list, instead make a collection build-in-place formal. 11182 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of 11183 a designated type in order to establish a match between the renaming 11184 and the renamed entity. 11185 (Find_Selected_Component): Add guard to prevent spurious exceptions 11186 from being raised on .NET/JVM. 11187 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address 11188 to the list of primitive that need special processing. Update arrays 11189 C_Names and D_Names. 11190 (Replace_Types): Handle class-wide types. 11191 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a 11192 different parameter profile, look at the first formal. 11193 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and 11194 use clauses for Exp_Util. 11195 * sem_res.adb: Remove with and use clauses for Elists. 11196 (Propagate_Coextensions): Removed. 11197 (Resolve_Allocator): Do not propagate the list of coextensions from one 11198 allocator to another. 11199 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable 11200 Deaccessed_T to Desig_Typ. 11201 (Enter_Name): Remove the mention of Name_uController. 11202 (Gather_Components): Remove the mention of Name_uController. 11203 (Incomplete_Or_Private_View): New routine. 11204 (Is_Coextension_Root): Removed. 11205 (Is_Fully_Initialized_Type): Remove the mention of Name_uController. 11206 * sem_util.ads (Incomplete_Or_Private_View): New routine. 11207 (Is_Coextension_Root): Removed. 11208 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion. 11209 Controlled types are now derived from a null tagged record. Remove 11210 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled. 11211 * sinfo.adb (Coextensions): Removed. 11212 (Set_Coextensions): Removed. 11213 * sinfo.ads: Remove Coextensions from the explanation of node fields 11214 and its uses in nodes. 11215 Update the field usage of N_Allocator. 11216 (Coextensions): Removed along with its pragma Inline. 11217 (Set_Coextensions): Removed along with its pragma Inline. 11218 * snames.ads-tmpl: Remove names 11219 11220 Name_uClean 11221 Name_uController 11222 Name_uFinal_List 11223 Name_uLocal_Final_List 11224 Name_Finalization_Root 11225 Name_Next 11226 Name_Prev 11227 11228 Add names 11229 11230 Name_uFinalizer 11231 Name_Finalize_Address 11232 * s-pooglo.adb (Allocate): Add overriding indicator. 11233 (Deallocate): Add overriding indicator. 11234 (Storage_Size): Add overriding indicator. 11235 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather 11236 than Finalize_Global_List. 11237 (Null_Finalize_Global_List): Removed. 11238 (Save_Library_Occurrence): New routine. 11239 * s-soflin.ads: Remove variable Finalize_Global_List along with its 11240 initialization. Add variable Finalize_Library_Objects along with its 11241 pragma Export. Add variables Library_Exception and 11242 Library_Exception_Set along with their pragma Export. 11243 (Null_Finalize_Global_List): Removed. 11244 (Save_Library_Occurrence): New routine. 11245 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects 11246 rather than Finalize_Global_List. 11247 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field 11248 of the constructed node. 11249 112502011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 11251 11252 * link.c: Include "auto-host.h" before system headers. 11253 112542011-08-03 Vincent Celier <celier@adacore.com> 11255 11256 * make.adb (Gnatmake): Add to table Library_Projs only library projects 11257 that are not extended. Do not check if a library project that is 11258 extended should be regenerated. Do not add to table Library_Paths the 11259 libraries that are in extended projects. Link only with libraries that 11260 are in libray projects that are not extended. 11261 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library 11262 for a library project that is extended. 11263 112642011-08-03 Gary Dismukes <dismukes@adacore.com> 11265 11266 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip 11267 conforming subprogram renamings that appear to be completions if they 11268 are not fully conformant. 11269 Such renamings are homographs but not completions. 11270 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded 11271 names in a subprogram renaming that appears in an instance. 11272 112732011-08-03 Ed Schonberg <schonberg@adacore.com> 11274 11275 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but 11276 not immutably limited, build actual subtype from expression to provide 11277 proper bounds to caller. 11278 112792011-08-03 Gary Dismukes <dismukes@adacore.com> 11280 11281 * sem_ch8.adb: Minor comment correction. 11282 112832011-08-03 Thomas Quinot <quinot@adacore.com> 11284 11285 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when 11286 returning a limited array, use an extended return statement. 11287 112882011-08-03 Vincent Celier <celier@adacore.com> 11289 11290 * make.adb (Initialize): If --subdirs= is used, but no project file is 11291 specified, attempt to create the specify subdir if it does not already 11292 exist and use it as the object directory as if -D had been specified. 11293 112942011-08-03 Arnaud Charlet <charlet@adacore.com> 11295 11296 * s-tpopsp-vms.adb: New file. 11297 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS. 11298 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS. 11299 113002011-08-03 Emmanuel Briot <briot@adacore.com> 11301 11302 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new 11303 package. 11304 113052011-08-03 Yannick Moy <moy@adacore.com> 11306 11307 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type 11308 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA 11309 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to 11310 detect that an array has static bounds. 11311 113122011-08-03 Thomas Quinot <quinot@adacore.com> 11313 11314 * exp_dist.adb: Minor reformatting. 11315 113162011-08-03 Arnaud Charlet <charlet@adacore.com> 11317 11318 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb 11319 (ATCB_Key): Removed, not always used. 11320 113212011-08-03 Emmanuel Briot <briot@adacore.com> 11322 11323 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads, 11324 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove 11325 most remaining global variables. 11326 113272011-08-03 Robert Dewar <dewar@adacore.com> 11328 11329 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads, 11330 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor 11331 reformatting. 11332 113332011-08-03 Javier Miranda <miranda@adacore.com> 11334 11335 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals 11336 that must be passed by copy in VM targets. 11337 113382011-08-03 Emmanuel Briot <briot@adacore.com> 11339 11340 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which 11341 duplicates a similar htable now in the project tree. 11342 113432011-08-03 Claire Dross <dross@adacore.com> 11344 11345 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb, 11346 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element, 11347 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend, 11348 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap, 11349 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find, 11350 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity, 11351 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure 11352 update. 11353 113542011-08-03 Arnaud Charlet <charlet@adacore.com> 11355 11356 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb 11357 (ATCB_Key): Removed, not always used. 11358 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from 11359 s-taprop-posix.adb. 11360 * s-tpopsp-tls.adb: New file. 11361 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on 11362 x86/x64/ia64/powerpc/sparc Linux. 11363 113642011-08-03 Arnaud Charlet <charlet@adacore.com> 11365 11366 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True. 11367 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports. 11368 113692011-08-03 Thomas Quinot <quinot@adacore.com> 11370 11371 * rtsfind.ads, exp_dist.adb, exp_dist.ads 11372 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call): 11373 Fix type selection for mapping integer types to PolyORB types. 11374 113752011-08-03 Bob Duff <duff@adacore.com> 11376 11377 * sem_ch7.adb: Minor comment clarification. 11378 113792011-08-03 Bob Duff <duff@adacore.com> 11380 11381 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get 11382 an error analyzing a choice, skip further processing. Further 11383 processing could cause a crash or cascade errors. 11384 113852011-08-03 Emmanuel Briot <briot@adacore.com> 11386 11387 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb, 11388 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb, 11389 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb, 11390 prj-env.ads (Shared_Project_Tree_Data): new type 11391 An aggregate project and its aggregated trees need to share the common 11392 data structures used for lists of strings, packages,... This makes the 11393 code simpler since otherwise we have to pass the root tree (also used 11394 for the configuration file data) in addition to the current project 11395 tree. This also avoids ambiguities as to which tree should be used. 11396 And finally this saves a bit of memory. 11397 (For_Every_Project_Imported): new parameter Tree. 11398 Since aggregated projects are using a different tree, we need to let 11399 the caller know which tree to use to manipulate the returned project. 11400 114012011-08-03 Robert Dewar <dewar@adacore.com> 11402 11403 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb, 11404 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads, 11405 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb, 11406 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting. 11407 114082011-08-03 Javier Miranda <miranda@adacore.com> 11409 11410 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads: 11411 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util. 11412 114132011-08-03 Bob Duff <duff@adacore.com> 11414 11415 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on 11416 the Base_Type. 11417 114182011-08-03 Joel Brobecker <brobecker@adacore.com brobecker> 11419 11420 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads, 11421 g-sehash.ads: Fix typo. Update header. 11422 114232011-08-03 Thomas Quinot <quinot@adacore.com> 11424 11425 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place 11426 expansion. 11427 114282011-08-03 Gary Dismukes <dismukes@adacore.com> 11429 11430 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider 11431 prefixes of private types along with records, since the selector may be 11432 a discriminant. 11433 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of 11434 private types along with records, since the selector may be a 11435 discriminant. 11436 114372011-08-03 Emmanuel Briot <briot@adacore.com> 11438 11439 * prj-pp.adb (Pretty_Print): Remove trailing blank line. 11440 114412011-08-03 Javier Miranda <miranda@adacore.com> 11442 11443 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of 11444 Tagged_Type_Expansion. 11445 114462011-08-03 Yannick Moy <moy@adacore.com> 11447 11448 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK 11449 violation when the argument of concatenation is the name of a 11450 constant. 11451 114522011-08-03 Emmanuel Briot <briot@adacore.com> 11453 11454 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads, 11455 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms 11456 (Process_Declarative_Items): new parameter Child_Env. 11457 114582011-08-03 Yannick Moy <moy@adacore.com> 11459 11460 * alfa.ads: Update format of ALFA section in ALI file in order to 11461 add a mapping from bodies to specs when both are present. 11462 (ALFA_Scope_Record): Add components for spec file/scope. 11463 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when 11464 present. 11465 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been 11466 collected, fill in the spec information when relevant. 11467 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when 11468 present. 11469 114702011-08-03 Eric Botcazou <ebotcazou@adacore.com> 11471 11472 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing 11473 code unit to decide whether to add internally generated subprograms. 11474 114752011-08-03 Javier Miranda <miranda@adacore.com> 11476 11477 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram. 11478 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must 11479 be handled by copy in VM targets. 11480 114812011-08-03 Emmanuel Briot <briot@adacore.com> 11482 11483 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share 11484 code with Makeutl.Get_Switches. 11485 * prj-tree.adb: Update comment. 11486 114872011-08-03 Thomas Quinot <quinot@adacore.com> 11488 11489 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote 11490 subprogram with a limited formal that does not support external 11491 streaming. 11492 114932011-08-03 Yannick Moy <moy@adacore.com> 11494 11495 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of 11496 continuation line 11497 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are 11498 not from current unit in two phases, because it is not possible to 11499 change the table while iterating over its content. 11500 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity 11501 115022011-08-03 Sergey Rybin <rybin@adacore.com> 11503 11504 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option 11505 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric) 11506 115072011-08-03 Ed Schonberg <schonberg@adacore.com> 11508 11509 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate 11510 and the component type is composite, this is ambiguous for predefined 11511 concatenation, but if the node is not overloaded and the entity is a use 11512 -defined function its profile can be used to resolve that aggregate. 11513 115142011-08-03 Robert Dewar <dewar@adacore.com> 11515 11516 * exp_ch4.adb: Minor code cleanup. 11517 115182011-08-03 Thomas Quinot <quinot@adacore.com> 11519 11520 * exp_dist.adb: Do not generate distribution stubs if serious errors 11521 have been diagnosed. 11522 115232011-08-03 Ed Schonberg <schonberg@adacore.com> 11524 11525 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of 11526 the first formal of a primitive operation, go to the base type to 11527 handle properly an access to a derived type with constrained 11528 discriminants. 11529 * sem_type.adb (Disambiguate): an immediately visible operator hides a 11530 user-defined function that is only use-visible. 11531 115322011-08-03 Robert Dewar <dewar@adacore.com> 11533 11534 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb, 11535 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb, 11536 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb, 11537 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads, 11538 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb, 11539 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb, 11540 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads, 11541 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting 11542 115432011-08-03 Robert Dewar <dewar@adacore.com> 11544 11545 * repinfo.adb (List_Mechanism): Add handling of 11546 Convention_Ada_Pass_By_XXX. 11547 * sem_mech.adb (Set_Mechanism): Ditto. 11548 * sem_prag.adb (Process_Convention): Add entries for 11549 Convention_Ada_Pass_By_XXX. 11550 * snames.adb-tmpl, snames.ads-tmpl: Ditto. 11551 115522011-08-03 Pascal Obry <obry@adacore.com> 11553 11554 * makeutl.adb: Minor reformatting. 11555 115562011-08-03 Vincent Celier <celier@adacore.com> 11557 11558 * fname-uf.adb 11559 (Get_File_Name) If the file cannot be found when there are no config 11560 pragmas file and May_Fail is True, return No_File instead of the file 11561 name, to be consistent. 11562 115632011-08-03 Pascal Obry <obry@adacore.com> 11564 11565 * adaint.c (__gnat_is_executable_file_attr): Avoid access 11566 to null pointer. 11567 115682011-08-03 Javier Miranda <miranda@adacore.com> 11569 11570 * sem_ch13.adb 11571 (Same_Representation): In VM targets the representation of arrays with 11572 aliased components differs from arrays with non-aliased components. 11573 115742011-08-03 Emmanuel Briot <briot@adacore.com> 11575 11576 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do 11577 not systematically lower case attribute indexes that contain no "." 11578 Fix definition of several Naming attributes, which take 11579 a unit name as index and therefore should be case insensitive. 11580 Minor refactoring (reduce length of variable names). 11581 115822011-08-03 Emmanuel Briot <briot@adacore.com> 11583 11584 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram. 11585 115862011-08-03 Emmanuel Briot <briot@adacore.com> 11587 11588 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb, 11589 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb, 11590 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb, 11591 prj-tree.ads (Prj.Tree.Environment): new type. 11592 115932011-08-03 Emmanuel Briot <briot@adacore.com> 11594 11595 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb, 11596 prj-tree.adb, prj-tree.ads (Environment): new type. 11597 115982011-08-03 Emmanuel Briot <briot@adacore.com> 11599 11600 * prj-tree.ads: Remove unused variable. 11601 116022011-08-03 Yannick Moy <moy@adacore.com> 11603 11604 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for 11605 issuing messages related to SPARK restriction violation. 11606 116072011-08-03 Ed Schonberg <schonberg@adacore.com> 11608 11609 * sem_ch6.adb: guard against error nodes in return statements. 11610 116112011-08-03 Arnaud Charlet <charlet@adacore.com> 11612 11613 * errout.adb (Error_Msg_Internal): the main unit has not been read yet, 11614 a warning can only appear on a configuration file, so emit warning 11615 without further checks. 11616 116172011-08-03 Arnaud Charlet <charlet@adacore.com> 11618 11619 * s-interr.ads: add overriding keyword. 11620 116212011-08-03 Geert Bosch <bosch@adacore.com> 11622 11623 * exp_attr.adb: Fix minor typo. 11624 116252011-08-03 Ed Schonberg <schonberg@adacore.com> 11626 11627 * par-ch4.adb: improve error recovery. 11628 116292011-08-03 Emmanuel Briot <briot@adacore.com> 11630 11631 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb, 11632 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize 11633 to Errout_Handling. 11634 116352011-08-03 Emmanuel Briot <briot@adacore.com> 11636 11637 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use 11638 "external" as an attribute name in aggregate projects. 11639 116402011-08-03 Jose Ruiz <ruiz@adacore.com> 11641 11642 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU 11643 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting 11644 from 0, so we need to adjust. 11645 116462011-08-03 Emmanuel Briot <briot@adacore.com> 11647 11648 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb, 11649 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type. 11650 116512011-08-03 Yannick Moy <moy@adacore.com> 11652 11653 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK 11654 restriction on overloaded entity if the entity is not an operator. 11655 116562011-08-03 Yannick Moy <moy@adacore.com> 11657 11658 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb, 11659 restrict.ads: Rename remaining Check_Formal_Restriction* into 11660 Check_SPARK_Restriction*. 11661 116622011-08-03 Emmanuel Briot <briot@adacore.com> 11663 11664 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, 11665 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its 11666 qualifier. 11667 (Project_Empty): removed 11668 (Empty_Project): new parameter Qualifier 11669 This is used to have fields specific to aggregate projects, cleaner 11670 New field to store the list of aggregated projects. 11671 (Check_Aggregate_Project): removed 11672 (Process_Aggregated_Projects, Free): new subprograms. 11673 116742011-08-03 Olivier Hainque <hainque@adacore.com> 11675 11676 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well. 11677 116782011-08-03 Ed Schonberg <schonberg@adacore.com> 11679 11680 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an 11681 explicit dereference of an unconstrained type, create a constrained 11682 subtype for it, as is done for function calls that return an 11683 unconstrained type. 11684 116852011-08-03 Thomas Quinot <quinot@adacore.com> 11686 11687 * g-pehage.adb (Finalize): Avoid possible double-free. 11688 116892011-08-03 Steve Baird <baird@adacore.com> 11690 11691 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand 11692 Elab_Spec/Body attrs in CodePeer_Mode. 11693 116942011-08-03 Javier Miranda <miranda@adacore.com> 11695 11696 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose 11697 low bound is not known at compile time but they have no others choice. 11698 Done because in this case the bounds can be obtained directly from the 11699 aggregate. 11700 117012011-08-03 Ed Falis <falis@adacore.com> 11702 11703 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs 11704 on VxWorks SMP. Remove unusable constant ANY_CPU. 11705 117062011-08-03 Emmanuel Briot <briot@adacore.com> 11707 11708 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb, 11709 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb, 11710 prj-env.ads (Prj.Env.Initialize_Default_Project_Path, 11711 Prj.Env.Initialize_Empty): new subprograms 11712 (Get_Env, Find_Project): remove parameter Target_Name. 11713 117142011-08-03 Gary Dismukes <dismukes@adacore.com> 11715 11716 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal 11717 as a condition for the delayed call to Derived_Subprograms done for the 11718 case of the rewriting of a derived type that constrains the 11719 discriminants of its parent type. 11720 Avoids redundant subprogram derivations for private subtype derivations. 11721 117222011-08-03 Javier Miranda <miranda@adacore.com> 11723 11724 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of 11725 Build_Record_Aggr_Code. 11726 (Build_Record_Aggr_Code): Add missing support to initialize hidden 11727 discriminants in extension aggregates. 11728 117292011-08-03 Emmanuel Briot <briot@adacore.com> 11730 11731 * prj-pp.adb (Print): also output project qualifiers, since in 11732 particular "aggregate" is mandatory in an aggregate project. 11733 117342011-08-03 Emmanuel Briot <briot@adacore.com> 11735 11736 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb: 11737 (Debug_Output): new function. 11738 117392011-08-03 Eric Botcazou <ebotcazou@adacore.com> 11740 11741 * gnat_ugn.texi: Document -Wstack-usage. 11742 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes. 11743 117442011-08-03 Thomas Quinot <quinot@adacore.com> 11745 11746 * sem_prag.adb Issue an error (not a warning) when a C++ type does not 11747 have keyword LIMITED. 11748 117492011-08-03 Yannick Moy <moy@adacore.com> 11750 11751 * alfa.adb, alfa.ads, alfa_test.adb: New files. 11752 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA) 11753 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref 11754 section (does not happen in compiler, only if code directly calls 11755 Scan_ALI). 11756 * get_alfa.adb, get_alfa.ads: New files. 11757 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if 11758 needed. 11759 * lib-xref-alfa.adb: New file. 11760 * lib-xref.adb, lib-xref.ads 11761 (Xref_Entry): redefine information needed in cross-references for ALFA. 11762 Push ALFA treatments in separated local package. 11763 (Enclosing_Subpragram_Or_Package): treat specially subprogram 11764 identifiers. Return entity of package body instead of spec. Return 11765 Empty for a scope with no location. 11766 (Generate_Reference): adapt to new components for ALFA information. 11767 Remove the need for D references on definitions. 11768 (Is_Local_Reference): moved to ALFA local package 11769 (Output_References): extract subfunction as Extract_Source_Name 11770 (Output_Local_References): remove procedure, replaced by filtering of 11771 cross-references in package ALFA and printing in Put_ALFA. 11772 (Write_Entity_Name): remove procedure 11773 * lib.adb, lib.ads (Extract_Source_Name): extract here function to 11774 print exact name of entity as it appears in source file 11775 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA 11776 * put_alfa.adb, put_alfa.ads: New files. 11777 * xref_lib.adb (Search_Xref): protect read of cross-references against 11778 reading other sections of the ALI file, in gnatxref 11779 (Search): protect read of cross-references against reading other 11780 sections of the ALI file, in gnatfind. 11781 * gcc-interface/Make-lang.in: Update dependencies. 11782 117832011-08-03 Thomas Quinot <quinot@adacore.com> 11784 11785 * sem_ch3.adb: Minor reformatting. 11786 117872011-08-03 Jose Ruiz <ruiz@adacore.com> 11788 11789 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of 11790 raising an exception. 11791 117922011-08-03 Ed Schonberg <schonberg@adacore.com> 11793 11794 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer 11795 type, always use 1 as the lower bound or string, even if lower bound of 11796 context is not static, to handle properly null strings in a non-static 11797 context. 11798 117992011-08-03 Bob Duff <duff@adacore.com> 11800 11801 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is 11802 always legal on the right-hand side of an assignment statement; there 11803 is always an applicable index constraint in this case. Therefore, the 11804 check for Pkind = N_Assignment_Statement is now unconditional -- it 11805 doesn't depend on whether Is_Constrained (Typ). 11806 118072011-08-03 Robert Dewar <dewar@adacore.com> 11808 11809 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting. 11810 118112011-08-03 Ed Schonberg <schonberg@adacore.com> 11812 11813 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference 11814 for an itype created within a generic unit. 11815 118162011-08-03 Eric Botcazou <ebotcazou@adacore.com> 11817 11818 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline 11819 suppresses all inlining. 11820 118212011-08-03 Robert Dewar <dewar@adacore.com> 11822 11823 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb, 11824 exp_aggr.adb: Minor reformatting. 11825 118262011-08-03 Thomas Quinot <quinot@adacore.com> 11827 11828 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of 11829 tagged assignment when discriminant checks are suppressed. This is 11830 useless and extremely costly in terms of static stack usage. 11831 118322011-08-03 Bob Duff <duff@adacore.com> 11833 11834 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances 11835 of generics, because this leads to the wrong entity in the wrong scope, 11836 causing (e.g.) pragma Export_Procedure to get an error if the entity is 11837 an instance. 11838 (Process_Interface_Name): Follow Alias for instances of generics, to 11839 correct for the above change. 11840 118412011-08-03 Ed Schonberg <schonberg@adacore.com> 11842 11843 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value 11844 is an integer literal it is always safe to replace the reference. In 11845 addition, if the reference appears in the generated code for an object 11846 declaration it is necessary to copy because otherwise the reference 11847 might be to the uninitilized value of the discriminant of the object 11848 itself. 11849 118502011-08-03 Pascal Obry <obry@adacore.com> 11851 11852 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no 11853 ACL used, in this case we want to check for ending .exe, not .exe 11854 anywhere in the path. 11855 118562011-08-03 Sergey Rybin <rybin@adacore.com> 11857 11858 * tree_io.ads (ASIS_Version_Number): Update because of the changes in 11859 the tree structure (semantic decoration of references to record 11860 discriminants). 11861 118622011-08-03 Gary Dismukes <dismukes@adacore.com> 11863 11864 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete 11865 choices of a named array aggregate, bail out when any choices are 11866 marked as Errors_Posted. 11867 118682011-08-03 Ed Schonberg <schonberg@adacore.com> 11869 11870 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope 11871 in which entity is frozen, to handle properly loop variables in 11872 iterators. 11873 118742011-08-03 Ed Schonberg <schonberg@adacore.com> 11875 11876 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the 11877 subtype is not static, compute the upper bound using attributes, to 11878 handle properly index types that are not integer types. 11879 118802011-08-03 Bob Duff <duff@adacore.com> 11881 11882 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs. 11883 Update copyright notice. 11884 118852011-08-03 Ed Schonberg <schonberg@adacore.com> 11886 11887 * sem_ch3.adb (Build_Discriminant_Constraints): Only use 11888 Original_Discriminant if within an instance. 11889 * sem_ch4.adb (Analyze_Selected_Component): Ditto. 11890 118912011-08-03 Thomas Quinot <quinot@adacore.com> 11892 11893 * einfo.ads: Minor reformatting. 11894 118952011-08-03 Ed Schonberg <schonberg@adacore.com> 11896 11897 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a 11898 composite type with an unfrozen subcomponent, in the profile of a 11899 primitive operation. 11900 119012011-08-03 Robert Dewar <dewar@adacore.com> 11902 11903 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting. 11904 119052011-08-03 Ed Schonberg <schonberg@adacore.com> 11906 11907 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an 11908 unconstrained type with discriminants is initialized with an aggregate, 11909 use the constrained subtype of the aggregate as the type of the object, 11910 because it is immutable, and this allows the back-end to generate no 11911 code for the object declaration. 11912 119132011-08-03 Robert Dewar <dewar@adacore.com> 11914 11915 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where 11916 comparison operand is variable, and turns out to be zero or negative. 11917 119182011-08-03 Javier Miranda <miranda@adacore.com> 11919 11920 * exp_intr.adb 11921 (Expand_Dispatching_Constructor_Call): Disable expansion of 11922 code required for native targets. Done to avoid generating 11923 references to unavailable runtime entities in VM targets. 11924 * exp_ch3.adb 11925 (Expand_N_Object_Declaration): Add missing support to handle 11926 the explicit initialization of class-wide interface objects. 11927 Fix documentation. 11928 119292011-08-03 Matthew Heaney <heaney@adacore.com> 11930 11931 * a-cobove.adb (Merge): Move source onto target, instead of using 11932 Assign. 11933 119342011-08-03 Matthew Heaney <heaney@adacore.com> 11935 11936 * a-cbdlli.adb (Splice): Move source items from first to last. 11937 119382011-08-03 Yannick Moy <moy@adacore.com> 11939 11940 * sem_util.ads: Add comment. 11941 119422011-08-03 Javier Miranda <miranda@adacore.com> 11943 11944 * exp_aggr.adb 11945 (Expand_Record_Aggregate): In VM targets disable the expansion into 11946 assignments of aggregates whose type is not known at compile time. 11947 119482011-08-03 Ed Schonberg <schonberg@adacore.com> 11949 11950 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for 11951 protected entries and task entries, to build the proper renaming 11952 declaration for entry formals, used in debugging. 11953 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry 11954 parameters in the same way. 11955 119562011-08-02 Robert Dewar <dewar@adacore.com> 11957 11958 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb, 11959 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or 11960 code reorganization. 11961 119622011-08-02 Robert Dewar <dewar@adacore.com> 11963 11964 * debug.adb: Debug flag d.P to suppress length comparison optimization 11965 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize 11966 comparison of Length by comparing First/Last instead. 11967 119682011-08-02 Matthew Heaney <heaney@adacore.com> 11969 11970 * a-cobove.ads: Code clean up. 11971 119722011-08-02 Vincent Celier <celier@adacore.com> 11973 11974 * adaint.c (file_names_case_sensitive_cache): New static int. 11975 (__gnat_get_file_names_case_sensitive): Cache the return value in 11976 file_names_case_sensitive_cache at the first invocation, to avoid 11977 multiple calls to getenv. 11978 119792011-08-02 Bob Duff <duff@adacore.com> 11980 11981 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1. 11982 119832011-08-02 Yannick Moy <moy@adacore.com> 11984 11985 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads, 11986 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb, 11987 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to 11988 indicate that we are in a precondition or postcondition. This is used in 11989 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to 11990 decide whether to flag the spec or body of the current subprogram as 11991 not in ALFA. 11992 119932011-08-02 Fabien Chouteau <chouteau@adacore.com> 11994 11995 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package 11996 list. 11997 * a-extiin.ads: New file. 11998 119992011-08-02 Bob Duff <duff@adacore.com> 12000 12001 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename 12002 now raises Name_Error instead of Use_Error in certain cases. The other 12003 parts of this AI were already implemented properly. 12004 120052011-08-02 Vincent Celier <celier@adacore.com> 12006 12007 * link.c: Only import "auto-host.h" when building the gnattools. 12008 120092011-08-02 Yannick Moy <moy@adacore.com> 12010 12011 * sem_util.adb: Inter-unit inlining does not work for a subprogram 12012 which calls a local subprogram, so extract subprogram 12013 from Mark_Non_ALFA_Subprogram_Body. 12014 120152011-08-02 Javier Miranda <miranda@adacore.com> 12016 12017 * exp_ch9.adb 12018 (Extract_Dispatching_Call): If the type of the dispatching object is an 12019 access type then return an explicit dereference in the Object out-mode 12020 parameter. 12021 120222011-08-02 Gary Dismukes <dismukes@adacore.com> 12023 12024 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range 12025 compatibility checks for all indexes of an array subtype, not just the 12026 first. Reset Has_Dynamic_Range_Check on the subtype before each 12027 potential check to ensure that Insert_Range_Checks will not elide any 12028 of the dynamic checks. 12029 120302011-08-02 Yannick Moy <moy@adacore.com> 12031 12032 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize 12033 SPARK restriction at parsing time. 12034 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE 12035 directive only if the SPARK restriction is set for this unit. 12036 120372011-08-02 Yannick Moy <moy@adacore.com> 12038 12039 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads, 12040 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb, 12041 sem_ch11.adb: Protect call to Current_Subprogram which might be costly 12042 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into 12043 Mark_Non_ALFA_Subprogram_Body. 12044 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and 12045 inlined. 12046 120472011-08-02 Yannick Moy <moy@adacore.com> 12048 12049 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which 12050 might be costly. 12051 120522011-08-02 Robert Dewar <dewar@adacore.com> 12053 12054 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads, 12055 exp_ch3.adb: Minor reformatting. 12056 120572011-08-02 Emmanuel Briot <briot@adacore.com> 12058 12059 * adaint.c (__gnat_locate_exec_on_path): only returns executable 12060 files, not any regular file. 12061 (__gnat_locate_file_with_predicate): new subprogram. 12062 120632011-08-02 Yannick Moy <moy@adacore.com> 12064 12065 * sinfo.adb, sinfo.ads: Restrict the use of flags 12066 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression 12067 nodes, plus N_Subtype_Declaration for the 2nd one. 12068 120692011-08-02 Sergey Rybin <rybin@adacore.com> 12070 12071 * gnat_rm.texi: Ramification of pragma Eliminate documentation 12072 - fix bugs in the description of Source_Trace; 12073 - get rid of UNIT_NAME; 12074 120752011-08-02 Javier Miranda <miranda@adacore.com> 12076 12077 * exp_ch9.adb 12078 (Build_Dispatching_Requeue): Adding support for VM targets 12079 since we cannot directly reference the Tag entity. 12080 * exp_sel.adb (Build_K): Adding support for VM targets. 12081 (Build_S_Assignment): Adding support for VM targets. 12082 * exp_disp.adb 12083 (Default_Prim_Op_Position): In VM targets do not restrict availability 12084 of predefined interface primitives to compiling in Ada 2005 mode. 12085 (Is_Predefined_Interface_Primitive): In VM targets this service is not 12086 restricted to compiling in Ada 2005 mode. 12087 (Make_VM_TSD): Generate code that declares and initializes the OSD 12088 record. Needed to support dispatching calls through synchronized 12089 interfaces. 12090 * exp_ch3.adb 12091 (Make_Predefined_Primitive_Specs): Enable generation of predefined 12092 primitives associated with synchronized interfaces. 12093 (Make_Predefined_Primitive_Bodies): Enable generation of predefined 12094 primitives associated with synchronized interfaces. 12095 120962011-08-02 Yannick Moy <moy@adacore.com> 12097 12098 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of 12099 statements hidden in SPARK if preceded by the HIDE directive 12100 (Parse_Exception_Handlers): mark each exception handler in a sequence of 12101 exception handlers as hidden in SPARK if preceded by the HIDE directive 12102 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK 12103 if starting with the HIDE directive 12104 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if 12105 starting with the HIDE directive; mark the declarations in a private 12106 part as hidden in SPARK if the private part starts with the HIDE 12107 directive 12108 * restrict.adb, restrict.ads 12109 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK 12110 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its 12111 argument node belongs to a part which is hidden in SPARK 12112 (Check_SPARK_Restriction): do not issue violations on nodes in hidden 12113 parts in SPARK; protect the possibly costly call to 12114 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on 12115 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration 12116 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3, 12117 Accumulate_Token_Checksum_GNAT_5_03): add case for new token 12118 Tok_SPARK_Hide. 12119 (Scan): recognize special comment starting with '#' and followed by 12120 SPARK keyword "hide" as a HIDE directive. 12121 121222011-08-02 Yannick Moy <moy@adacore.com> 12123 12124 * types.ads, erroutc.ads: Minor reformatting. 12125 121262011-08-02 Vincent Celier <celier@adacore.com> 12127 12128 * link.c: Add response file support for cross platforms. 12129 121302011-08-02 Ed Schonberg <schonberg@adacore.com> 12131 12132 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression 12133 in an association, set parent field of copy before partial analysis. 12134 * sem_res.adb (Resolve_Slice): create reference to itype only when 12135 expansion is enabled. 12136 121372011-08-02 Yannick Moy <moy@adacore.com> 12138 12139 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set 12140 for new flag denoting which subprogram bodies are in ALFA 12141 * restrict.adb, sem_ch7.adb: Update comment 12142 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, 12143 sem_ch9.adb, sem_res.adb: Add calls to 12144 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs. 12145 * sem_ch6.adb (Analyze_Function_Return): add calls to 12146 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the 12147 middle of the body, and extended return. 12148 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument 12149 False when missing return. 12150 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA 12151 to True for subprograms whose spec is in ALFA. Remove later on the flag 12152 on the entity used for a subprogram body when there exists a separate 12153 declaration. 12154 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA): 12155 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to 12156 False, otherwise do nothing. 12157 121582011-08-02 Robert Dewar <dewar@adacore.com> 12159 12160 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting. 12161 121622011-08-02 Yannick Moy <moy@adacore.com> 12163 12164 * sem_ch4.ads: minor formatting. 12165 121662011-08-02 Yannick Moy <moy@adacore.com> 12167 12168 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, 12169 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb, 12170 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb, 12171 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, 12172 opt.ads: cleanup of SPARK mode 12173 121742011-08-02 Yannick Moy <moy@adacore.com> 12175 12176 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard 12177 types. 12178 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities 12179 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA 12180 * sem_ch3.adb 12181 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects 12182 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes 12183 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes 12184 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration 12185 types. 12186 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with 12187 non-static range. 12188 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for 12189 functions whose return type is not in ALFA. 12190 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram 12191 specifications. 12192 (Process_Formals): unset Is_In_ALFA flag for subprograms if a 12193 parameter's type is not in ALFA. 12194 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard 12195 types are in ALFA. 12196 121972011-08-02 Ed Schonberg <schonberg@adacore.com> 12198 12199 * sem_ch6 (Analyze_Expression_Function): treat the function as 12200 Inline_Always, and introduce a subprogram declaration for it when it is 12201 not a completion. 12202 * inline.adb (Add_Inlined_Body): recognize bodies that come from 12203 expression functions, so that the back-end can determine whether they 12204 can in fact be inlined. 12205 * sem_util.adb (Is_Expression_Function): predicate to determine whether 12206 a function body comes from an expression function. 12207 122082011-08-02 Gary Dismukes <dismukes@adacore.com> 12209 12210 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming 12211 null exclusions to test Can_Never_Be_Null on the anonymous access types 12212 of the formals rather than testing the formals themselves. Exclude this 12213 check in cases where the Old_Formal is marked as a controlling formal, 12214 to avoid issuing spurious errors for bodies completing dispatching 12215 operations (due to the flag not getting set on controlling access 12216 formals in body specs). 12217 (Find_Corresponding_Spec): When checking full and subtype conformance of 12218 subprogram bodies in instances, pass Designated and E in that order, for 12219 consistency with the expected order of the formals (New_Id followed by 12220 Old_Id). 12221 122222011-08-02 Robert Dewar <dewar@adacore.com> 12223 12224 * sem_ch8.adb: Minor reformatting. 12225 122262011-08-02 Ed Schonberg <schonberg@adacore.com> 12227 12228 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure 12229 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted 12230 primitive operations of class-wide actuals. 12231 122322011-08-02 Javier Miranda <miranda@adacore.com> 12233 12234 * exp_atag.ads, exp_atag.adb 12235 (Build_Common_Dispatching_Select_Statements): Remove argument Loc 12236 since its value is implicitly passed in argument Typ. 12237 * exp_disp.adb (Make_Disp_Conditional_Select_Body, 12238 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine 12239 Build_Common_Dispatching_Select_Statements. 12240 122412011-08-02 Robert Dewar <dewar@adacore.com> 12242 12243 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads, 12244 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments. 12245 Minor reformatting. 12246 122472011-08-02 Robert Dewar <dewar@adacore.com> 12248 12249 * sem_res.adb: Minor reformatting. 12250 * sem_prag.adb: Minor reformatting. 12251 122522011-08-02 Javier Miranda <miranda@adacore.com> 12253 12254 * exp_atag.adb, exp_atags.ads 12255 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr 12256 by the tagged type Entity. Required to use this routine in the VM 12257 targets since we do not have available the Tag entity in the VM 12258 platforms. 12259 * exp_ch6.adb 12260 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package 12261 Ada.Tags has not been previously loaded. 12262 * exp_ch7.adb 12263 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke 12264 Build_VM_TSDs if package Ada.Tags has not been previously loaded. 12265 * sem_aux.adb 12266 (Enclosing_Dynamic_Scope): Add missing support to handle the full 12267 view of enclosing scopes. Required to handle enclosing scopes that 12268 are synchronized types whose full view is a task type. 12269 * exp_disp.adb 12270 (Build_VM_TSDs): Minor code improvement to avoid generating and 12271 analyzing lists with empty nodes. 12272 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets. 12273 (Make_Disp_Conditional_Select_Body): Add support for VM targets. 12274 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets. 12275 (Make_Disp_Timed_Select_Body): Add support for VM targets. 12276 (Make_Select_Specific_Data_Table): Add support for VM targets. 12277 (Make_VM_TSD): Generate code to initialize the SSD structure of 12278 the TSD. 12279 122802011-08-02 Yannick Moy <moy@adacore.com> 12281 12282 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local 12283 cross-references section in ALI. 12284 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub 12285 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of 12286 Sub). 12287 (Enclosing_Subprogram_Or_Package): new function to return the enclosing 12288 subprogram or package entity of a node 12289 (Is_Local_Reference_Type): new function returns True for references 12290 selected in local cross-references. 12291 (Lt): function extracted from Lt in Output_References 12292 (Write_Entity_Name): function extracted from Output_References 12293 (Generate_Definition): generate reference with type 'D' for definition 12294 of objects (object declaration and parameter specification), with 12295 appropriate locations and units, for use in local cross-references. 12296 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created 12297 references of type 'I' for initialization in object definition. 12298 (Output_References): move part of function Lt and procedure 12299 Write_Entity_Name outside of the body. Ignore references of types 'D' 12300 and 'I' introduced for local cross-references. 12301 (Output_Local_References): new procedure to output the local 12302 cross-references sections. 12303 (Lref_Entity_Status): new array defining whether an entity is a local 12304 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference 12305 with 'I' type when initialization expression is present. 12306 * get_scos.adb, get_scos.ads: Correct comments and typos 12307 123082011-08-02 Javier Miranda <miranda@adacore.com> 12309 12310 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in 12311 the JVM target. 12312 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in 12313 the JVM target. 12314 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no 12315 TSD support. 12316 123172011-08-02 Vincent Celier <celier@adacore.com> 12318 12319 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line 12320 (No_Space_Img): New function 12321 (Find_Excluded_Sources): When reading from a file, record the file name 12322 and the line number for each excluded source. 12323 (Mark_Excluded_Sources): When reporting an error, if the excluded 12324 sources were read from a file, include file name and line number in 12325 the error message. 12326 123272011-08-02 Ed Schonberg <schonberg@adacore.com> 12328 12329 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2). 12330 123312011-08-02 Robert Dewar <dewar@adacore.com> 12332 12333 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting 12334 123352011-08-02 Javier Miranda <miranda@adacore.com> 12336 12337 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the 12338 generation of TSDs to the DOTNET compiler. 12339 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the 12340 generation of TSDs to the DOTNET compiler. 12341 123422011-08-02 Javier Miranda <miranda@adacore.com> 12343 12344 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data 12345 record of all the tagged types declared inside library level package 12346 declarations, library level package bodies or library level subprograms. 12347 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD 12348 associated with a given tagged type. 12349 (Build_VM_TSDs): New subprogram. 12350 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main 12351 compilation units that are subprograms. 12352 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main 12353 compilation units that are package bodies. 12354 (Expand_N_Package_Declaration): Generate TSDs of the main compilation 12355 units that are a package declaration or a package instantiation. 12356 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code 12357 reorganization to improve the error generated by the frontend when the 12358 function Ada.Tags.Secondary_Tag is not available. 12359 * rtsfind.ads (RE_Register_TSD): New runtime entity. 12360 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup. 12361 123622011-08-02 Javier Miranda <miranda@adacore.com> 12363 12364 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode. 12365 123662011-08-02 Robert Dewar <dewar@adacore.com> 12367 12368 * s-imenne.ads: Minor reformatting. 12369 123702011-08-02 Robert Dewar <dewar@adacore.com> 12371 12372 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String 12373 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed 12374 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String 12375 123762011-08-02 Robert Dewar <dewar@adacore.com> 12377 12378 * einfo.ads (Materialize_Entity): Document this is only for renamings 12379 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate 12380 required debug information in the case where we transform the object 12381 declaration into a renaming declaration. 12382 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result 12383 object 12384 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of 12385 Materialize_Entity. 12386 123872011-08-02 Robert Dewar <dewar@adacore.com> 12388 12389 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces 12390 Suppress_Init_Procs. 12391 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use 12392 Suppress_Initialization/Initialization_Suppressed. 12393 * gnat_rm.texi: New documentation for pragma Suppress_Initialization 12394 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function 12395 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed 12396 * sem_prag.adb: New processing for pragma Suppress_Initialization. 12397 123982011-08-02 Robert Dewar <dewar@adacore.com> 12399 12400 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb: 12401 Minor reformatting. 12402 124032011-08-02 Ed Schonberg <schonberg@adacore.com> 12404 12405 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can 12406 only have inheritable classwide pre/postconditions. 12407 124082011-08-02 Javier Miranda <miranda@adacore.com> 12409 12410 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram. 12411 * rtsfind.ads (RE_Check_TSD): New runtime entity. 12412 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that 12413 checks if the external tag of a type is the same as the external tag 12414 of some other declaration. 12415 124162011-08-02 Thomas Quinot <quinot@adacore.com> 12417 12418 * s-taskin.ads: Minor reformatting. 12419 124202011-08-02 Emmanuel Briot <briot@adacore.com> 12421 12422 * g-comlin.adb (Display_Help): swap the order in which it prints the 12423 short help and the general usage. 12424 124252011-08-02 Ed Schonberg <schonberg@adacore.com> 12426 12427 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly 12428 the aspect declarations and attach them to the generic copy for 12429 subsequent analysis. 12430 (Analyze_Subprogram_Instantiation): copy explicitly the aspect 12431 declarations of the generic tree to the new subprogram declarations. 12432 * sem_attr.adb (Check_Precondition_Postcondition): recognize 12433 conditions that apply to a subprogram instance. 12434 124352011-08-02 Robert Dewar <dewar@adacore.com> 12436 12437 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project]. 12438 124392011-08-02 Ed Schonberg <schonberg@adacore.com> 12440 12441 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged 12442 private type with a tagged full view is not derived in the immediate 12443 scope of the partial view, (RM 7.3 (7)) use the scope of the base type. 12444 124452011-08-02 Robert Dewar <dewar@adacore.com> 12446 12447 * exp_ch4.adb: Minor reformatting. 12448 124492011-08-02 Ed Schonberg <schonberg@adacore.com> 12450 12451 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an 12452 Ada2012 iterator, the loop will be rewritten during expansion into a 12453 while loop with a cursor and an element declaration. Do not analyze the 12454 body in this case, because if the container is for indefinite types the 12455 actual subtype of the elements will only be determined when the cursor 12456 declaration is analyzed. 12457 124582011-08-02 Arnaud Charlet <charlet@adacore.com> 12459 12460 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore 12461 size/alignment related attributes in CodePeer_Mode. 12462 124632011-08-02 Gary Dismukes <dismukes@adacore.com> 12464 12465 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to 12466 Prepend_Element, since this can result in the operation getting the 12467 wrong slot in the full type's dispatch table if the full type has 12468 inherited operations. The incomplete type's operation will get added 12469 to the proper position in the full type's primitives 12470 list later in Sem_Disp.Check_Operation_From_Incomplete_Type. 12471 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for 12472 dispatching operations, since there are cases where nonprimitive 12473 subprograms can get added to the list of incomplete dependents (such 12474 as subprograms in nested packages). 12475 * sem_ch6.adb (Process_Formals): First, remove test for being in a 12476 private part when determining whether to add a primitive with a 12477 parameter of a tagged incomplete type to the Private_Dependents list. 12478 Such primitives can also occur in the visible part, and should not have 12479 been excluded from being private dependents. 12480 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of 12481 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents 12482 list of a Taft-amendment incomplete type is a primitive before issuing 12483 an error that the full type must appear in the same unit. There are 12484 cases where nonprimitives can be in the list (such as subprograms in 12485 nested packages). 12486 * sem_disp.adb (Derives_From): Use correct condition for checking that 12487 a formal's type is derived from the type of the corresponding formal in 12488 the parent subprogram (the condition was completely wrong). Add 12489 checking that was missing for controlling result types being derived 12490 from the result type of the parent operation. 12491 124922011-08-02 Yannick Moy <moy@adacore.com> 12493 12494 * errout.adb (First_Node): minor renaming 12495 * restrict.adb (Check_Formal_Restriction): put restriction warning on 12496 first node. 12497 124982011-08-02 Yannick Moy <moy@adacore.com> 12499 12500 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator 12501 before accessing operands. 12502 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to 12503 decide whether an initialization expression respects SPARK rules, as 12504 the plain node is the expanded one. This allows for more valid warnings 12505 to be issued. 12506 * gnat_rm.texi: Minor update. 12507 125082011-08-02 Arnaud Charlet <charlet@adacore.com> 12509 12510 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert 12511 previous change. 12512 125132011-08-02 Robert Dewar <dewar@adacore.com> 12514 12515 * sem_ch3.adb, sem_ch4.adb: Minor reformatting. 12516 125172011-08-02 Hristian Kirtchev <kirtchev@adacore.com> 12518 12519 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original 12520 loop statements and the element renaming declaration with a block when 12521 the element type is controlled. 12522 125232011-08-02 Yannick Moy <moy@adacore.com> 12524 12525 * sinfo.ads: Minor formatting. 12526 125272011-08-02 Ed Schonberg <schonberg@adacore.com> 12528 12529 * sem_aggr.adb (Add_Association): if the association has a box and no 12530 expression, use the Sloc of the aggregate itself for the new 12531 association. 12532 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use 12533 the Original_Node. 12534 125352011-08-02 Hristian Kirtchev <kirtchev@adacore.com> 12536 12537 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring. 12538 When a container is provided via a function call, generate a renaming 12539 of the function result. This avoids the creation of a transient scope 12540 and the premature finalization of the container. 12541 * exp_ch7.adb (Is_Container_Cursor): Removed. 12542 (Wrap_Transient_Declaration): Remove the supression of the finalization 12543 of the list controller when the declaration denotes a container cursor, 12544 it is not needed. 12545 125462011-08-02 Yannick Moy <moy@adacore.com> 12547 12548 * restrict.adb (Check_Formal_Restriction): only issue a warning if the 12549 node is from source, instead of the original node being from source. 12550 * sem_aggr.adb 12551 (Resolve_Array_Aggregate): refine the check for a static expression, to 12552 recognize also static ranges 12553 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration, 12554 Array_Type_Declaration): postpone the test for the type being a subtype 12555 mark after the type has been resolved, so that component-selection and 12556 expanded-name are discriminated. 12557 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm 12558 to distinguish the case of an iteration scheme, so that an error is 12559 issed on a non-static range in SPARK except in an iteration scheme. 12560 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with 12561 In_Iter_Schm = True. 12562 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for 12563 user-defined operators so that they are allowed in renaming 12564 * sem_ch8.adb 12565 (Find_Selected_Component): refine the check for prefixing of operators 12566 so that they are allowed in renaming. Move the checks for restrictions 12567 on selector name after analysis discriminated between 12568 component-selection and expanded-name. 12569 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on 12570 concatenation argument of string type if it is static. 12571 * sem_util.adb, sem_util.ads 12572 (Check_Later_Vs_Basic_Declarations): add a new function 12573 Is_Later_Declarative_Item to decice which declarations are allowed as 12574 later items, in the two different modes Ada 83 and SPARK. In the SPARK 12575 mode, add that renamings are considered as later items. 12576 (Enclosing_Package): new function to return the enclosing package 12577 (Enter_Name): correct the rule for homonyms in SPARK 12578 (Is_SPARK_Initialization_Expr): default to returning True on nodes not 12579 from source (result of expansion) to avoid issuing wrong warnings. 12580 125812011-08-02 Ed Schonberg <schonberg@adacore.com> 12582 12583 * errout.adb: On anything but an expression First_Node returns its 12584 argument. 12585 125862011-08-02 Pascal Obry <obry@adacore.com> 12587 12588 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting. 12589 125902011-08-02 Hristian Kirtchev <kirtchev@adacore.com> 12591 12592 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization. 12593 Set the associated loop as the related expression of internally 12594 generated cursors. 12595 * exp_ch7.adb (Is_Container_Cursor): New routine. 12596 (Wrap_Transient_Declaration): Supress the finalization of the list 12597 controller when the declaration denotes a container cursor. 12598 125992011-08-02 Yannick Moy <moy@adacore.com> 12600 12601 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through 12602 command line now. 12603 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the 12604 expression is a simple expression. This check cannot be performed in 12605 the semantics, so just drop it. 12606 (P_Index_Or_Discriminant_Constraint): move check that the index or 12607 discriminant is a subtype mark to Analyze_Subtype_Declaration in the 12608 semantics. Other cases were previously checked in the semantics. 12609 * par-ch4.adb (P_Name): move checks that a selector name is not 12610 character literal or an operator symbol to Find_Selected_Component in 12611 the semantics 12612 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic 12613 declarations are not placed after later declarations in a separate 12614 procedure in Sem_Util (possibly not the best choice?), to be used both 12615 during parsing, for Ada 83 mode, and during semantic analysis, for 12616 SPARK mode. 12617 * par-endh.adb (Check_End): move check that end label is not missing 12618 to Process_End_Label in the semantics 12619 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove 12620 the special case for SPARK restriction 12621 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End 12622 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a 12623 parameter Force to issue the error message even on internal node (used 12624 for generated end label). Call Check_Restriction to check when an error 12625 must be issued. In SPARK mode, issue an error message even if the 12626 restriction is not set. 12627 (Check_Restriction): new procedure with an additional out parameter to 12628 inform the caller that a message has been issued 12629 * sem_aggr.adb: Minor modification of message 12630 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction 12631 instead of issuing an error message directly 12632 * sem_ch3.adb (Analyze_Declarations): move here the check that basic 12633 declarations are not placed after later declarations, by calling 12634 Check_Later_Vs_Basic_Declarations 12635 (Analyze_Subtype_Declaration): move here the check that an index or 12636 discriminant constraint must be a subtype mark. Change the check that 12637 a subtype of String must start at one so that it works on subtype marks. 12638 * sem_ch4.adb (Analyze_Call): move here the check that a named 12639 association cannot follow a positional one in a call 12640 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction 12641 instead of issuing an error message directly 12642 * sem_ch8.adb (Find_Selected_Component): move here the check that a 12643 selector name is not a character literal or an operator symbol. Move 12644 here the check that the prefix of an expanded name cannot be a 12645 subprogram or a loop statement. 12646 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new 12647 procedure called from parsing and semantics to check that basic 12648 declarations are not placed after later declarations 12649 (Process_End_Label): move here the check that end label is not missing 12650 126512011-08-02 Arnaud Charlet <charlet@adacore.com> 12652 12653 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum 12654 representation clause in codepeer mode, since it confuses CodePeer and 12655 does not bring useful info. 12656 126572011-08-02 Ed Falis <falis@adacore.com> 12658 12659 * init.c: initialize fp hw on MILS. 12660 126612011-08-02 Ed Schonberg <schonberg@adacore.com> 12662 12663 * errout.adb (First_Node): for bodies, return the node itself (small 12664 optimization). For other nodes, do not check source_unit if the node 12665 comes from Standard. 12666 126672011-08-02 Robert Dewar <dewar@adacore.com> 12668 12669 * exp_ch3.adb: Minor comment additions. 12670 * sem_ch13.adb: Minor reformatting. 12671 126722011-08-02 Pascal Obry <obry@adacore.com> 12673 12674 * make.adb, makeutl.adb: Removes some superfluous directory separator. 12675 126762011-08-02 Robert Dewar <dewar@adacore.com> 12677 12678 * sem_attr.adb: Minor reformatting. 12679 126802011-08-02 Robert Dewar <dewar@adacore.com> 12681 12682 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value 12683 (Has_Default_Component_Value): Removed 12684 * einfo.ads Comment updates 12685 (Has_Default_Aspect): Replaces Has_Default_Value 12686 (Has_Default_Component_Value): Removed 12687 * exp_ch13.adb 12688 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects 12689 * exp_ch3.adb 12690 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects 12691 (Get_Simple_Init_Val): Handle Default_Value aspect 12692 (Needs_Simple_Initialization): Handle Default_Value aspect 12693 * exp_ch3.ads: Needs_Simple_Initialization 12694 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect 12695 * par-prag.adb (Pragma_Default[_Component]Value) Removed 12696 * sem_ch13.adb 12697 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects 12698 * sem_prag.adb (Pragma_Default[_Component]Value) Removed 12699 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed 12700 127012011-08-02 Ed Schonberg <schonberg@adacore.com> 12702 12703 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate 12704 package containing iteration primitives. 12705 exp_ch5.adb (Expand_Iterator_Loop): ditto. 12706 127072011-08-02 Ed Schonberg <schonberg@adacore.com> 12708 12709 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with 12710 "of", pre-analyze expression in case it is a function call with 12711 finalization actions that must be placed ahead of the loop. 12712 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present 12713 on an Ada2012 iterator, insert them ahead of the rewritten loop. 12714 127152011-08-02 Geert Bosch <bosch@adacore.com> 12716 12717 * cstand.adb (Create_Float_Types): Only consider C's long double for 12718 Long_Long_Float, in addition to double. 12719 127202011-08-02 Robert Dewar <dewar@adacore.com> 12721 12722 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads, 12723 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads, 12724 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb: 12725 Minor reformatting. 12726 127272011-08-02 Ed Schonberg <schonberg@adacore.com> 12728 12729 * sem_attr.adb: handle properly 'Result when it is a prefix of an 12730 indexed component. 12731 127322011-08-02 Javier Miranda <miranda@adacore.com> 12733 12734 * einfo.ads, einfo.adb 12735 (Original_Access_Type): Move this attribute to Node26 since there was 12736 an undocumented use of Node21 in E_Access_Subprogram_Type entities 12737 which causes conflicts and breaks the generation of the .NET compiler. 12738 (Interface_Name): Add missing documentation on JGNAT only uses of 12739 this attribute. 12740 127412011-08-02 Geert Bosch <bosch@adacore.com> 12742 12743 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist 12744 (Find_Back_End_Float_Type): Likewise 12745 (Create_Back_End_Float_Types): Likewise 12746 (Create_Float_Types): Likewise 12747 (Register_Float_Type): Likewise 12748 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of 12749 Nlist and split out type selection in new local Find_Base_Type function. 12750 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of 12751 Nlist 12752 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist 12753 127542011-08-02 Robert Dewar <dewar@adacore.com> 12755 12756 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in 12757 alpha order). 12758 * opt.ads: Minor comment change. 12759 * sem_ch12.adb: Minor code reorganization. 12760 127612011-08-02 Gary Dismukes <dismukes@adacore.com> 12762 12763 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private 12764 subtype's list of rep items to the list on the full subtype in the case 12765 where the lists are the same. 12766 127672011-08-02 Geert Bosch <bosch@adacore.com> 12768 12769 * switch-c.adb (Free): New deallocation procedure to avoid implicitly 12770 using the one from System.Strings, which also deallocates all strings. 12771 127722011-08-02 Geert Bosch <bosch@adacore.com> 12773 12774 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New 12775 function. 12776 * gcc-interface/Make-lang.in: Update dependencies. 12777 127782011-08-02 Olivier Hainque <hainque@adacore.com> 12779 12780 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function 12781 end_locus. 12782 127832011-08-02 Javier Miranda <miranda@adacore.com> 12784 12785 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals 12786 associated with anonymous access to subprograms. 12787 127882011-08-02 Geert Bosch <bosch@adacore.com> 12789 12790 * opt.ads 12791 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions. 12792 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition. 12793 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads 12794 (Add_Symbol_Definition): Move to switch-c.adb 12795 (Process_Command_Line_Symbol_Definitions): Adjust references to above. 12796 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation. 12797 (Add_Symbol_Definition): Move to switch-c.adb. 12798 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw. 12799 * sem_warn.adb 12800 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch): 12801 Move to warnsw.adb. 12802 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size, 12803 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch): 12804 Move to warnsw.adb. 12805 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw. 12806 (Add_Symbol_Definition): Moved from Prepcomp. 12807 * switch-c.ads: Update copyright notice. Use String_List instead of 12808 Argument_List, removing dependency on System.OS_Lib. 12809 128102011-08-02 Yannick Moy <moy@adacore.com> 12811 12812 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal 12813 mode on initialization expression which does not respect SPARK 12814 restrictions. 12815 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines 12816 if the tree referenced by its argument represents an initialization 12817 expression in SPARK, suitable for initializing an object in an object 12818 declaration. 12819 128202011-08-02 Javier Miranda <miranda@adacore.com> 12821 12822 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the 12823 internally generated access to subprogram with its associated protected 12824 subprogram type. 12825 * einfo.ads, einfo.adb (Original_Access_Type): New attribute. 12826 128272011-08-02 Geert Bosch <bosch@adacore.com> 12828 12829 * cstand.adb (Register_Float_Type): Print information about type to 12830 register, if the Debug_Flag_Dot_B is set. 12831 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option. 12832 * rtsfind.ads (RE_Max_Base_Digits): New run time entity. 12833 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations 12834 with a requested precision of more than Max_Digits digits and no more 12835 than Max_Base_Digits digits, if a range specification is present and the 12836 Predefined_Float_Types list has a suitable type to derive from. 12837 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the 12838 case of type completion with pragma Import 12839 * sem_prag.adb 12840 (Process_Import_Predefined_Type): Processing to complete a type 12841 with pragma Import. Currently supports floating point types only. 12842 (Set_Convention_From_Pragma): Do nothing without underlying type. 12843 (Process_Convention): Guard against absence of underlying type, 12844 which may happen when importing incomplete types. 12845 (Process_Import_Or_Interface): Handle case of importing predefined 12846 types. Tweak error message. 12847 128482011-08-02 Eric Botcazou <ebotcazou@adacore.com> 12849 12850 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined 12851 functions to previous change. Reorganize code slightly. 12852 128532011-08-02 Geert Bosch <bosch@adacore.com> 12854 12855 * back_end.ads (Register_Type_Proc): New call back procedure type for 12856 allowing the back end to provide information about available types. 12857 (Register_Back_End_Types): New procedure to register back end types. 12858 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate 12859 available types. 12860 * cstand.adb (Back_End_Float_Types): New list for floating point types 12861 supported by the back end. 12862 (Build_Float_Type): Add extra parameter for Float_Rep_Kind. 12863 (Copy_Float_Type): New procedure to make new copies of predefined types. 12864 (Register_Float_Type): New call back procedure to populate the BEFT list 12865 (Find_Back_End_Float_Type): New procedure to find a BEFT by name 12866 (Create_Back_End_Float_Types): New procedure to populate the BEFT list. 12867 (Create_Float_Types): New procedure to create entities for floating 12868 point types predefined in Standard, and put these and any remaining 12869 BEFTs on the Predefined_Float_Types list. 12870 * stand.ads (Predefined_Float_Types): New list for predefined floating 12871 point types that do not have declarations in package Standard. 12872 128732011-08-02 Eric Botcazou <ebotcazou@adacore.com> 12874 12875 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the 12876 entity node for the unit containing the parameter. 12877 (Add_Inlined_Body): Use it to find the unit containing the subprogram. 12878 (Add_Inlined_Subprogram): Likewise. 12879 * gcc-interface/Make-lang.in: Update dependencies. 12880 128812011-08-02 Thomas Quinot <quinot@adacore.com> 12882 12883 * s-stusta.adb (Print): Make sure Pos is always initialized to a 12884 suitable value. 12885 128862011-08-02 Geert Bosch <bosch@adacore.com> 12887 12888 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image. 12889 128902011-08-02 Eric Botcazou <ebotcazou@adacore.com> 12891 12892 * sem_type.adb (Covers): Move trivial case to the top and reuse the 12893 computed value of Base_Type. 12894 128952011-08-02 Yannick Moy <moy@adacore.com> 12896 12897 * restrict.adb (Check_Restriction): issue an error for any use of 12898 class-wide, even if the No_Dispatch restriction is not set. 12899 * sem_aggr.adb: Correct typos in comments and messages in formal mode 12900 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is, 12901 when completing a private extension, the type named in the private part 12902 is not the same as that named in the visible part. 12903 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use 12904 of an inherited primitive operations of a tagged type or type extension 12905 that returns the tagged type. 12906 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new 12907 function which returns True for an implicit operation inherited by the 12908 derived type declaration for the argument type. 12909 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic 12910 order. 12911 129122011-08-02 Ed Schonberg <schonberg@adacore.com> 12913 12914 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from 12915 Process_Bounds, to perform analysis with expansion of a range or an 12916 expression that is the iteration scheme for a loop. 12917 (Analyze_Iterator_Specification): If domain of iteration is given by a 12918 function call with a controlled result, as is the case if call returns 12919 a predefined container, ensure that finalization actions are properly 12920 generated. 12921 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range. 12922 129232011-08-02 Javier Miranda <miranda@adacore.com> 12924 12925 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo. 12926 * gcc-interface/Make-lang.in: Update dependencies. 12927 129282011-08-02 Javier Miranda <miranda@adacore.com> 12929 12930 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to 12931 determine if the analysis is performed using N or Original_Node (N). 12932 * exp_util.adb (Side_Effect_Free): Code cleanup since the new 12933 functionality of routine Is_Variable avoids code duplication. 12934 * checks.adb (Determine_Range): Handle temporaries generated by 12935 Remove_Side_Effects. 12936 129372011-08-02 Javier Miranda <miranda@adacore.com> 12938 12939 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and 12940 expansion of the condition. Required since the previous analysis was 12941 done with expansion disabled (see Resolve_Quantified_Expression) and 12942 hence checks were not inserted and record comparisons have not been 12943 expanded. 12944 129452011-08-02 Ed Falis <falis@adacore.com> 12946 12947 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads: 12948 Update header. 12949 129502011-08-02 Bob Duff <duff@adacore.com> 12951 12952 * opt.ads: Minor comment fix. 12953 129542011-08-02 Bob Duff <duff@adacore.com> 12955 12956 * sem_ch12.adb (Analyze_Package_Instantiation, 12957 Analyze_Subprogram_Instantiation): Turn off style checking while 12958 analyzing an instance. Whatever style checks that apply to the generic 12959 unit should apply, so it makes no sense to apply them in an instance. 12960 This was causing trouble when compiling an instance of a runtime 12961 unit that violates the -gnatyO switch. 12962 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from 12963 one of the two case statements, causing spurious errors. 12964 129652011-08-02 Robert Dewar <dewar@adacore.com> 12966 12967 * uname.adb: Minor reformatting. 12968 * gnatcmd.adb: Minor reformatting. 12969 * exp_attr.adb: Minor reformatting. 12970 129712011-08-02 Ed Schonberg <schonberg@adacore.com> 12972 12973 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction 12974 No_Dispatching_Calls, do not look for the Assign primitive, because 12975 predefined primitives are not created in this case. 12976 129772011-08-02 Bob Duff <duff@adacore.com> 12978 12979 * stylesw.ads: Minor comment fixes. 12980 129812011-08-02 Robert Dewar <dewar@adacore.com> 12982 12983 * freeze.adb (Add_To_Result): New procedure. 12984 129852011-08-02 Jose Ruiz <ruiz@adacore.com> 12986 12987 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run 12988 time, if the specific run-time routines for handling streams of strings 12989 are not available, use the default mechanism. 12990 129912011-08-02 Arnaud Charlet <charlet@adacore.com> 12992 12993 * s-regpat.ads: Fix typo. 12994 129952011-08-02 Vincent Celier <celier@adacore.com> 12996 12997 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is 12998 not null, call it to create the in memory config project file without 12999 parsing an existing default config project file. 13000 130012011-08-02 Eric Botcazou <ebotcazou@adacore.com> 13002 13003 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries. 13004 130052011-08-02 Ed Schonberg <schonberg@adacore.com> 13006 13007 * sem_elim.adb: an abstract subprogram does not need an eliminate 13008 pragma for its descendant to be eliminable. 13009 130102011-08-02 Ed Falis <falis@adacore.com> 13011 13012 * init.c: revert to handling before previous checkin for VxWorks 13013 * s-intman-vxworks.adb: delete unnecessary declarations related to 13014 using Ada interrupt facilities for handling signals. 13015 Delete Initialize_Interrupts. Use __gnat_install_handler instead. 13016 * s-intman-vxworks.ads: Import __gnat_install_handler as 13017 Initialize_Interrupts. 13018 * s-taprop-vxworks.adb: Delete Signal_Mask. 13019 (Abort_Handler): change construction of mask to unblock exception 13020 signals. 13021 130222011-08-02 Jerome Guitton <guitton@adacore.com> 13023 13024 * a-except-2005.adb (Raise_From_Signal_Handler): Call 13025 Debug_Raise_Exception before propagation starts. 13026 130272011-08-02 Eric Botcazou <ebotcazou@adacore.com> 13028 13029 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call 13030 to Restriction_Check_Required. 13031 * sem_ch3.adb (Analyze_Object_Declaration): Likewise. 13032 * sem_res.adb (Resolve_Call): Likewise. 13033 * sem_attr.adb (Check_Stream_Attribute): Likewise. 13034 130352011-08-02 Bob Duff <duff@adacore.com> 13036 13037 * stylesw.ads: Update comment. 13038 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N. 13039 * errout.ads: Remove obsolete comment. 13040 130412011-08-02 Javier Miranda <miranda@adacore.com> 13042 13043 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function. 13044 (Set_Is_Safe_To_Reevaluate): new procedure. 13045 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no 13046 assignment is allowed on safe-to-reevaluate variables. 13047 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the 13048 temporary created to remove side effects in expressions that use 13049 the secondary stack as safe-to-reevaluate. 13050 * exp_util.adb (Side_Effect_Free): Add missing code to handle well 13051 variables that are not true constants. 13052 130532011-08-02 Robert Dewar <dewar@adacore.com> 13054 13055 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads, 13056 sem_res.adb, sem_ch6.adb: Minor reformatting. 13057 130582011-08-02 Jerome Guitton <guitton@adacore.com> 13059 13060 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code. 13061 130622011-08-02 Ed Schonberg <schonberg@adacore.com> 13063 13064 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do 13065 not set Overridden_Operation if subprogram is an initialization 13066 procedure. 13067 130682011-08-02 Yannick Moy <moy@adacore.com> 13069 13070 * par-ch6.adb: Correct obsolete name in comments 13071 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function 13072 which takes two message arguments (existing function takes one), with 13073 second message used for continuation. 13074 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject 13075 block statements that originate from a source block statement, not 13076 generated block statements 13077 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for 13078 symmetry with procedure case 13079 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new 13080 function to issue an error in formal mode if a package specification 13081 contains more than one tagged type or type extension. 13082 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual 13083 parameters matching formals of tagged types are objects (or ancestor 13084 type conversions of objects), not general expressions. Issue an error 13085 on view conversions that are not involving ancestor conversion of an 13086 extended type. 13087 (Resolve_Type_Conversion): in formal mode, issue an error on the 13088 operand of an ancestor type conversion which is not an object 13089 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the 13090 procedure so that it works also for actuals of function calls 13091 (Is_Actual_Tagged_Parameter): new function which determines if its 13092 argument is an actual parameter of a formal of tagged type in a 13093 subprogram call 13094 (Is_SPARK_Object_Reference): new function which determines if the tree 13095 referenced by its argument represents an object in SPARK 13096 130972011-08-02 Robert Dewar <dewar@adacore.com> 13098 13099 * sem_ch3.adb: Minor reformatting 13100 Minor comment addition 13101 Minor error msg text change 13102 131032011-08-02 Javier Miranda <miranda@adacore.com> 13104 13105 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New 13106 function. Used to be more precise when we generate a variable plus one 13107 assignment to remove side effects in the evaluation of the Bound 13108 expressions. 13109 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes 13110 of the bound expression to force its re-analysis and thus expand the 13111 associated transient scope (if required). Code cleanup replacing the 13112 previous code that declared the constant entity by an invocation to 13113 routine Force_Evaluation which centralizes this work in the frontend. 13114 131152011-08-02 Robert Dewar <dewar@adacore.com> 13116 13117 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table 13118 (Base_Type): Now uses improved Is_Base_Type function 13119 * einfo.ads (Base_Type): Inline this function 13120 131212011-08-02 Robert Dewar <dewar@adacore.com> 13122 13123 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion 13124 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas 13125 131262011-08-02 Arnaud Charlet <charlet@adacore.com> 13127 13128 * gcc-interface/Make-lang.in: Update dependencies. 13129 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks 13130 targets. 13131 131322011-08-02 Yannick Moy <moy@adacore.com> 13133 13134 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on 13135 non-simple expression used in delta constraint 13136 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on 13137 index constraint which is not a subtype mark 13138 * par.adb: With and use Restrict 13139 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal 13140 mode on component type which is not a subtype mark and default 13141 expression on component 13142 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype 13143 of string which does not have a lower index bound equal to 1 13144 (Array_Type_Declaration): issue an error in formal mode on index or 13145 component type which is not a subtype mark, and on aliased keyword on 13146 component 13147 (Derived_Type_Declaration): issue an error in formal mode on interface, 13148 limited or abstract type 13149 (Record_Type_Declaration): issue an error in formal mode on interface 13150 (Record_Type_Definition): issue an error in formal mode on tagged types 13151 and type extensions not declared in the specification of a library unit 13152 package; on null non-tagged record; on variant part 13153 131542011-08-02 Vincent Celier <celier@adacore.com> 13155 13156 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir 13157 not declared for qualified library project when Library_Name is not 13158 declared, but Library_Dir is. 13159 131602011-08-02 Robert Dewar <dewar@adacore.com> 13161 13162 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated 13163 pragmas (affects aspects [Component_]Default_Value 13164 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use 13165 component type for the resolution 13166 131672011-08-02 Eric Botcazou <ebotcazou@adacore.com> 13168 13169 * einfo.adb (Base_Type): Tune implementation for speed. 13170 131712011-08-02 Robert Dewar <dewar@adacore.com> 13172 13173 * freeze.adb: Minor reformatting. 13174 131752011-08-02 Thomas Quinot <quinot@adacore.com> 13176 13177 * scos.ads: Update comments. 13178 131792011-08-02 Ed Schonberg <schonberg@adacore.com> 13180 13181 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the 13182 base type, because the parent may be a subtype of a private type whose 13183 convention is established in a private part. 13184 131852011-08-02 Hristian Kirtchev <kirtchev@adacore.com> 13186 13187 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return 13188 statement in a block when the expansion of the return expression has 13189 created a finalization chain. 13190 * freeze.adb (Freeze_Expression): Alphabetize all choices associated 13191 with the parent node. 13192 Add N_Extended_Return_Statement to handle the case where a transient 13193 object declaration appears in the Return_Object_Declarations list of 13194 an extended return statement. 13195 131962011-08-02 Matthew Gingell <gingell@adacore.com> 13197 13198 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly 13199 unused parameter 'name'. 13200 132012011-08-02 Ed Schonberg <schonberg@adacore.com> 13202 13203 * sem_elim.adb (Set_Eliminated): If the overridden operation is an 13204 inherited operation, check whether its alias, which is the source 13205 operastion that it renames, has been marked eliminated. 13206 132072011-08-02 Javier Miranda <miranda@adacore.com> 13208 13209 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an 13210 in-mode parameter whose type is an access type since it can be used to 13211 modify its designated object. Enforce code that handles as safe an 13212 access type that is not access-to-constant but it is the result of a 13213 previous removal of side-effects. 13214 (Remove_Side_Effects): Minor code reorganization of cases which require 13215 no action. Done to incorporate documentation on new cases uncovered 13216 working in this ticket: no action needed if this routine was invoked 13217 too early and the nodes are not yet decorated. 13218 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls 13219 to routine Remove_Side_Effects by calls to Force_Evaluation since they 13220 were issued with actuals that are implicitly provided by 13221 Force_Evaluation. 13222 132232011-08-02 Robert Dewar <dewar@adacore.com> 13224 13225 * sem_ch3.adb, sem_res.adb: Minor reformatting. 13226 132272011-08-02 Yannick Moy <moy@adacore.com> 13228 13229 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure 13230 to issue an error in formal mode on attribute not supported in this mode 13231 (Analyze_Attribute): issue errors on standard attributes not supported 13232 in formal mode. 13233 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of 13234 comment, and issue error in formal mode on modulus which is not a power 13235 of 2. 13236 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static 13237 range. 13238 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in 13239 subtype mark. 13240 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary 13241 operator on modular type (except 'not'). 13242 132432011-08-02 Robert Dewar <dewar@adacore.com> 13244 13245 * gnat_rm.texi: Minor reformatting. 13246 132472011-08-02 Arnaud Charlet <charlet@adacore.com> 13248 13249 * s-osinte-linux.ads: Minor comment update and reformatting. 13250 * i-cexten.ads: Make this unit pure, as for its parent. 13251 Will allow its usage in more contexts if needed. 13252 132532011-08-02 Robert Dewar <dewar@adacore.com> 13254 13255 * s-utf_32.ads: Minor comment fix. 13256 132572011-08-02 Ed Schonberg <schonberg@adacore.com> 13258 13259 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive 13260 operation of a tagged synchronized type, handle the case where the 13261 controlling argument is overloaded. 13262 132632011-08-02 Yannick Moy <moy@adacore.com> 13264 13265 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl: 13266 Replace pragma SPARK_95 with pragma Restrictions (SPARK) 13267 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set 13268 SPARK mode and formal verification mode on processing SPARK restriction 13269 * s-rident.ads (Restriction_Id): add SPARK restriction in those not 13270 requiring consistency checking. 13271 132722011-08-02 Robert Dewar <dewar@adacore.com> 13273 13274 * sem_res.adb: Minor reformatting. 13275 132762011-08-02 Robert Dewar <dewar@adacore.com> 13277 13278 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, 13279 a-cforse.ads: Remove unneeded with of Ada.Containers 13280 Remove commented out pragma Inline's 13281 Move specifications of new subprograms to the actual specs 13282 132832011-08-02 Yannick Moy <moy@adacore.com> 13284 13285 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, 13286 a-cforse.ads: Update comments. 13287 132882011-08-02 Ed Schonberg <schonberg@adacore.com> 13289 13290 * sem_attr.adb: add attribute name when 'Result has the wrong prefix. 13291 132922011-08-02 Robert Dewar <dewar@adacore.com> 13293 13294 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, 13295 a-cforse.ads, a-cofove.ads: Minor reformatting. 13296 132972011-08-02 Claire Dross <dross@adacore.com> 13298 13299 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads, 13300 a-cofove.ads: Add comments. 13301 133022011-08-02 Yannick Moy <moy@adacore.com> 13303 13304 * gnat_rm.texi: Document formal containers. 13305 133062011-08-02 Emmanuel Briot <briot@adacore.com> 13307 13308 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there 13309 are empty sections. 13310 133112011-08-02 Robert Dewar <dewar@adacore.com> 13312 13313 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor 13314 reformatting. 13315 133162011-08-02 Robert Dewar <dewar@adacore.com> 13317 13318 * aspects.adb: New aspects Default_Value and Default_Component_Value 13319 New format of Aspect_Names table checks for omitted entries 13320 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on 13321 handling of boolean aspects for derived types. 13322 New aspects Default_Value and Default_Component_Value 13323 New format of Aspect_Names table checks for omitted entries 13324 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag 13325 (Has_Default_Value): New flag 13326 (Has_Default_Component_Value): New flag 13327 (Has_Default_Value): New flag 13328 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names 13329 table. 13330 * par-prag.adb: New pragmas Default_Value and Default_Component_Value 13331 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects 13332 Default_Value and Default_Component_Value 13333 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value 13334 New aspects Default_Value and Default_Component_Value 13335 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value 13336 * sprint.adb: Print N_Aspect_Specification node when called from gdb 13337 133382011-08-02 Vincent Celier <celier@adacore.com> 13339 13340 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project, 13341 inherit library kind. 13342 133432011-08-02 Ed Schonberg <schonberg@adacore.com> 13344 13345 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds. 13346 Minor reformatting. 13347 133482011-08-02 Robert Dewar <dewar@adacore.com> 13349 13350 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM 13351 133522011-08-02 Yannick Moy <moy@adacore.com> 13353 13354 * sem_aggr.adb (Resolve_Aggregate): Fix thinko. 13355 133562011-08-02 Robert Dewar <dewar@adacore.com> 13357 13358 * impunit.adb: Add comment. 13359 133602011-08-02 Yannick Moy <moy@adacore.com> 13361 13362 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks 13363 qualification of aggregates in formal mode 13364 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in 13365 another aggregate 13366 (Resolve_Aggregate): complete the test that an aggregate is adequately 13367 qualified in formal mode 13368 133692011-08-02 Pascal Obry <obry@adacore.com> 13370 13371 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting. 13372 * mlib-prj.adb: Supress warning when compiling binder generated file. 13373 (Build_Library): Supress all warnings when compiling the binder 13374 generated file. 13375 133762011-08-02 Yannick Moy <moy@adacore.com> 13377 13378 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure 13379 from here... 13380 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here 13381 * sem_aggr.adb, sem_ch5.adb, sem_util.adb: 13382 Add with/use clauses to make Check_Formal_Restriction visible 13383 133842011-08-02 Ed Schonberg <schonberg@adacore.com> 13385 13386 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual 13387 in-parameters when type of the generic formal is private in the generic 13388 spec and non-private in the body. 13389 133902011-08-02 Claire Dross <dross@adacore.com> 13391 13392 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb, 13393 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads, 13394 a-cofove.adb, a-cofove.ads: New files implementing formal containers. 13395 * impunit.adb, Makefile.rtl: Take new files into account. 13396 133972011-08-02 Robert Dewar <dewar@adacore.com> 13398 13399 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb, 13400 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting. 13401 134022011-08-02 Yannick Moy <moy@adacore.com> 13403 13404 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in 13405 formal mode 13406 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of 13407 matching static array bounds, taking into account the special case of 13408 string literals 13409 * sem_ch3.adb: Typo in comment. 13410 134112011-08-02 Yannick Moy <moy@adacore.com> 13412 13413 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure 13414 which issues an error in formal mode if its argument node is originally 13415 from source 13416 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type 13417 has a discriminant specification so that it does not include the case 13418 of derived types 13419 (Derived_Type_Declaration): move here the test that a derived type has a 13420 discriminant specification 13421 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the 13422 first element of a component association before accessing its choices 13423 (presence of component association is not enough) 13424 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram 13425 declaration is a library item before accessing the next element in a 13426 list, as library items are not member of lists 13427 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, 13428 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use 13429 Check_Formal_Restriction whenever possible. 13430 134312011-08-02 Ed Schonberg <schonberg@adacore.com> 13432 13433 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype 13434 reference when needed. 13435 134362011-08-02 Bob Duff <duff@adacore.com> 13437 13438 * gnat_ugn.texi: Fix typo. 13439 134402011-08-02 Vincent Celier <celier@adacore.com> 13441 13442 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of 13443 archive file name. Do not use the full path name of archives for Open 13444 VMS. 13445 134462011-08-02 Robert Dewar <dewar@adacore.com> 13447 13448 * sem_ch12.adb, sem_ch11.adb: New calling sequence for 13449 Analyze_Aspect_Specifications 13450 * sem_ch13.adb 13451 (Analyze_Aspect_Specifications): New handling for boolean aspects 13452 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence 13453 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling 13454 sequence for Analyze_Aspect_Specifications 13455 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely 13456 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used 13457 134582011-08-02 Robert Dewar <dewar@adacore.com> 13459 13460 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean 13461 aspects, since these no longer exist. 13462 134632011-08-02 Robert Dewar <dewar@adacore.com> 13464 13465 * par-ch13.adb (Aspect_Specifications_Present): Always return false on 13466 semicolon, do not try to see if there are aspects following it. 13467 * par-ch3.adb (P_Declarative_Items): Better message for unexpected 13468 aspect spec. 13469 134702011-08-02 Robert Dewar <dewar@adacore.com> 13471 13472 * sem_ch8.adb, aspects.ads: Minor reformatting. 13473 134742011-08-02 Eric Botcazou <ebotcazou@adacore.com> 13475 13476 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline. 13477 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure 13478 extracted from... 13479 (Analyze_Aspect_Specifications): ...here. Call above procedure. 13480 134812011-08-02 Yannick Moy <moy@adacore.com> 13482 13483 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal 13484 mode on subprogram declaration outside of package specification, unless 13485 it is followed by a pragma Import 13486 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration, 13487 Access_Type_Declaration): issue error in formal mode on access type 13488 (Analyze_Incomplete_Type_Decl): issue error in formal mode on 13489 incomplete type 13490 (Analyze_Object_Declaration): issue error in formal mode on object 13491 declaration which does not respect SPARK restrictions 13492 (Analyze_Subtype_Declaration): issue error in formal mode on subtype 13493 declaration which does not respect SPARK restrictions 13494 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue 13495 error in formal mode on digits or delta constraint 13496 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on 13497 decimal fixed point type 13498 (Derived_Type_Declaration): issue error in formal mode on derived type 13499 other than type extensions of tagged record types 13500 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant 13501 with check on access definition 13502 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal 13503 mode on protected definition. 13504 (Analyze_Task_Definition): issue error in formal mode on task definition 13505 135062011-08-02 Robert Dewar <dewar@adacore.com> 13507 13508 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting. 13509 135102011-08-02 Javier Miranda <miranda@adacore.com> 13511 13512 * sem_ch6.adb (Can_Override_Operator): New function. 13513 (Verify_Overriding_Indicator): Add missing code to check overriding 13514 indicator in operators. Fixes regression. 13515 (Check_Overriding_Indicator): Minor reformating after replacing the 13516 code that evaluates if the subprogram can override an operator by 13517 invocations to the above new function. 13518 * einfo.adb 13519 (Write_Field26_Name): Add missing code to ensure that, following 13520 the documentation in einfo.ads, this field is not shown as attribute 13521 "Static_Initialization" on non-dispatching functions. 13522 135232011-08-02 Jose Ruiz <ruiz@adacore.com> 13524 13525 * sem_res.adb (Resolve_Call): A call to 13526 Ada.Real_Time.Timing_Events.Set_Handler violates restriction 13527 No_Relative_Delay (AI-0211) only when it sets a relative timing event, 13528 i.e., when the second parameter is of type Time_Span. 13529 135302011-08-02 Vincent Celier <celier@adacore.com> 13531 13532 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link 13533 with an archive instead of -L<library dir> -l<library name>. 13534 135352011-08-02 Ed Schonberg <schonberg@adacore.com> 13536 13537 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed, 13538 mark the base types In_Use in addition to making the operations 13539 use_visible. 13540 135412011-08-02 Ed Falis <falis@adacore.com> 13542 13543 * init.c: add and setup __gnat_signal_mask for the exception signals 13544 * s-inmaop-vxworks.adb: new file. 13545 * s-intman-vxworks.adb: remove unnecessary initializations and 13546 simplify remaining 13547 * s-intman-vxworks.ads: remove unnecessary variable 13548 * s-taprop-vxworks.adb: simplify signal initialization 13549 135502011-08-02 Robert Dewar <dewar@adacore.com> 13551 13552 * sem_ch8.adb: Minor code reorganization, comment updates. 13553 135542011-08-02 Robert Dewar <dewar@adacore.com> 13555 13556 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util 13557 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved 13558 here from Sem_Res. 13559 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression 13560 (Matching_Static_Array_Bounds): Moved here from Sem_Res 13561 135622011-08-02 Ed Schonberg <schonberg@adacore.com> 13563 13564 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5. 13565 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node. 13566 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of 13567 use_type_clauses, to handle more efficiently use_type and use_all_type 13568 constructs. 13569 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the 13570 Ada2012 Use_All_Type clause. 13571 (Use_Class_Wide_Operations): new procedure. 13572 135732011-08-02 Robert Dewar <dewar@adacore.com> 13574 13575 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb, 13576 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized 13577 expression to expression function. 13578 135792011-08-02 Ed Schonberg <schonberg@adacore.com> 13580 13581 * sem_ch4.adb: transform simple Ada2012 membership into equality only 13582 if types are compatible. 13583 135842011-08-02 Yannick Moy <moy@adacore.com> 13585 13586 * sem_res.adb (Matching_Static_Array_Bounds): new function which 13587 returns True if its argument array types have same dimension and same 13588 static bounds at each index. 13589 (Resolve_Actuals): issue an error in formal mode on actuals passed as 13590 OUT or IN OUT paramaters which are not view conversions in SPARK. 13591 (Resolve_Arithmetic_Op): issue an error in formal mode on 13592 multiplication or division with operands of fixed point types which are 13593 not qualified or explicitly converted. 13594 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of 13595 Boolean or array type (except String) operands. 13596 (Resolve_Equality_Op): issue an error in formal mode on equality 13597 operators for array types other than String with non-matching static 13598 bounds. 13599 (Resolve_Logical_Op): issue an error in formal mode on logical operators 13600 for array types with non-matching static bounds. Factorize the code in 13601 Matching_Static_Array_Bounds. 13602 (Resolve_Qualified_Expression): issue an error in formal mode on 13603 qualified expressions for array types with non-matching static bounds. 13604 (Resolve_Type_Conversion): issue an error in formal mode on type 13605 conversion for array types with non-matching static bounds 13606 136072011-08-02 Robert Dewar <dewar@adacore.com> 13608 13609 * par-ch10.adb: Minor code reorganization (use Nkind_In). 13610 136112011-08-02 Ed Schonberg <schonberg@adacore.com> 13612 13613 * par-ch9.adb: save location of entry for proper error message. 13614 136152011-08-02 Javier Miranda <miranda@adacore.com> 13616 13617 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal 13618 (Use_Full_View) which permits this routine to climb through the 13619 ancestors using the full-view of private parents. 13620 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set 13621 Use_Full_View to true in calls to Is_Ancestor. 13622 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to 13623 true in call to Is_Ancestor. 13624 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set 13625 Use_Full_View to true in call to Is_Ancestor. 13626 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in 13627 call to Is_Ancestor. 13628 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set 13629 Use_Full_View to true in calls to Is_Ancestor. 13630 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT, 13631 Make_Select_Specific_Data_Table, Register_Primitive, 13632 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor. 13633 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View 13634 to true in call to Is_Ancestor. 13635 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set 13636 Use_Full_View to true in calls to Is_Ancestor. 13637 * exp_cg.adb 13638 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor. 13639 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor. 13640 136412011-08-02 Robert Dewar <dewar@adacore.com> 13642 13643 * gnat_rm.texi: Minor reformatting. 13644 * sem_prag.adb: Minor reformatting. 13645 136462011-08-02 Tristan Gingold <gingold@adacore.com> 13647 13648 * vms_data.ads: Add VMS qualifier for -gnateP. 13649 136502011-08-02 Robert Dewar <dewar@adacore.com> 13651 13652 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty 13653 * par-ch7.adb (P_Package): Proper placement of aspects for package 13654 decl/instantiation. 13655 * par-endh.adb (Check_End): Ad Is_Sloc parameter 13656 (End_Statements): Add Is_Sloc parameterr 13657 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty 13658 (Check_End): Ad Is_Sloc parameter 13659 (End_Statements): Add Is_Sloc parameterr 13660 136612011-08-02 Vincent Celier <celier@adacore.com> 13662 13663 * ug_words: Add VMS qualifier equivalent to -gnateP: 13664 /SYMBOL_PREPROCESSING. 13665 136662011-08-02 Jose Ruiz <ruiz@adacore.com> 13667 13668 * gnat-style.texi: For hexadecimal numeric literals the typical 13669 grouping of digits is 4 to represent 2 bytes. 13670 A procedure spec which is split into several lines is indented two 13671 characters. 13672 136732011-08-02 Yannick Moy <moy@adacore.com> 13674 13675 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit. 13676 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here 13677 (Resolve_Aggregate): issue errors in formal modes when aggregate is not 13678 properly qualified 13679 (Resolve_Array_Aggregate): issue errors in formal modes on non-static 13680 choice in array aggregate 13681 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype 13682 mark as ancestor 13683 (Resolve_Record_Aggregate): issue errors in formal modes on mixed 13684 positional and named aggregate for record, or others in record 13685 aggregate, or multiple choice in record aggregate 13686 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when 13687 array operands to logical operations AND, OR and XOR do not have the 13688 same static lower and higher bounds 13689 * sem_ch5.adb, sinfo.ads: Correct typos in comments 13690 136912011-08-01 Robert Dewar <dewar@adacore.com> 13692 13693 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement): 13694 Replaces Last_Source_Node_In_Sequence. 13695 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K 13696 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores 13697 parens and blank in string (this was inconsistently implemented). 13698 * errout.ads 13699 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and 13700 blank in string (this was inconsistently implemented). 13701 * gnat1drv.adb 13702 (Set_Global_Switches): Set formal mode switches appropriately 13703 * opt.ads, opt.adb: Formal mode is now global switches, more consistent 13704 * par-prag.adb 13705 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and 13706 call Set_Error_Msg_Lang to set "spark" as language name. 13707 * par.adb: Remove unnecessary call to set formal language for errout 13708 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches 13709 appropriately and call Set_Error_Msg_Lang to set "spark" as language 13710 name. 13711 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and 13712 calls to it, moved after resolution so that types are known 13713 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if 13714 result of concatenation is not of type String 13715 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of 13716 concatenation is not properly restricted 13717 * gnat_rm.texi: Add doc on pragma Spark_95. 13718 * gcc-interface/Makefile.in: Remove obsolete target pairs for 13719 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads. 13720 * gcc-interface/Make-lang.in: Update dependencies. 13721 137222011-08-01 Javier Miranda <miranda@adacore.com> 13723 13724 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of 13725 condition that detects if the overridden operation must replace an 13726 existing entity. 13727 137282011-08-01 Javier Miranda <miranda@adacore.com> 13729 13730 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded 13731 code declarations inserted by Insert_Actions in each alternative of the 13732 N_Case_Expression node. 13733 137342011-08-01 Robert Dewar <dewar@adacore.com> 13735 13736 * sem_ch6.adb: Minor code reorganization. 13737 * sem_util.adb: Minor reformatting. 13738 137392011-08-01 Pascal Obry <obry@adacore.com> 13740 13741 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path. 13742 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource. 13743 137442011-08-01 Yannick Moy <moy@adacore.com> 13745 13746 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character 13747 literal or operator symbol which is prefixed 13748 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal 13749 mode on access attributes. 13750 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check 13751 that concatenation operands are properly restricted in formal mode 13752 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure 13753 Analyze_Concatenation_Operand. Issue an error in formal mode if the 13754 result of the concatenation has a type different from String. 13755 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference, 13756 Analyze_Quantified_Expression, Analyze_Slice, 13757 Analyze_Null): issue an error in formal mode on unsupported constructs 13758 * sem_ch5.adb 13759 (Analyze_Block_Statement): only issue error on source block statement 13760 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new 13761 function which returns the last node in a list of nodes for which 13762 Comes_From_Source returns True, if any 13763 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use 13764 Last_Source_Node_In_Sequence 13765 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming, 13766 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal 13767 mode on unsupported constructs 13768 * sem_ch9.adb Do not return after issuing error in formal mode, as the 13769 rest of the actions may be needed later on since the error is marked as 13770 not serious. 13771 * sinfo.ads: Typos in comments. 13772 137732011-08-01 Pascal Obry <obry@adacore.com> 13774 13775 * projects.texi: Minor editing. 13776 137772011-08-01 Yannick Moy <moy@adacore.com> 13778 13779 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for 13780 insertion character ~~ 13781 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures 13782 (Set_Error_Msg_Lang): new procedure which fixes the language for use 13783 with insertion character ~~ 13784 (Set_Msg_Text): treat insertion character ~~ 13785 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb, 13786 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to 13787 Formal_Error_Msg_... procedures by equivalent Error_Msg_... 13788 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make 13789 errors related to the formal language restriction not serious 13790 (insertion character |). 13791 * par.adb (Par): set formal language for error messages if needed 13792 * sem_ch6.adb (Check_Missing_Return): take into account possible 13793 generated statements at the end of the function 13794 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and 13795 enumeration value to define a new pragma SPARK_95 13796 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default, 13797 SPARK_Version): new type and variables to store the SPARK version 13798 (none by default). 13799 (SPARK_Mode): return True when SPARK_Version is set 13800 * par-prag.adb: Correct indentation 13801 (Prag): take Pragma_SPARK_95 into account 13802 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95 13803 into account. 13804 138052011-08-01 Robert Dewar <dewar@adacore.com> 13806 13807 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb, 13808 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb, 13809 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting 13810 138112011-08-01 Pascal Obry <obry@adacore.com> 13812 13813 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass 13814 Target_Name to Get_Path call. 13815 (Parse_Single_Project): Likewise. 13816 (Post_Parse_Context_Clause): Likewise. 13817 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter. 13818 Call Initialise_Project_Path with the proper Target_Name. 13819 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat 13820 search path. 13821 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path 13822 with the proper Target_Name. 13823 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to 13824 Part.Parse routine. 13825 (Parse_Project_And_Apply_Config): Likewise. 13826 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine. 13827 This is fine as this part of the code is supporting only native 13828 compilation. 13829 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This 13830 is fine as this part of the code is supporting only native compilation. 13831 138322011-08-01 Yannick Moy <moy@adacore.com> 13833 13834 * sem_util.adb (Enter_Name): issue error in formal mode on declaration 13835 of homonym, unless the homonym is one of the cases allowed in SPARK 13836 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for 13837 package declaration occurring after a body. 13838 138392011-08-01 Robert Dewar <dewar@adacore.com> 13840 13841 * checks.adb, exp_ch4.adb: Minor reformatting. 13842 138432011-08-01 Javier Miranda <miranda@adacore.com> 13844 13845 * einfo.ads (Access_Disp_Table): Fix documentation. 13846 (Dispatch_Table_Wrappers): Fix documentation. 13847 138482011-08-01 Pascal Obry <obry@adacore.com> 13849 13850 * prj-env.adb, prj-env.ads: Minor reformatting. 13851 138522011-08-01 Yannick Moy <moy@adacore.com> 13853 13854 * sem_util.ads, sem_util.adb, par.adb, par_util.adb 13855 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move 13856 procedures out of these packages. 13857 * errout.ads, errout.adb 13858 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move 13859 procedures in of this package 13860 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE 13861 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode 13862 on misplaced later vs initial declarations, like in Ada 83 13863 * sem_attr.adb (Processing for Analyze_Attribute): issue error in 13864 formal mode on attribute of private type whose full type declaration 13865 is not visible 13866 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a 13867 package declaration inside a package specification 13868 (Analyze_Full_Type_Declaration): issue error in formal mode on 13869 controlled type or discriminant type 13870 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on 13871 user-defined operator means that it should come from the source 13872 (New_Overloaded_Entity): issue error in formal mode on overloaded 13873 entity. 13874 * sem_ch6.ads, sem_ch13.ads: typos in comments. 13875 138762011-08-01 Thomas Quinot <quinot@adacore.com> 13877 13878 * atree.adb: Minor reformatting. 13879 * checks.adb: Minor reformatting. 13880 138812011-08-01 Vincent Celier <celier@adacore.com> 13882 13883 * s-parame-vms-ia64.ads: Fix typo in comment 13884 Minor reformatting 13885 * s-parame-vms-restrict.ads: Removed, unused. 13886 138872011-08-01 Javier Miranda <miranda@adacore.com> 13888 13889 * exp_ch3.adb 13890 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound. 13891 * sem_ch3.adb 13892 (Constrain_Index): Remove side effects in the evaluation of the bounds. 13893 * sem_ch3.ads, sem_ch3.adb 13894 (Is_Constant_Bound): New extended version of the subprogram that was 13895 previously located inside function Exp_Ch3.Is_Variable_Size_Array. 13896 Moved here since it is shared by routines of sem_ch3 and exp_ch3. 13897 * sem_aux.ads (Constant_Value): Fix typo in comment. 13898 * checks.adb (Generate_Index_Checks): New implementation which, for 13899 array objects with constant bounds, generates the runtime check 13900 referencing the bounds of the array type. For other cases this routine 13901 provides its previous behavior obtaining such values from the array 13902 object. 13903 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its 13904 parent type. 13905 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since 13906 we cannot have semantic interpretations of the new node. 13907 139082011-08-01 Ed Schonberg <schonberg@adacore.com> 13909 13910 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified 13911 expressions. 13912 139132011-08-01 Arnaud Charlet <charlet@adacore.com> 13914 13915 * sem_ch8.adb: Minor code editing. 13916 * s-vxwext.adb: Remove trailing space. 13917 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for 13918 consistency with other files. 13919 139202011-08-01 Thomas Quinot <quinot@adacore.com> 13921 13922 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting. 13923 139242011-08-01 Ed Schonberg <schonberg@adacore.com> 13925 13926 * par-ch10.adb: reject parameterized expressions as compilation unit. 13927 * sem_ch4.adb: handle properly conditional expression with overloaded 13928 then_clause and no else_clause. 13929 139302011-08-01 Tristan Gingold <gingold@adacore.com> 13931 13932 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address 13933 like done by System.Aux_DEC. 13934 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table. 13935 139362011-08-01 Yannick Moy <moy@adacore.com> 13937 13938 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for 13939 missing label at end of declaration (subprogram or package) 13940 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing 13941 of positional and named parameter association 13942 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on 13943 Error_Msg_SP which adds a prefix to the error message giving the name 13944 of the formal language analyzed 13945 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for 13946 access result type in subprogram, unconstrained array as result type,. 13947 (Analyze_Subprogram_Declaration): issue an error in formal mode for null 13948 procedure 13949 * sem_ch8.adb: Code clean up. 13950 139512011-08-01 Javier Miranda <miranda@adacore.com> 13952 13953 * sem_ch7.adb (Uninstall_Declarations): Remove useless code. 13954 * einfo.ads (Access_Disp_Table): Fix documentation. 13955 (Dispatch_Table_Wrappers): Fix documentation. 13956 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers, 13957 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions 13958 to enforce the documentation of this attribute. 13959 (Set_Is_Interface): Cleanup the assertion. 13960 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate 13961 the Underlying_Type entity before reading attribute Access_Disp_Table. 13962 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion): 13963 Locate the Underlying_Type before reading attribute Access_Disp_Table. 13964 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate 13965 the Underlying_Type entity before reading attribute Access_Disp_Table. 13966 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration): 13967 Locate the Underlying_Type entity before reading attribute 13968 Access_Disp_Table. 13969 139702011-08-01 Ed Schonberg <schonberg@adacore.com> 13971 13972 * s-poosiz.ads: Additional overriding indicators. 13973 139742011-08-01 Yannick Moy <moy@adacore.com> 13975 13976 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in 13977 formal mode. 13978 (Analyze_Iteration_Scheme): issue error in formal mode when loop 13979 parameter specification does not include a subtype mark. 13980 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in 13981 formal mode on abstract subprogram. 13982 (Analyze_Subprogram_Specification): issue error in formal mode on 13983 user-defined operator. 13984 (Process_Formals): issue error in formal mode on access parameter and 13985 default expression. 13986 * sem_ch9.adb (Analyze_Abort_Statement, 13987 Analyze_Accept_Statement, Analyze_Asynchronous_Select, 13988 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative, 13989 Analyze_Delay_Until, Analyze_Entry_Call_Alternative, 13990 Analyze_Requeue, Analyze_Selective_Accept, 13991 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs 13992 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error): 13993 issue error in formal mode on user-defined raise statement. 13994 139952011-08-01 Thomas Quinot <quinot@adacore.com> 13996 13997 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a 13998 declaration being hidden when overriding an implicit inherited 13999 subprogram. 14000 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode 14001 (-gnats), do not complain about a source file that contains only a 14002 pragma No_Body. 14003 140042011-08-01 Ed Schonberg <schonberg@adacore.com> 14005 14006 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop 14007 variable if already set. 14008 140092011-08-01 Arnaud Charlet <charlet@adacore.com> 14010 14011 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads, 14012 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads, 14013 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads, 14014 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb, 14015 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads, 14016 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads, 14017 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads, 14018 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb, 14019 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb, 14020 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads, 14021 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads, 14022 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb, 14023 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads, 14024 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads, 14025 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb, 14026 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb, 14027 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb, 14028 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb, 14029 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb, 14030 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb, 14031 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads, 14032 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads, 14033 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb, 14034 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads, 14035 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb, 14036 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads, 14037 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb, 14038 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb, 14039 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads, 14040 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads, 14041 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads, 14042 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads, 14043 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb, 14044 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb, 14045 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads, 14046 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb, 14047 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads, 14048 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads, 14049 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb, 14050 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, 14051 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads, 14052 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads, 14053 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads, 14054 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb, 14055 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb, 14056 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb, 14057 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb, 14058 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb, 14059 s-osinte-mingw.ads: Update to GPLv3 run-time license. 14060 Use GNAT instead of GNARL. 14061 140622011-08-01 Bob Duff <duff@adacore.com> 14063 14064 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads, 14065 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads, 14066 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor 14067 reformatting. 14068 140692011-08-01 Yannick Moy <moy@adacore.com> 14070 14071 * debug.adb (d.D) reverve flag for the SPARK mode 14072 (d.E) reverve flag for SPARK generation mode 14073 (d.F) reverve flag for Why generation mode 14074 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode, 14075 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New 14076 functions which return True when the corresponding modes are set 14077 (Formal_Language): return "spark" or "alfa" when in formal verification 14078 mode. 14079 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on 14080 Error_Msg to prefix the error message with a tag giving the formal 14081 language 14082 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error 14083 message with a tag giving the formal language 14084 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on 14085 block statement 14086 (Analyze_Case_Statement): issue error in formal mode on case statement 14087 with a single "others" case alternative 14088 (Analyze_Exit_Statement): issue errors in formal mode on exit 14089 statements which do not respect SPARK restrictions 14090 (Analyze_Goto_Statement): issue error in formal mode on goto statement 14091 (Check_Unreachable_Code): always issue an error (not a warning) in 14092 formal mode on unreachable code (concerns both code after an infinite 14093 loop and after an unconditional jump, both not allowed in SPARK) 14094 * sem_ch6.adb (Analyze_Return_Statement): add call to 14095 Set_Return_Present for a procedure containing a return statement 14096 (already done for functions in Analyze_Function_Return) 14097 (Analyze_Function_Return): issue error in formal mode on extended 14098 return or if return is not last statement in function 14099 (Check_Missing_Return): issue error in formal mode if function does 14100 not end with return or if procedure contains a return 14101 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new 14102 function to detect if there is an inner scope of its parameter S which 14103 is a loop. 14104 141052011-08-01 Thomas Quinot <quinot@adacore.com> 14106 14107 * sem_ch6.ads: Minor reformatting. 14108 141092011-08-01 Javier Miranda <miranda@adacore.com> 14110 14111 * sem_util.adb (Abstract_Interface_List): Complete condition when 14112 processing private type declarations to avoid reading unavailable 14113 attribute. 14114 (Is_Synchronized_Tagged_Type): Complete condition when processing 14115 private extension declaration nodes to avoid reading unavailable 14116 attribute. 14117 141182011-08-01 Thomas Quinot <quinot@adacore.com> 14119 14120 * sem_ch3.adb: Minor reformatting. 14121 141222011-08-01 Thomas Quinot <quinot@adacore.com> 14123 14124 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads, 14125 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads, 14126 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads, 14127 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages 14128 for VMS, instead parametrize the common implementation with 14129 System.Parameters declarations. 14130 141312011-08-01 Eric Botcazou <ebotcazou@adacore.com> 14132 14133 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing. 14134 141352011-08-01 Tristan Gingold <gingold@adacore.com> 14136 14137 * seh_init.c: Fix SEH handler installation on win64. 14138 141392011-08-01 Ed Schonberg <schonberg@adacore.com> 14140 14141 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent 14142 double analysis of an anonymous access to subprogram, because it can 14143 lead to improper sharing of profiles and a back-end crash. 14144 141452011-08-01 Robert Dewar <dewar@adacore.com> 14146 14147 * make.adb, sem_ch4.adb: Minor reformatting. 14148 * gcc-interface/Make-lang.in: Update dependencies. 14149 * sem_util.adb, exp_ch5.adb: Minor reformatting. 14150 141512011-08-01 Arnaud Charlet <charlet@adacore.com> 14152 14153 * gnat_rm.texi: Fix definition of Long_Integer. 14154 141552011-08-01 Ed Schonberg <schonberg@adacore.com> 14156 14157 * exp_aggr.adb: check limit size of static aggregate unconditionally, 14158 to prevent storage exhaustion. 14159 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being 14160 finalized is a function body, insert the cleanup code before the final 14161 return statement, to prevent spurious warnings. 14162 * s-pooglo.ads: add overriding indicator. 14163 141642011-08-01 Ed Schonberg <schonberg@adacore.com> 14165 14166 * sem_ch4.adb (Operator_Check): improve error message when both a 14167 with_clause and a use_clause are needed to make operator usage legal. 14168 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to 14169 determine whether a compilation unit is visible within an other, 14170 either through a with_clause in the current unit, or a with_clause in 14171 its library unit or one one of its parents. 14172 141732011-08-01 Ed Schonberg <schonberg@adacore.com> 14174 14175 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator 14176 over an arbitrary expression of an array or container type. 14177 * lib-xref.adb: clarify comment. 14178 141792011-08-01 Bob Duff <duff@adacore.com> 14180 14181 * einfo.ads: Minor reformatting. 14182 * debug.adb: Minor comment improvement. 14183 141842011-08-01 Javier Miranda <miranda@adacore.com> 14185 14186 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not 14187 consider hidden subprograms as valid candidates. 14188 141892011-08-01 Arnaud Charlet <charlet@adacore.com> 14190 14191 * make.adb (Compile): Strip -mxxx switches in CodePeer mode. 14192 141932011-08-01 Vasiliy Fofanov <fofanov@adacore.com> 14194 14195 * gnat_ugn.texi: Fix typo. 14196 141972011-08-01 Robert Dewar <dewar@adacore.com> 14198 14199 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb, 14200 lib-xref.adb: Minor reformatting 14201 142022011-08-01 Gary Dismukes <dismukes@adacore.com> 14203 14204 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of 14205 when to generate a call to Move_Final_List. 14206 (Has_Controlled_Parts): Remove this function. 14207 142082011-08-01 Geert Bosch <bosch@adacore.com> 14209 14210 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra 14211 "," in choice list. 14212 142132011-08-01 Thomas Quinot <quinot@adacore.com> 14214 14215 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for 14216 explicit raise of a predefined exception as Comes_From_Source if the 14217 original N_Raise_Statement comes from source. 14218 142192011-08-01 Robert Dewar <dewar@adacore.com> 14220 14221 * sinfo.ads: Add comment. 14222 * sem_ch6.adb: Minor reformatting. 14223 142242011-08-01 Robert Dewar <dewar@adacore.com> 14225 14226 * freeze.adb (Freeze_Entity): Refine check for bad component size 14227 clause to avoid rejecting confirming clause when atomic/aliased present. 14228 142292011-08-01 Ed Schonberg <schonberg@adacore.com> 14230 14231 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to 14232 better determine whether an entity reference is a write. 14233 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a 14234 subcomponent. 14235 * lib-xref.adb (Output_References): Do no suppress a read reference at 14236 the same location as an immediately preceeding modify-reference, to 14237 handle properly in-out actuals. 14238 142392011-08-01 Tristan Gingold <gingold@adacore.com> 14240 14241 * env.c (__gnat_setenv) [VMS]: Refine previous change. 14242 142432011-08-01 Quentin Ochem <ochem@adacore.com> 14244 14245 * i-cstrin.adb (New_String): Changed implementation, now uses only the 14246 heap to compute the result. 14247 142482011-08-01 Robert Dewar <dewar@adacore.com> 14249 14250 * atree.ads: Minor reformatting. 14251 142522011-08-01 Emmanuel Briot <briot@adacore.com> 14253 14254 * g-expect.adb (Get_Command_Output): Fix memory leak. 14255 142562011-08-01 Geert Bosch <bosch@adacore.com> 14257 14258 * cstand.adb (P_Float_Type): New procedure to print the definition of 14259 predefined fpt types. 14260 (P_Mixed_Name): New procedure to print a name using mixed case 14261 (Print_Standard): Use P_Float_Type for printing floating point types 14262 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad 14263 precision IEEE float. 14264 142652011-08-01 Thomas Quinot <quinot@adacore.com> 14266 14267 * sem_ch3.adb: Minor reformatting. 14268 142692011-08-01 Ed Schonberg <schonberg@adacore.com> 14270 14271 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is 14272 the completion of a generic function, insert the new body rather than 14273 rewriting the original. 14274 142752011-08-01 Yannick Moy <moy@adacore.com> 14276 14277 * sinfo.ads, errout.ads: Typos in comments. 14278 142792011-08-01 Robert Dewar <dewar@adacore.com> 14280 14281 * par-endh.adb: Minor reformatting. 14282 142832011-08-01 Robert Dewar <dewar@adacore.com> 14284 14285 * aspects.ads, aspects.adb: Add aspects for library unit pragmas 14286 (Pre_Post_Aspects): New subtype. 14287 * par-ch12.adb (P_Generic): New syntax for aspects in packages 14288 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter 14289 * par-ch7.adb (P_Package): Remove Decl parameter 14290 (P_Package): Handle new syntax for aspects (before IS) 14291 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle 14292 new aspect syntax 14293 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax 14294 * par.adb (P_Aspect_Specifications): Add Semicolon parameter 14295 (P_Package): Remove Decl parameter 14296 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit 14297 aspects 14298 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect 14299 specs 14300 * sem_util.ads, sem_util.adb (Static_Boolean): New function 14301 * sinfo.ads: Document new syntax for aspects in packages etc. 14302 * sprint.adb: Handle new syntax of aspects before IS in package 14303 143042011-08-01 Thomas Quinot <quinot@adacore.com> 14305 14306 * atree.ads: Minor reformatting. 14307 * sem_prag.adb: Minor reformatting. 14308 143092011-08-01 Robert Dewar <dewar@adacore.com> 14310 14311 * exp_util.adb (Insert_Actions): Fix error in handling Actions for 14312 case expr alternative. 14313 143142011-08-01 Ed Schonberg <schonberg@adacore.com> 14315 14316 * sem_ch12.adb: Fix typo. 14317 143182011-08-01 Geert Bosch <bosch@adacore.com> 14319 14320 * sem_prag.adb (Check_No_Link_Name): New procedure. 14321 (Process_Import_Or_Interface): Use Check_No_Link_Name. 14322 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float) 14323 instead of Standard_Long_Long_Float_Size global. Preparation for 14324 eventual removal of per type constants. 14325 * exp_util.ads (Get_Stream_Size): New function returning the stream 14326 size value of subtype E. 14327 * exp_util.adb (Get_Stream_Size): Implement new function. 14328 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size 14329 function. 14330 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size 14331 * einfo.adb: 14332 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats 14333 143342011-08-01 Geert Bosch <bosch@adacore.com> 14335 14336 * cstand.adb: Fix comments. 14337 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit 14338 count of arguments. 14339 143402011-08-01 Robert Dewar <dewar@adacore.com> 14341 14342 * exp_ch4.adb, sem_cat.adb: Minor reformatting. 14343 143442011-08-01 Geert Bosch <bosch@adacore.com> 14345 14346 * atree.ads: Fix comment. 14347 143482011-08-01 Robert Dewar <dewar@adacore.com> 14349 14350 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec. 14351 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name. 14352 * par.adb: Add with for Namet.Sp. 14353 * par-tchk.adb: Minor reformatting. 14354 143552011-08-01 Vincent Celier <celier@adacore.com> 14356 14357 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb 14358 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name 14359 of the init procedure of a SAL. 14360 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name): 14361 New procedure. 14362 143632011-08-01 Thomas Quinot <quinot@adacore.com> 14364 14365 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor 14366 reformatting. 14367 143682011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14369 14370 * adaint.c (__gnat_file_time_name_attr): Get rid of warning. 14371 143722011-08-01 Thomas Quinot <quinot@adacore.com> 14373 14374 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function 14375 conformant with its spec (return True only for types that have 14376 an overriding Initialize primitive operation that prevents them from 14377 having preelaborable initialization). 14378 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable 14379 initialization for controlled types in Ada 2005 or later mode. 14380 143812011-08-01 Robert Dewar <dewar@adacore.com> 14382 14383 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition, 14384 Postcondition. 14385 (Same_Aspect): New function. 14386 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect 14387 Type_Invariant, Precondition, Postcondition. 14388 * snames.ads-tmpl: Add Name_Type_Invariant. 14389 143902011-08-01 Robert Dewar <dewar@adacore.com> 14391 14392 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point 14393 here. 14394 (Freeze_All_Ent): Fix error in handling inherited aspects. 14395 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is 14396 already analyzed, but don't skip entire processing of a declaration, 14397 that's wrong in some cases of declarations being rewritten. 14398 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects. 14399 Don't delay for integer, string literals 14400 Treat predicates in usual manner for delay, remove special case code, 14401 not needed. 14402 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point 14403 (Build_Predicate_Function): Update saved expression in aspect 14404 (Build_Invariant_Procedure): Update saved expression in aspect 14405 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization 14406 of replacement of discriminant references if the reference is simple. 14407 144082011-08-01 Robert Dewar <dewar@adacore.com> 14409 14410 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate. 14411 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for 14412 Static_Predicate and Dynamic_Predicate. 14413 (Build_Predicate_Function): Add processing for Static_Predicate 14414 and Dynamic_Predicate. 14415 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag 14416 (From_Static_Predicate): New flag 14417 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate 14418 144192011-08-01 Robert Dewar <dewar@adacore.com> 14420 14421 * usage.adb: Documentation cleanup for Ada version modes in usage. 14422 * expander.adb: Minor reformatting. 14423 144242011-08-01 Robert Dewar <dewar@adacore.com> 14425 14426 * atree.ads: Minor comment fix. 14427 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads, 14428 a-witeio.ads, sem_prag.adb: Minor reformatting. 14429 144302011-08-01 Doug Rupp <rupp@adacore.com> 14431 14432 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure 14433 pointers. Use descrip.h header file for convenience. Add some 14434 comments. 14435 144362011-08-01 Robert Dewar <dewar@adacore.com> 14437 14438 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point 14439 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations 14440 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point): 14441 New procedure. 14442 (Check_Aspect_At_End_Of_Declarations): New procedure 14443 (Analye_Aspect_Specification): Minor changes for above procedures 14444 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect 14445 specification node as well. 14446 144472011-08-01 Pascal Obry <obry@adacore.com> 14448 14449 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special 14450 Windows files. Use GetFilesAttributes() in this case to check for file 14451 existence instead of returning with an error code. 14452 144532011-08-01 Vincent Celier <celier@adacore.com> 14454 14455 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when 14456 High is above Source length. 14457 144582011-08-01 Robert Dewar <dewar@adacore.com> 14459 14460 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment. 14461 144622011-08-01 Robert Dewar <dewar@adacore.com> 14463 14464 * aspects.ads (Boolean_Aspects): New subtype. 14465 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects 14466 for derived types in cases where the parent type and derived type have 14467 aspects. 14468 * freeze.adb (Freeze_Entity): Fix problems in handling derived type 14469 with aspects when parent type also has aspects. 14470 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate 14471 boolean expression at this point). 14472 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in 14473 accordance with final decision on the Ada 2012 feature. 14474 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag. 14475 144762011-08-01 Matthew Heaney <heaney@adacore.com> 14477 14478 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector. 14479 144802011-08-01 Pascal Obry <obry@adacore.com> 14481 14482 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: 14483 Fix Replace_Slice when High is above current string size. 14484 (Replace_Slice): Fix DL computation when High is above current 14485 string length. 14486 144872011-08-01 Gary Dismukes <dismukes@adacore.com> 14488 14489 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired. 14490 144912011-08-01 Matthew Heaney <heaney@adacore.com> 14492 14493 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child 14494 of node. 14495 144962011-08-01 Pascal Obry <obry@adacore.com> 14497 14498 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor 14499 reformatting. 14500 145012011-08-01 Ed Schonberg <schonberg@adacore.com> 14502 14503 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named 14504 access to protected subprograms in generic bodies. 14505 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a 14506 protected type, indicate that the convention of the subprogram is 14507 Convention_Protected, because it may be used in subsequent declarations 14508 within the protected declaration. 14509 145102011-08-01 Vincent Celier <celier@adacore.com> 14511 14512 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init" 14513 and "final" procedures when the name of the library is "ada", to avoid 14514 duplicate symbols "adainit" and "adafinal" in executables. 14515 145162011-08-01 Ed Schonberg <schonberg@adacore.com> 14517 14518 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a 14519 quantified expression that appears within a postcondition and uses the 14520 Ada2012 'Result attribute. 14521 145222011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 14523 14524 * init.c (__gnat_error_handler): Cast reason to int. 14525 (__gnat_install_handler): Explain sa_sigaction use. 14526 145272011-07-24 Eric Botcazou <ebotcazou@adacore.com> 14528 14529 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the 14530 subprogram has copy-in copy-out parameters, try to promote the mode of 14531 the return type if it is passed in registers. 14532 145332011-07-24 Eric Botcazou <ebotcazou@adacore.com> 14534 14535 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the 14536 left operand as addressable. 14537 145382011-07-24 Eric Botcazou <ebotcazou@adacore.com> 14539 14540 * gcc-interface/gigi.h (build_function_stub): Remove. 14541 (build_return_expr): Likewise. 14542 (convert_vms_descriptor): Declare. 14543 * gcc-interface/utils.c (convert_vms_descriptor): Make global. 14544 (build_function_stub): Move to... 14545 * gcc-interface/utils2.c (build_return_expr): Move to... 14546 * gcc-interface/trans.c (build_function_stub): ...here. 14547 (build_return_expr): ...here. 14548 (Subprogram_Body_to_gnu): Add local variable for language_function. 14549 Disconnect the parameter attributes cache, if any, once done with it. 14550 Call end_subprog_body only after setting the end_locus. 14551 Build the stub associated with the function, if any, at the very end. 14552 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local 14553 variables and streamline control flow. 14554 145552011-07-23 Arnaud Charlet <charlet@adacore.com> 14556 14557 PR ada/49819 14558 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to 14559 g-trasym-dwarf.adb. 14560 145612011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 14562 14563 PR bootstrap/49794 14564 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler): 14565 Assign to act.sa_sigaction. 14566 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast 14567 current->return_address to char * before arithmetic. 14568 145692011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 14570 14571 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation. 14572 Correct argument types. 14573 Extract code from reason. 14574 (__gnat_install_handler): Assign to act.sa_sigaction. 14575 145762011-07-21 Eric Botcazou <ebotcazou@adacore.com> 14577 14578 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to... 14579 (GNAT1_OBJS): ...here. 14580 145812011-07-15 Eric Botcazou <ebotcazou@adacore.com> 14582 14583 PR ada/48711 14584 * g-socthi-mingw.adb (Fill): Fix formatting. 14585 14586 * gcc-interface/gigi.h: Move around comment. 14587 145882011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 14589 14590 PR ada/46350 14591 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast. 14592 145932011-07-14 Florian Weimer <fw@deneb.enyo.de> 14594 14595 PR ada/48711 14596 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL. 14597 145982011-07-13 Eric Botcazou <ebotcazou@adacore.com> 14599 14600 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit 14601 range comparison if Pmode is SImode. 14602 146032011-07-12 Laurent GUERBY <laurent@guerby.net> 14604 Eric Botcazou <ebotcazou@adacore.com> 14605 14606 * adadecode.c: Wrap up in extern "C" block. 14607 * adadecode.h: Likewise. 14608 * adaint.c: Likewise. Remove 'const' keyword. 14609 * adaint.h: Likewise. 14610 * argv.c: Likewise. 14611 * atree.h: Likewise. 14612 * cio.c: Likewise. 14613 * cstreams.c: Likewise. 14614 * env.c: Likewise. 14615 * exit.c: Likewise. 14616 * fe.h: Likewise. 14617 * final.c: Likewise. 14618 * init.c: Likewise. 14619 * initialize.c: Likewise. 14620 * link.c: Likewise. 14621 * namet.h: Likewise. 14622 * nlists.h: Likewise. 14623 * raise.c: Likewise. 14624 * raise.h: Likewise. 14625 * repinfo.h: Likewise. 14626 * seh_init.c: Likewise. 14627 * targext.c: Likewise. 14628 * tracebak.c: Likewise. 14629 * uintp.h: Likewise. 14630 * urealp.h: Likewise. 14631 * xeinfo.adb: Wrap up generated C code in extern "C" block. 14632 * xsinfo.adb: Likewise. 14633 * xsnamest.adb: Likewise. 14634 * gcc-interface/gadaint.h: Wrap up in extern "C" block. 14635 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block. 14636 * gcc-interface/misc.c: Likewise. 14637 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER. 14638 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and 14639 ada/targext.o here... 14640 (GNAT_ADA_OBJS): ...and not here. 14641 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o. 14642 (GNATBIND_OBJS): Reorder. 14643 146442011-07-07 Richard Henderson <rth@redhat.com> 14645 14646 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call 14647 dwarf2out_frame_init. 14648 146492011-07-07 Eric Botcazou <ebotcazou@adacore.com> 14650 14651 * gcc-interface/misc.c (gnat_init): Tweak previous change. 14652 146532011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 14654 14655 PR target/39150 14656 * gcc-interface/Makefile.in: Handle x86_64-solaris2. 14657 146582011-07-06 Richard Guenther <rguenther@suse.de> 14659 14660 * gcc-interface/misc.c (gnat_init): Merge calls to 14661 build_common_tree_nodes and build_common_tree_nodes_2. 14662 Re-initialize boolean_false_node. 14663 146642011-07-02 Eric Botcazou <ebotcazou@adacore.com> 14665 Olivier Hainque <hainque@adacore.com> 14666 Nicolas Setton <setton@adacore.com> 14667 14668 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on 14669 the type according to the ARTIFICIAL_P parameter. 14670 (create_type_decl): Likewise. 14671 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1. 14672 146732011-07-01 Eric Botcazou <ebotcazou@adacore.com> 14674 14675 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command. 14676 (gnatbind): Likewise. 14677 146782011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 14679 14680 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL). 14681 146822011-06-18 Eric Botcazou <ebotcazou@adacore.com> 14683 14684 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE 14685 local variable throughout. Remove useless call to Base_Type. 14686 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout. 14687 Take it also into account for the volatileness of the field. Set the 14688 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings. 14689 146902011-06-18 Eric Botcazou <ebotcazou@adacore.com> 14691 14692 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP 14693 on a dereference built for a by-ref object if it has an address clause. 14694 146952011-06-18 Eric Botcazou <ebotcazou@adacore.com> 14696 14697 * einfo.ads (Address_Taken): Document use for the second argument of 14698 Asm_Input and Asm_Output attributes. 14699 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second 14700 argument is an entity name, then set Address_Taken on it. 14701 <Attribute_Asm_Output>: Likewise. 14702 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the 14703 Attr_Asm_Input and Attr_Asm_Output attributes explicitly. 14704 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in 14705 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL. 14706 147072011-06-16 Joern Rennecke <joern.rennecke@embecosm.com> 14708 14709 PR middle-end/46500 14710 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. 14711 147122011-06-14 Joseph Myers <joseph@codesourcery.com> 14713 14714 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o. 14715 (ada/utils.o): Update dependencies. 14716 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add 14717 ../../../libcpp/libcpp.a. 14718 * gcc-interface/utils.c: Include common/common-target.h. 14719 (process_attributes): Use targetm_common.have_named_sections. 14720 147212011-06-07 Richard Guenther <rguenther@suse.de> 14722 14723 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call 14724 set_sizetype. 14725 147262011-06-06 Eric Botcazou <ebotcazou@adacore.com> 14727 14728 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the 14729 TREE_THIS_NOTRAP flag. 14730 147312011-06-06 Eric Botcazou <ebotcazou@adacore.com> 14732 14733 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>: 14734 Fix thinko. 14735 147362011-06-06 Eric Botcazou <ebotcazou@adacore.com> 14737 14738 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred 14739 constants whose full view has discriminants specially. 14740 147412011-06-06 Eric Botcazou <ebotcazou@adacore.com> 14742 14743 * gcc-interface/utils.c: Include diagnostic.h. 14744 (gnat_write_global_declarations): Output debug information for all 14745 global type declarations before finalizing the compilation unit. 14746 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency. 14747 147482011-05-25 Jakub Jelinek <jakub@redhat.com> 14749 14750 * gcc-interface/utils.c (def_fn_type): Remove extra va_end. 14751 147522011-05-25 Kai Tietz <ktietz@redhat.com> 14753 14754 * adaint.c (__gnat_to_canonical_file_list_next): Use array 14755 initialization instead of const/none-const pointer assignment. 14756 147572011-05-24 Joseph Myers <joseph@codesourcery.com> 14758 14759 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include 14760 $(EXTRA_GNAT1_OBJS). 14761 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS). 14762 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove. 14763 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a. 14764 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use 14765 libcommon-target.a instead of prefix.o. 14766 147672011-05-21 Joseph Myers <joseph@codesourcery.com> 14768 14769 PR ada/49097 14770 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS). 14771 147722011-05-20 Joseph Myers <joseph@codesourcery.com> 14773 14774 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o. 14775 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a 14776 instead of version.o. 14777 147782011-05-18 Kai Tietz <ktietz@redhat.com> 14779 14780 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use 14781 boolean_false_node instead of integer_zero_node. 14782 (convert_with_check): Likewise. 14783 * gcc-interface/decl.c (choices_to_gnu): Likewise. 14784 147852011-05-12 Eric Botcazou <ebotcazou@adacore.com> 14786 14787 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the 14788 type of the parameter is an unconstrained array, convert the actual to 14789 the type of the formal in the In Out and Out cases as well. 14790 147912011-05-11 Nathan Froyd <froydnj@codesourcery.com> 14792 14793 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type; 14794 call build_function_type_array or build_varargs_function_type_array 14795 instead. 14796 (create_subprog_type): Don't call build_function_type; call 14797 build_function_type_vec instead. 14798 147992011-05-11 Nathan Froyd <froydnj@codesourcery.com> 14800 14801 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL. 14802 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL. 14803 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL. 14804 148052011-05-07 Eric Botcazou <ebotcazou@adacore.com> 14806 14807 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces. 14808 14809 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype. 14810 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify. 14811 148122011-05-05 Nathan Froyd <froydnj@codesourcery.com> 14813 14814 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label. 14815 148162011-05-05 Nathan Froyd <froydnj@codesourcery.com> 14817 14818 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators 14819 instead of accessing TYPE_ARG_TYPES directly. 14820 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise. 14821 148222011-05-05 Eric Botcazou <ebotcazou@adacore.com> 14823 14824 PR ada/48844 14825 * gcc-interface/gigi.h (get_variant_part): Declare. 14826 * gcc-interface/decl.c (get_variant_part): Make global. 14827 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the 14828 types have the same constant size, are record types and T1 has a 14829 variant part while T2 doesn't. 14830 148312011-05-05 Eric Botcazou <ebotcazou@adacore.com> 14832 14833 * gcc-interface/utils.c (begin_subprog_body): Do not call 14834 get_pending_sizes. 14835 (end_subprog_body): Likewise. 14836 148372011-05-04 Richard Guenther <rguenther@suse.de> 14838 14839 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to 14840 int_const_binop. 14841 (pos_to_constructor): Likewise. 14842 148432011-05-03 Nathan Froyd <froydnj@codesourcery.com> 14844 Eric Botcazou <ebotcazou@adacore.com> 14845 14846 * gcc-interface/trans.c (gigi): Call build_function_type_list instead 14847 of build_function_type. Adjust calls to... 14848 (build_raise_check): ...this. Do not take a void_tree parameter. 14849 Call build_function_type_list instead of build_function_type. 14850 Fix head comment and swap couple of conditional blocks. 14851 148522011-04-30 Eric Botcazou <ebotcazou@adacore.com> 14853 14854 * gnatvsn.ads (Library_Version): Bump to 4.7. 14855 (Current_Year): Bump to 2011. 14856 148572011-04-29 Michael Matz <matz@suse.de> 14858 14859 * gcc-interface/misc.c (gnat_handle_option): Set 14860 warn_maybe_uninitialized. 14861 148622011-04-23 Gerald Pfeifer <gerald@pfeifer.com> 14863 14864 * gnat_ugn.texi (Complexity Metrics Control): Update link to 14865 the Watson/McCabe paper. 14866 148672011-04-23 Jim Meyering <meyering@redhat.com> 14868 14869 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/ 14870 148712011-04-22 Eric Botcazou <ebotcazou@adacore.com> 14872 14873 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE 14874 onto the new type. 14875 148762011-04-22 Eric Botcazou <ebotcazou@adacore.com> 14877 14878 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG 14879 parameter. 14880 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set 14881 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly. 14882 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add 14883 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl. 14884 <all>: Do not set flags on the reused DECL node coming from an alias. 14885 Set DECL_IGNORED_P on the DECL node built for subprograms if they 14886 don't need debug info here... 14887 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here. 14888 (gigi): Adjust calls to create_subprog_decl. 14889 (build_raise_check): Likewise. 14890 (establish_gnat_vms_condition_handler): Likewise. 14891 (Compilation_Unit_to_gnu): Likewise. 14892 (gnat_to_gnu): Likewise. 14893 148942011-04-21 Eric Botcazou <ebotcazou@adacore.com> 14895 14896 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define. 14897 (NO_REORDER_ADAFLAGS): New variable. 14898 (EXTRA_GNATTOOLS): Always define. 14899 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h. 14900 Clean up and adjust list of files compiled with special options. 14901 * gcc-interface/Make-lang.in: Likewise. 14902 (ada/decl.o): Cosmetical change. 14903 (ada/misc.o): Remove dependency on $(PLUGIN_H). 14904 149052011-04-20 Jim Meyering <meyering@redhat.com> 14906 14907 * initialize.c (__gnat_initialize): Remove useless if-before-free. 14908 149092011-04-17 Eric Botcazou <ebotcazou@adacore.com> 14910 14911 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with 14912 $(CFLAGS) on the link line. 14913 149142011-04-17 Eric Botcazou <ebotcazou@adacore.com> 14915 14916 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the 14917 padded type built for the return type if it is unconstrained. 14918 149192011-04-14 Nathan Froyd <froydnj@codesourcery.com> 14920 14921 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon. 14922 149232011-04-12 Nathan Froyd <froydnj@codesourcery.com> 14924 14925 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON 14926 before calling TREE_CHAIN. 14927 * gcc-interface/misc.c (gnat_init_ts): New function. 14928 (LANG_HOOKS_INIT_TS): Define. 14929 149302011-04-12 Martin Jambor <mjambor@suse.cz> 14931 14932 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node 14933 instead of cgraph_node. 14934 149352011-04-08 Eric Botcazou <ebotcazou@adacore.com> 14936 14937 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum 14938 alignment on fields of the RETURN type built for the Copy-In Copy-Out 14939 mechanism. 14940 149412011-04-08 Eric Botcazou <ebotcazou@adacore.com> 14942 14943 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers 14944 of aggregate types that contain a placeholder. 14945 149462011-04-08 Nathan Froyd <froydnj@codesourcery.com> 14947 14948 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use 14949 TYPE_ARG_TYPES. 14950 (handle_type_generic_attribute): Likewise. 14951 149522011-04-04 Eric Botcazou <ebotcazou@adacore.com> 14953 14954 PR ada/47163 14955 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change. 14956 149572011-04-04 Kai Tietz <ktietz@redhat.com> 14958 14959 PR ada/47163 14960 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets 14961 to flag value. 14962 149632011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14964 14965 * gcc-interface/utils2.c (build_allocator): In the unconstrained array 14966 type case, do not strip a padding type around the array type. 14967 149682011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14969 14970 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer 14971 types. 14972 149732011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14974 14975 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete. 14976 * gcc-interface/misc.c (gnat_handle_option): Remove special handling 14977 code for -feliminate-unused-debug-types. 14978 (gnat_post_options): Likewise. 14979 149802011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14981 14982 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial 14983 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a 14984 distinct copy. 14985 149862011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14987 14988 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the 14989 DECL_ARTIFICIAL flag on enumeration types. 14990 149912011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14992 14993 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make 14994 fat pointer types artificial unconditionally. 14995 <E_Array_Subtype>: Attach the base array type as a parallel type if it 14996 isn't artificial. 14997 149982011-04-02 Eric Botcazou <ebotcazou@adacore.com> 14999 15000 * gcc-interface/gigi.h (get_dummy_type): Declare. 15001 (build_dummy_unc_pointer_types): Likewise. 15002 (finish_fat_pointer_type): Likewise. 15003 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy 15004 fat pointer type has been built, complete it in place. 15005 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat 15006 and thin pointers. Remove useless variable. 15007 (finish_fat_pointer_type): Make global and move to... 15008 * gcc-interface/utils.c (finish_fat_pointer_type): ...here. 15009 (get_dummy_type): New function. 15010 (build_dummy_unc_pointer_types): Likewise. 15011 (gnat_pushdecl): Propage the name to the anonymous variants only. 15012 (update_pointer_to): Only adjust the pointer types in the unconstrained 15013 array case. 15014 150152011-04-02 Eric Botcazou <ebotcazou@adacore.com> 15016 15017 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag. 15018 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it 15019 if this is a Taft amendment type and the full declaration is available. 15020 * gcc-interface/trans.c (process_type): Likewise. 15021 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P. 15022 (process_freeze_entity): Likewise. 15023 * gcc-interface/utils.c (dummy_global): New static variable. 15024 (gnat_write_global_declarations): If there are types declared as used 15025 at the global level, insert them in the global hash table. 15026 150272011-04-02 Eric Botcazou <ebotcazou@adacore.com> 15028 15029 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param. 15030 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial 15031 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct 15032 copy. 15033 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL 15034 flag of the type accordingly. 15035 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type. 15036 150372011-04-02 Eric Botcazou <ebotcazou@adacore.com> 15038 15039 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer 15040 finalizing types when updating the pointers to the designated type. 15041 <all>: Finalize the deferred types even if we didn't defer processing 15042 of incomplete types in this invocation. 15043 150442011-04-01 Olivier Hainque <hainque@adacore.com> 15045 Nicolas Setton <setton@adacore.com> 15046 Eric Botcazou <ebotcazou@adacore.com> 15047 15048 * gcc-interface/misc.c (gnat_descriptive_type): New function. 15049 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type. 15050 150512011-03-28 Kai Tietz <ktietz@redhat.com> 15052 15053 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native 15054 Windows targets. 15055 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets. 15056 * system-mingw.ads (System): Change ZCX_By_Default default to True. 15057 15058 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype. 15059 150602011-03-28 Tristan Gingold <gingold@adacore.com> 15061 15062 PR ada/44431 15063 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c. 15064 Use ada output of gnatbind. 15065 (ada/b_gnatb.adb): Ditto. 15066 (ada/b_gnat1.o, ada/b_gnatb.o): New rules. 15067 (ada.mostlyclean, ada.stage1) 15068 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile) 15069 (ada.stagefeedback): Adjust. 15070 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c. 15071 Use ada output of gnatbind. 15072 (b_gnatm.adb): Ditto. 15073 (b_gnatl.o, b_gnatm.o): New rules. 15074 150752011-03-26 Eric Botcazou <ebotcazou@adacore.com> 15076 15077 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL 15078 for the padded type built to support a specified size or alignment. 15079 150802011-03-26 Eric Botcazou <ebotcazou@adacore.com> 15081 15082 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment. 15083 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer 15084 unconditionally to the end of the unit when the designated type is 15085 limited_with'ed. 15086 <all>: Rename local variable. Attempt to un-defer types only and do it 15087 for limited_with'ed types as well. 15088 (finalize_from_with_types): Adjust comment. Rename variable and tidy. 15089 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT 15090 consistently and remove redundant call to finalize_from_with_types. 15091 150922011-03-26 Eric Botcazou <ebotcazou@adacore.com> 15093 15094 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to 15095 subprograms without a previous spec declared in the same unit. 15096 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined 15097 subprograms at the end of the unit instead of at the beginning. 15098 * gcc-interface/utils.c (create_subprog_decl): Check that the entity 15099 isn't public for the special handling of non-inline functions nested 15100 inside inline external functions. 15101 151022011-03-25 Jeff Law <law@redhat.com> 15103 15104 * gcc-interface/utils.c (def_fn_type): Add missing va_end. 15105 151062011-03-24 Eric Botcazou <ebotcazou@adacore.com> 15107 15108 * einfo.ads (Size_Depends_On_Discriminant): Adjust description. 15109 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure 15110 to compute Set_Size_Depends_On_Discriminant. 15111 (Layout_Type): Call it on array types in back-end layout mode. 15112 * sem_util.adb (Requires_Transient_Scope): Return true for array 15113 types only if the size depends on the value of discriminants. 15114 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS 15115 type if the RHS is a call to a function that returns an unconstrained 15116 type with default discriminant. 15117 151182011-03-24 Eric Botcazou <ebotcazou@adacore.com> 15119 15120 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of 15121 non-conversion to the nominal result type at the end. 15122 151232011-03-23 Eric Botcazou <ebotcazou@adacore.com> 15124 15125 * gcc-interface/trans.c (create_temporary): New function taken from... 15126 (create_init_temporary): ...here. Call it. 15127 (call_to_gnu): Create the temporary for the return value early, if any. 15128 Create it for a function with copy-in/copy-out parameters if there is 15129 no target; in other cases of copy-in/copy-out, use another temporary. 15130 Push the new binding level lazily. Add and rename local variables. 15131 151322011-03-23 Eric Botcazou <ebotcazou@adacore.com> 15133 15134 * gcc-interface/decl.c (validate_size): Improve comments and tweak 15135 error message. 15136 (set_rm_size): Likewise. 15137 151382011-03-23 Eric Botcazou <ebotcazou@adacore.com> 15139 15140 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL 15141 for the padded type built in order to support a specified alignment. 15142 Fix incorrect formatting. 15143 151442011-03-21 Eric Botcazou <ebotcazou@adacore.com> 15145 15146 PR bootstrap/48216 15147 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL. 15148 151492011-03-21 Eric Botcazou <ebotcazou@adacore.com> 15150 15151 * gcc-interface/decl.c (components_to_record): Add REORDER parameter, 15152 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter 15153 to the end of the list. Adjust recursive call. Rename local variable. 15154 If REORDER is true, reorder components of the record type. 15155 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to 15156 components_to_record and adjust the parameter list. 15157 151582011-03-21 Eric Botcazou <ebotcazou@adacore.com> 15159 15160 * gcc-interface/decl.c (elaborate_expression_1): When optimization is 15161 disabled, use the variable for bounds of loop iteration scheme. 15162 151632011-03-21 Kai Tietz <ktietz@redhat.com> 15164 15165 PR target/12171 15166 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column. 15167 151682011-03-17 Eric Botcazou <ebotcazou@adacore.com> 15169 15170 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find 15171 out whether the expression is read-only. Short-circuit placeholder 15172 case and rename a couple of local variables. 15173 151742011-03-17 Eric Botcazou <ebotcazou@adacore.com> 15175 15176 * gcc-interface/gigi.h (smaller_form_type_p): Declare. 15177 * gcc-interface/trans.c (smaller_form_type_p): Make global and move... 15178 * gcc-interface/utils.c (smaller_form_type_p): ...to here. 15179 (convert): Deal with conversions from a smaller form type specially. 15180 151812011-02-14 Eric Botcazou <ebotcazou@adacore.com> 15182 15183 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and 15184 its argument, except for the special -I- switch. 15185 151862011-02-12 Gerald Pfeifer <gerald@pfeifer.com> 15187 15188 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to 15189 "Ada Issues". 15190 151912011-02-08 Eric Botcazou <ebotcazou@adacore.com> 15192 15193 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs. 15194 151952011-02-03 Eric Botcazou <ebotcazou@adacore.com> 15196 15197 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of 15198 GNAT_FORMAL. 15199 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to... 15200 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE 15201 instead of GNAT_FORMAL. Protect the expression against multiple uses. 15202 Do not generate the check directly, instead instantiate the template 15203 check present in the descriptor. 15204 (make_descriptor_field): Move around. 15205 (build_vms_descriptor32): Build a template check in the POINTER field. 15206 (build_vms_descriptor): Remove useless suffixes. 15207 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call. 15208 152092011-01-26 Eric Botcazou <ebotcazou@adacore.com> 15210 15211 PR bootstrap/47467 15212 * targext.c: Include target files if IN_RTS is defined. 15213 152142011-01-26 Richard Guenther <rguenther@suse.de> 15215 15216 PR bootstrap/47467 15217 * targext.c: Include config.h. 15218 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H) 15219 dependency. 15220 152212011-01-04 Pascal Obry <obry@adacore.com> 15222 Eric Botcazou <ebotcazou@adacore.com> 15223 15224 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit. 15225 152262011-01-04 Eric Botcazou <ebotcazou@adacore.com> 15227 15228 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the 15229 end-of-case on the end label and its associated gotos, if any. 15230 152312011-01-04 Eric Botcazou <ebotcazou@adacore.com> 15232 15233 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the 15234 expressions of the parameter cache within the statement group of 15235 the CICO mechanism. 15236 152372011-01-04 Olivier Hainque <hainque@adacore.com> 15238 Eric Botcazou <ebotcazou@adacore.com> 15239 15240 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default. 15241 (set_end_locus_from_node): New function. 15242 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we 15243 make and the function end_locus. 15244 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus 15245 for the elaboration subprogram. 15246 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to 15247 set the end_locus of the expression as well. 15248 152492011-01-04 Eric Botcazou <ebotcazou@adacore.com> 15250 15251 PR ada/47131 15252 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make 15253 variables that are referenced in exception handlers volatile. 15254 15255 15256 15257Copyright (C) 2011 Free Software Foundation, Inc. 15258 15259Copying and distribution of this file, with or without modification, 15260are permitted in any medium without royalty provided the copyright 15261notice and this notice are preserved. 15262