1 2007-09-07 Janis Johnson <janis187@us.ibm.com>
3 Reapply reverted change:
5 2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
7 * trans.c (convert_with_check): Update call to real_2expN.
9 2007-09-06 Janis Johnson <janis187@us.ibm.com>
13 2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
15 * trans.c (convert_with_check): Update call to real_2expN.
17 2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
19 * trans.c (convert_with_check): Update call to real_2expN.
21 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
23 * trans.c (Compilation_unit_to_gnu): Use set_cfun.
24 * utils.c (end_subprog_body): Likewise.
26 2007-09-03 Nick Clifton <nickc@redhat.com>
28 * Make-lang.in: Change copyright header to refer to version 3 of
29 the GNU General Public License and to point readers at the
30 COPYING3 file and the FSF's license web page.
31 * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
32 Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
33 namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
34 treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
37 2007-08-31 Vincent Celier <celier@adacore.com>
41 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
42 gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
43 (Check_Version_And_Help): New procedure in package Switch to process
44 switches --version and --help.
45 Use Check_Version_And_Help in GNAT tools
48 (Compile_Sources): Make sure that sources that are "excluded" are not
50 (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
52 (Version_Switch): Remove, moved to Switch
53 (Help_Switch): Remove, moved to Switch
54 (Display_Version): Remove, moved to Switch
56 * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
57 package Switch to process switches --version and --help.
58 (Display_Version): New procedure
60 * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
62 2007-08-31 Javier Miranda <miranda@adacore.com>
64 * a-tags.adb (Internal_Tag): Protect the run-time against wrong
67 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
69 * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
70 (Mark_Non_Null): If the node for which we just generated an access check
71 is a reference to an *in* parameter and the reference appears in the
72 declarative part of a subprogram body, mark the node as known non null.
74 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
76 * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
77 structure of E_Exception to reflect the new flag.
78 (Is_Raised, Set_Is_Raised): New inlined routines.
79 Update the usage of available flag to reflect the addition of Is_Raised.
80 (Is_Raised, Set_Is_Raised): Bodies of new routines.
81 (Write_Entity_Flags): Write the status of flag Is_Raised.
82 (Is_Descendent_Of_Address): New entity flag, to simplify handling of
83 spurious ambiguities when integer literals appear in the context of an
84 address type that is a visible integer type.
86 * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
87 exceptions never being raised.
88 (Analyze_Raise_Statement): When analyzing an exception, mark it as being
91 2007-08-31 Javier Miranda <miranda@adacore.com>
93 * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
94 statement when compiling under restriction No_Exceptions_Proparation.
96 2007-08-31 Ed Schonberg <schonberg@adacore.com>
98 * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
99 initialization aggregate for the type, generate itype references for
100 thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
102 2007-08-31 Gary Dismukes <dismukes@adacore.com>
104 * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
105 library-level package renaming, pass the declaration associated with
106 the renaming's special debug variable to Qualify_Entity_Names to ensure
107 that its encoded name is properly qualified.
109 * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
110 occurring in the list of entities to qualify, and do not attempt to
111 traverse an entity list in that case. Variables associated with
112 ` library-level package renamings can now occur in the table.
114 * exp_dbug.ads: Revise documentation of the encoding for renaming
117 2007-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
119 * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
120 access type points to an unconstrained array.
122 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
124 * restrict.adb, namet.adb, par-util.adb: Remove redundant type
127 * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
128 simple redundant qualifications. The check is performed whenever the
129 expression is a non-overloaded identifier.
130 (Resolve_Type_Conversion): Enchance the redundant type conversion check
131 to include loop parameters.
132 (Valid_Conversion): Avoid generation of spurious error message.
134 2007-08-31 Bob Duff <duff@adacore.com>
136 * par-ch4.adb (P_Simple_Expression): Fold long sequences of
137 concatenations of string literals into a single literal, in order to
138 avoid very deep recursion in the front end, which was causing stack
141 * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
142 string, and the right operand is a string literal (the case of "" &
143 "..."), optimize by avoiding copying the right operand -- just use the
144 value of the right operand directly.
146 * stringt.adb (Store_String_Chars): Optimize by growing the
147 String_Chars table all at once, rather than appending characters one by
149 (Write_String_Table_Entry): If the string to be printed is very long,
150 just print the first few characters, followed by the length. Otherwise,
151 doing "pn(n)" in the debugger can take an extremely long time.
153 * sem_prag.adb (Process_Interface_Name): Replace loop doing
154 Store_String_Char with Store_String_Chars.
156 2007-08-31 Vincent Celier <celier@adacore.com>
158 * prj-attr.adb: Add new attribute Excluded_Source_Files
160 * prj-nmsc.adb: Use attribute Excluded_Source_Files before
161 Locally_Removed_Files.
163 * snames.ads, snames.adb: New standard name Excluded_Source_Files
165 2007-08-31 Ed Schonberg <schonberg@adacore.com>
167 * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
168 clauses of subunits, ignore limited_with_clauses that are illegal and
169 have not been fully analyzed.
171 2007-08-31 Ed Schonberg <schonberg@adacore.com>
173 * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
174 flag, for effiency. It is called when analyzing arithmetic operators
175 and also for actuals in calls that are universal_integers. The flag is
176 set for the predefined type address, and for any type or subtype
179 * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
180 Universal_Integer, when the formal is a descendent of address and the
181 call appears in user code.
182 (Analyze_Selected_Component): if the prefix is a private extension, the
183 tag component is visible.
185 * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
188 2007-08-31 Robert Dewar <dewar@adacore.com>
190 * s-fileio.adb (Open): Normalize file name to lower case in non-case
191 sensitive file name systems to avoid unexpected mismatch in Vista.
193 2007-08-31 Vincent Celier <celier@adacore.com>
195 * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
197 2007-08-31 Vincent Celier <celier@adacore.com>
199 * symbols-vms.adb (Initialize): Read symbol files with continuation
201 (Finalize): If symbol is long, split the line
203 2007-08-31 Vincent Celier <celier@adacore.com>
205 * fmap.ads: Minor comment updates
207 2007-08-31 GNAT Script <nobody@adacore.com>
209 * Make-lang.in: Makefile automatically updated
211 2007-08-31 Bob Duff <duff@adacore.com>
213 * sinfo.ads: Minor comment fix.
215 2007-08-31 Thomas Quinot <quinot@adacore.com>
217 * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
219 Documentation cleanup only.
221 2007-08-31 Sergey Rybin <rybin@adacore.com>
223 * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
224 gnatpp '--separate-stmt-name' option.
225 Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
228 * gnat_ugn.texi: Add description for the new gnatpp
229 '--separate-stmt-name' and '--use-on-new-line' options.
231 2007-08-31 Ben Elliston <bje@au.ibm.com>
233 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
234 when compiling for powerpc64-*-linux.
235 * system-linux-ppc64.ads: New file.
237 2007-08-22 Krister Walfridsson <cato@df.lth.se>
239 * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
242 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
244 * misc.c (gnat_type_max_size): Constify.
246 2007-08-16 Gary Dismukes <dismukes@adacore.com>
248 * cstand.adb (Create_Standard): Create an entity for a zero-sized type
249 associated with Standard_Debug_Renaming_Type, to be used as the type of
250 the special variables whose names provide debugger encodings for
251 renaming declarations.
253 * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
254 (Set_Debug_Renaming_Link): Change to set Node25.
255 (Write_Field13_Name): Remove case for E_Enumeration_Literal.
256 (Write_Field25_Name): Add case for E_Variable to output
257 "Debug_Renaming_Link".
258 (Write_Field23_Name): Correct the output string for "Limited_View".
260 * exp_dbug.adb: Add with and use of Tbuild.
261 (Debug_Renaming_Declaration): Replace creation of an enumeration type
262 and literal with creation of a variable of type
263 Standard_Debug_Renaming_Type whose name encodes both the renamed object
264 and the entity of the renaming declaration.
265 (Qualify_Entity_Name): Add the delayed qualification of the entity name
266 part of the name of a variable that has a Debug_Renaming_Link.
268 * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
269 special type to be associated with variables that provide debugger
270 encodings for renaming declarations.
272 2007-08-16 Gary Dismukes <dismukes@adacore.com>
273 Ed Schonberg <schonberg@adacore.com>
274 Javier Miranda <miranda@adacore.com>
276 * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
277 ancestor part given by an aggregate to test for an unchecked conversion,
278 since this can occur in some cases when the ancestor part is a function
279 call, and we don't want to fall into the recursive call to this
280 procedure in that case.
282 * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
283 stream attributes on limited types to account for user-specified
284 attributes as well as whether Input (resp. Output) becomes available
285 due to Read (resp. Write) being available for the type. Change Boolean
286 variable to the more accurate name
287 Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
288 double-"not" predicate at beginning of return statement to more
291 * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
292 return has an associated N_Handled_Sequence_Of_Statements, then wrap it
293 in a block statement and use that as the first statement of the
294 expanded return rather than incorrectly using the handled sequence as
297 * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
298 operation, generate an explicit freeze node for it rather than
299 generating extra formals, to ensure that gigi has the proper order of
300 elaboration for anonymous subtypes in the signature of the subprograms.
301 (Build_In_Place_Formal): Move assertion to beginning of loop.
302 (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
303 applied to a function call (occurs for some cases of 'Input).
304 (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
305 applied to a function call (occurs for some cases of 'Input).
307 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
308 2005, generate an extended return statement enclosing the result object
311 * freeze.adb (Freeze_Record_Type): Extend the current management of
312 components that are access type with an allocator as default value: add
313 missing support to the use of qualified expressions of the
314 allocator (which also cause freezing of the designated type!)
315 (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
316 dispatching operation, since extra formals may be needed by calls to
317 build-in-place functions (such as stream 'Input).
319 * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
320 formals for 'Constrained and accessibility level in the case of a
321 predefined dispatching operation.
323 * exp_util.adb (Insert_Actions): A protected body is a valid insertion
324 point, no need to find the parent node.
326 2007-08-16 Javier Miranda <miranda@adacore.com>
328 * exp_attr.adb (Attribute_Priority): Add missing support for entries
331 2007-08-16 Javier Miranda <miranda@adacore.com>
333 * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
334 is not really required and can introduce regression with the debugger.
335 The original problem is fixed with the patch written for checks.adb.
337 2007-08-16 Thomas Quinot <quinot@adacore.com>
339 * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
340 Range_Check on Allocated_Table.
342 2007-08-16 Vincent Celier <celier@adacore.com>
344 * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
345 Including_Non_Switch set to False.
346 (Gnatmake): For the compiler, call Test_If_Relative_Path with
347 Including_Non_Switch set to False.
349 * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
350 parameter Including_Non_Switch, defaulted to True. When
351 Including_Non_Switch is False, options that are not switches and
352 appear as relative path are not converted to absolute paths.
354 2007-08-16 Nicolas Roche <roche@adacore.com>
356 * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
359 * Make-lang.in: Update dependencies
361 2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
363 * sem_ch10.adb (Has_With_Clause): If the name of the with clause
364 currently inspected is a selected component, retrieve the entity of
366 (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
367 from the immediate ancestor of Main_Unit_Entity.
368 (Install_Limited_Withed_Unit): Do not install the limited view of
369 package P if P is reachable through an ancestor chain from package C
370 and C also has a with clause for P in its body.
371 (Has_Limited_With_Clause): New routine.
372 (Has_With_Clause): New routine.
374 2007-08-16 Ed Schonberg <schonberg@adacore.com>
376 * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
377 generic for an enclosing instance is a global reference, even though
378 its scope is the enclosing instance.
380 2007-08-16 Gary Dismukes <dismukes@adacore.com>
381 Javier Miranda <miranda@adacore.com>
383 * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
384 initialize a limited object.
385 (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
387 Make sure Has_Complex_Representation is inherited by derived type.
389 2007-08-16 Robert Dewar <dewar@adacore.com>
391 * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
394 2007-08-16 Ed Schonberg <schonberg@adacore.com>
396 * sem_disp.adb (Check_Dispatching_Operation): If the operation
397 implements an operation inherited from a progenitor interface, verify
398 that they are subtype-conformant.
400 2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
401 Bob Duff <duff@adacore.com>
402 Nicolas Setton <setton@adacore.com>
404 * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
405 (Resolve): Alphabetize local variables. Add new variable From_Lib. When
406 the statement which is being resolved comes from a predefined library
407 unit, all non-predefined library interpretations are skipped.
408 (Resolve_Op_Concat): If string concatenation was folded in the parser,
409 but the "&" is user defined, give an error, because the folding would
412 * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
413 the parser has folded a long sequence of concatenations of string
416 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
417 and "JMP_BUF" variables as artificial.
418 (N_String_Literal): Do not use alloca for very long string literals. Use
419 xmalloc/free instead. Otherwise the stack might overflow.
421 * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
424 2007-08-16 Vincent Celier <celier@adacore.com>
426 * vms_conv.adb (Process_Argument): Ensure that project related options
427 are not put in the -cargs section when using GNAT COMPILE.
429 2007-08-16 Robert Dewar <dewar@adacore.com>
431 * gnat_ugn.texi: Add note on preprocessing (output file not written)
433 2007-08-16 Thomas Quinot <quinot@adacore.com>
435 * a-tags.adb: Minor reformatting.
437 2007-08-16 Bob Duff <duff@adacore.com>
439 * sem_type.ads, sem_ch4.adb: Minor reformatting.
441 2007-08-14 Thomas Quinot <quinot@adacore.com>
443 * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
444 s-osinte-interix.ads, system-interix.ads: Removed.
446 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
448 * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
449 calls to Check_Within_Time_Bounds.
450 ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
451 (Difference): Account for possible rounding of the resulting difference
453 2007-08-14 Robert Dewar <dewar@adacore.com>
455 * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
456 par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
457 s-osinte-solaris.adb, s-osinte-solaris.ads,
458 s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
460 * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
461 switch -gnatyS. Enable -gnatyS in GNAT style check mode
463 2007-08-14 Robert Dewar <dewar@adacore.com>
464 Ed Schonberg <schonberg@adacore.com>
466 * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
467 Suppress unmodified in-out parameter warning in some cases
468 This patch is a also fairly significant change to the way suppressible
471 * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
472 needed for access to concurrent record types generated by the expander.
473 (Generate_Range_Check): When generating a temporary to capture the
474 value of a conversion that requires a range check, set the type of the
475 temporary before rewriting the node, so that the type is always
476 properly placed for back-end use.
477 (Apply_Float_Conversion_Check): Handle case where the conversion is
479 (Get_Discriminal): Code reformatting. Climb the scope stack looking
480 for a protected type in order to examine its discriminants.
482 2007-08-14 Robert Dewar <dewar@adacore.com>
483 Gary Dismukes <dismukes@adacore.com>
484 Ed Schonberg <schonberg@adacore.com>
485 Thomas Quinot <quinot@adacore.com>
487 * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
488 a-stwisu.adb, a-strsup.adb: Fix warnings for range
491 * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
492 (Get_Allocator_Final_List): For the case of an anonymous access type
493 that has a specified Associated_Final_Chain, do not go up to the
495 (Expand_N_Type_Conversion): Test for the case of renamings of access
496 parameters when deciding whether to apply a run-time accessibility
498 (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
499 aggregate code before allocator, and ahead of declaration for
500 temporary, to prevent access before elaboration when the allocator is
501 an actual for an access parameter.
502 (Expand_N_Type_Conversion): On an access type conversion involving an
503 access parameter, do not apply an accessibility check when the
504 operand's original node was an attribute other than 'Access. We now
505 create access conversions for the expansion of 'Unchecked_Access and
506 'Unrestricted_Access in certain cases and clearly accessibility should
507 not be checked for those.
509 * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
510 includes a type conversion of a packed component that has been expanded,
511 recover the original expression for the object, and use this expression
512 in the post-call assignment statement, so that the assignment is made
513 to the object and not to a back-end temporary.
514 (Freeze_Subprogram): In case of primitives of tagged types not defined
515 at the library level force generation of code to register the primitive
516 in the dispatch table. In addition some code reorganization has been
517 done to leave the implementation clear.
518 (Expand_Call): When expanding an inherited implicit conversion,
519 preserve the type of the inherited function after the intrinsic
520 operation has been expanded.
522 * exp_ch2.ads, exp_ch2.adb
523 (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
524 of an entry formal appearing in an assignment statement does not assign
526 (Expand_Current_Value): Instead of calling a routine to determine
527 whether the prefix of an attribute reference should be optimized or
528 not, prevent the optimization of such prefixes all together.
530 * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
531 component whose prefix is known to be of an access type is an implicit
532 dereference and does not assign to the prefix.
534 2007-08-14 Ed Schonberg <schonberg@adacore.com>
535 Robert Dewar <dewar@adacore.com>
537 * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
538 itype is visited, make an entry into table to link associated node and
540 Add comments and correct harmless error in Build_NCT_Hash_Tables
541 (Array_Aggr_Subtype): Associate each itype created for an index type to
542 the corresponding range construct, and not to the aggregate itself. to
543 maintain a one-to-one correspondence between itype and its associated
544 node, to prevent errors when complex expression is copied.
545 Fix mishandling of multiple levels of parens
547 * sem_aggr.adb: Create a limited view of an incomplete type, to make
548 treatment of limited views uniform for all visible declarations in a
549 limited_withed package.
550 (New_Copy_Tree): If hash table is being used and itype is visited,
551 make an entry into table to link associated node and new itype.
552 (Resolve_Record_Aggregate): Do not add an others box association for a
553 discriminated record component that has only discriminants, when there
554 is a box association for the component itself.
556 * par-ch4.adb: Fix mishandling of multiple levels of parens
558 2007-08-14 Robert Dewar <dewar@adacore.com>
560 * comperr.adb: Fix problem with suppressing warning messages from gigi
562 * erroutc.ads, erroutc.adb, errout.ads,
563 errout.adb (Write_Eol): Remove trailing spaces before writing the line
564 (Write_Eol_Keep_Blanks): New procedure to write a line, including
565 possible trailing spaces.
566 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
567 Fix problem with suppressing warning messages from back end
568 Improve handling of deleted warnings
571 Fix problem with suppressing warning messages from back end
572 Handle setting of Static_Dispatch_Tables flag.
575 Fix problem with suppressing warning messages from back end
577 * exp_intr.adb: Improve handling of deleted warnings
579 2007-08-14 Robert Dewar <dewar@adacore.com>
581 * debug.adb: Improve -gnatdI to cover all cases of serialization
582 Add documentation of dZ, d.t
584 * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
586 (Sprint_Node_Actual): Generate new output associated with implicit
587 importation and implicit exportation of object declarations.
589 2007-08-14 Ed Schonberg <schonberg@adacore.com>
590 Robert Dewar <dewar@adacore.com>
591 Javier Miranda <miranda@adacore.com>
592 Gary Dismukes <dismukes@adacore.com>
594 * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
595 to make treatment of limited views uniform for all visible declarations
596 in a limited_withed package.
597 Improve warnings for in out parameters
598 (Set_Related_Interaface/Related_Interface): Allow the use of this
599 attribute with constants.
600 (Write_Field26_Name): Handle attribute Related_Interface in constants.
601 Warn on duplicate pragma Preelaborable_Initialialization
603 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
604 generation of a freezing node to ensure proper management of null
605 excluding access types in the backend.
606 (Create_Extra_Formals): Test base type of the formal when checking for
607 the need to add an extra accessibility-level formal. Pass the entity E
608 on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
609 originally being done in a couple of cases), to ensure that the
610 Extra_Formals list gets set on the entity E when the first entity is
612 (Conforming_Types): Add missing calls to Base_Type to the code that
613 handles anonymous access types. This is required to handle the
614 general case because Process_Formals builds internal subtype entities
615 to handle null-excluding access types.
616 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
617 functions that need it, even when not marked Requires_Overriding.
618 Improve warnings for in out parameters
619 (Analyze_Function_Return): Warn for disallowed null return
620 Warn on return from procedure with unset out parameter
621 Ensure consistent use of # in error messages
622 (Check_Overriding_Indicator): Add in parameter Is_Primitive.
623 (Analyze_Function_Return): Move call to Apply_Constraint_Check before
624 the implicit conversion of the expression done for anonymous access
625 types. This is required to generate the code of the null excluding
628 * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
629 A formal parameter is never publicly referenceable outside of its body.
630 (Check_References): For an unreferenced formal parameter in an accept
631 statement, use the same warning circuitry as for subprogram formal
633 (Warn_On_Unreferenced_Entity): New subprogram, taken from
634 Output_Unreferenced_Messages, containing the part of that routine that
635 is now reused for entry formals as described above.
636 (Goto_Spec_Entity): New function
637 (Check_References): Do not give IN OUT warning for dispatching operation
638 Improve warnings for in out parameters
639 (Test_Ref): Check that the entity is not undefinite before calling
640 Scope_Within, in order to avoid infinite loops.
641 Warn on return from procedure with unset out parameter
642 Improved warnings for unused variables
644 2007-08-14 Robert Dewar <dewar@adacore.com>
645 Javier Miranda <miranda@adacore.com>
646 Gary Dismukes <dismukes@adacore.com>
648 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
649 (Expand_N_Attribute_Reference): Further unify the handling of the
650 three forms of access attributes, using common code now for all three
651 cases. Add a test for the case of applying an access attribute to
652 an explicit dereference when the context is an access-to-interface
653 type. In that case we need to apply the conversion to the prefix
654 of the explicit dereference rather than the prefix of the attribute.
655 (Attribute_Version, UET_Address): Set entity as internal to ensure
656 proper dg output of implicit importation.
657 (Expand_Access_To_Type): Removed.
658 (Expand_N_Attribute_Reference): Merge the code from the three cases
659 of access attributes, since the processing is largely identical for
660 these cases. The substantive fix here is to process the case of a
661 type name prefix (current instance case) before handling the case
662 of interface prefixes.
664 2007-08-14 Thomas Quinot <quinot@adacore.com>
665 Ed Schonberg <schonberg@adacore.com>
666 Javier Miranda <miranda@adacore.com>
667 Robert Dewar <dewar@adacore.com>
669 * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
670 (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
671 type that is an anonymous access to controlled object, establish
672 an associated finalization chain to avoid corrupting the global
673 finalization list when a dynamically allocated object designated
674 by such a component is deallocated.
675 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
676 functions that need it, even when not marked Requires_Overriding.
677 (Initialize_Tag): Replace call to has_discriminants by call to
678 Is_Variable_Size_Record in the circuitry that handles the
679 initialization of secondary tags.
680 (Is_Variable_Size_Record): New implementation.
681 (Expand_N_Object_Declaration): Suppress call to init proc if there is a
682 Suppress_Initialization pragma for a derived type.
683 (Is_Variable_Size_Record): New subprogram.
684 (Build_Offset_To_Top_Functions): New implementation that simplifies the
685 initial version of this routine and also fixes problems causing
686 incomplete initialization of the table of interfaces.
687 (Build_Init_Procedure): Improve the generation of code to initialize the
688 the tag components of secondary dispatch tables.
689 (Init_Secondary_Tags): New implementation that simplifies the previous
690 version of this routine.
691 (Make_DT): Add parameter to indicate when type has been frozen by an
692 object declaration, for diagnostic purposes.
693 (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
694 diagnose attemps to freeze a subprogram when some untagged type of its
695 profile is a private type whose full view has not been analyzed yet.
696 (Freeze_Array_Type): Generate init proc for packed array if either
697 Initialize or Normalize_Scalars is set.
698 (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
699 constructing the new profile, copy the null_exclusion indicator for each
700 parameter, to ensure full conformance of the new body with the spec.
702 * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
703 Create wrappers for constructor functions that need it, even when not
704 marked Requires_Overriding.
705 (Covers): Handle properly designated types of anonymous access types,
706 whose non-limited views are themselves incomplete types.
707 (Add_Entry): Use an entity to store the abstract operation which hides
709 (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
710 (Collect_Interps): Use Empty as an actual for Abstract_Op in the
711 initialization aggregate.
712 (Function_Interp_May_Be_Hidden): Rename to
713 Function_Interp_Has_Abstract_Op.
714 (Has_Compatible_Type): Remove machinery that skips interpretations if
715 they are labeled as potentially hidden by an abstract operator.
716 (Has_Hidden_Interp): Rename to Has_Abstract_Op.
717 (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
718 (Write_Overloads): Output the abstract operator if present.
719 (Add_Entry): Before inserting a new entry into the interpretation table
720 for a node, determine whether the entry will be disabled by an abstract
722 (Binary_Op_Interp_May_Be_Hidden): New routine.
723 (Collect_Interps): Add value for flag May_Be_Hidden in initialization
725 (Function_Interp_May_Be_Hidden): New routine.
726 (Has_Compatible_Type): Do not consider interpretations hidden by
727 abstract operators when trying to determine whether two types are
729 (Has_Hidden_Interp): New routine.
730 (Set_May_Be_Hidden_Interp): New routine.
731 (Write_Overloads): Write the status of flag May_Be_Hidden.
733 2007-08-14 Ed Schonberg <schonberg@adacore.com>
734 Javier Miranda <miranda@adacore.com>
736 * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
737 types declared in the declarative part of a nested package body or in
738 the proper body of a stub.
739 (Set_All_DT_Position): Add missing check to avoid wrong assignation
740 of the same dispatch table slot to renamed primitives.
741 (Make_Select_Specific_Data_Table): Handle private types.
742 (Tagged_Kind): Handle private types.
743 (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
744 output of implicit importation and exportation.
745 (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
746 first formal of the thunk is always associated with the controlling
747 type. In addition perform the following code cleanup: remove formal
748 Thunk_Alias which is no longer required, cleanup evaluation of the
749 the controlling type, and update the documentation.
750 Replace occurrence of Default_Prim_Op_Count by
751 Max_Predef_Prims. Addition of compile-time check to verify
752 that the value of Max_Predef_Prims is correct.
753 (Check_Premature_Freezing): Apply check in Ada95 mode as well.
754 (Make_DT): Add parameter to indicate when type has been frozen by an
755 object declaration, for diagnostic purposes.
756 (Build_Static_Dispatch_Tables): New subprogram that takes care of the
757 construction of statically allocated dispatch tables.
758 (Make_DT): In case of library-level tagged types export the declaration
759 of the primary tag. Remove generation of tags (now done by Make_Tags).
760 Additional modifications to handle non-static generation of dispatch
761 tables. Take care of building tables for asynchronous interface types
762 (Make_Tags): New subprogram that generates the entities associated with
763 the primary and secondary tags of Typ and fills the contents of Access_
764 Disp_Table. In case of library-level tagged types imports the forward
765 declaration of the primary tag that will be declared later by Make_DT.
766 (Expand_Interface_Conversion): In case of access types to interfaces
767 replace an itype declaration by an explicit type declaration to avoid
768 problems associated with the scope of such itype in transient blocks.
770 2007-08-14 Robert Dewar <dewar@adacore.com>
771 Ed Schonberg <schonberg@adacore.com>
772 Javier Miranda <miranda@adacore.com>
774 * exp_util.ads, exp_util.adb:
775 This patch replaces a number of occurrences of explicit tests for N_Null
776 with calls to Known_Null. This improves tracking of null values, since
777 Known_Null also catches null constants, and variables currently known to
778 be null, so we get better tracking.
779 (Ensure_Defined): create an itype reference only in the scope of the
781 (Side_Effect_Free): A selected component of an access type that
782 denotes a component with a rep clause must be treated as not
783 side-effect free, because if it is part of a linked structure its
784 value may be affected by a renaming.
785 (Expand_Subtype_From_Expr): For limited objects initialized with build
786 in place function calls, do nothing; otherwise we prematurely introduce
787 an N_Reference node in the expression initializing the object, which
788 breaks the circuitry that detects and adds the additional arguments to
789 the called function. Bug found working in the new patch for statically
790 allocated dispatch tables.
791 (Is_Library_Level_Tagged_Type): New subprogram.
792 (Remove_Side_Effects): If the expression of an elementary type is an
793 operator treat as a function call.
794 (Make_Literal_Range): If the index type of the array is not integer, use
795 attributes properly to compute the constraint on the resulting aggregate
798 * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
799 class-wide type whose base type is an incomplete private type, leave
800 class-wide type unfrozen so that freeze nodes can be generated
801 properly at a later point.
802 (Freeze_Entity, array case): Handle case of pragma Pack and component
803 size attributre clause for same array.
805 2007-08-14 Vincent Celier <celier@adacore.com>
807 * prj.ads, prj.adb: Update Project Manager to new attribute names for
809 Allow all valid declarations in configuration project files
810 (Reset): Initialize all tables and hash tables in the project tree data
811 Major update of the Project Manager and of the project aware tools,
812 including gprmake, so that the same sources in the GNAT repository
813 can be used by gprbuild.
814 (Slash_Id): Change type to be Path_Name_Type
815 (Slash): Return a Path_Name_Type instead of a File_Name_Type
817 * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
819 Update Project Manager to new attribute names for ghprbuild
820 Allow all valid declarations in configuration project files
821 Major update of the Project Manager and of the project aware tools,
822 including gprmake, so that the same sources in the GNAT repository
823 can be used by gprbuild.
826 Major update of the Project Manager and of the project aware tools,
827 including gprmake, so that the same sources in the GNAT repository
828 can be used by gprbuild.
830 * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
831 insensitive flag for attributes with optional index.
832 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
833 array attribute, put the index in lower case.
834 Update Project Manager to new attribute names for ghprbuild
835 Allow all valid declarations in configuration project files
836 Major update of the Project Manager and of the project aware tools,
837 including gprmake, so that the same sources in the GNAT repository
838 can be used by gprbuild.
840 * prj-env.ads, prj-env.adb:
841 Major update of the Project Manager and of the project aware tools,
842 including gprmake, so that the same sources in the GNAT repository
843 can be used by gprbuild.
844 (Get_Reference): Change type of parameter Path to Path_Name_Type
846 * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
847 removing '-' from the path to start with the first character of the
849 Major update of the Project Manager and of the project aware tools,
850 including gprmake, so that the same sources in the GNAT repository
851 can be used by gprbuild.
852 Major update of the Project Manager and of the project aware tools,
853 including gprmake, so that the same sources in the GNAT repository
854 can be used by gprbuild.
856 * prj-nmsc.ads, prj-nmsc.adb:
857 Update Project Manager to new attribute names for ghprbuild
858 Allow all valid declarations in configuration project files
859 (Search_Directories): Detect subunits that are specified with an
860 attribute Body in package Naming. Do not replace a source/unit in the
861 same project when the order of the source dirs are known. Detect
862 duplicate sources/units in the same project when the order of the
863 source dirs are not known.
864 (Check_Ada_Name): Allow all identifiers that are not reserved words
866 Major update of the Project Manager and of the project aware tools,
867 including gprmake, so that the same sources in the GNAT repository
868 can be used by gprbuild.
869 (Look_For_Sources): If the list of sources is empty, set the object
870 directory of non extending project to nil.
871 Change type of path name variables to be Path_Name_Type
872 (Locate_Directory): Make sure that on Windows '/' is converted to '\',
873 otherwise creating missing directories will fail.
875 * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
876 prj-part.ads, prj-part.adb:
877 Major update of the Project Manager and of the project aware tools,
878 including gprmake, so that the same sources in the GNAT repository
879 can be used by gprbuild.
881 * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
882 insensitive flag for attributes with optional index.
883 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
884 array attribute, put the index in lower case.
885 (Parse_Variable_Reference): Allow the current project name to be used in
886 the prefix of an attribute reference.
888 * prj-util.ads, prj-util.adb
889 (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
890 defaulted to False. When True, always check against indexes in lower
893 * snames.ads, snames.h, snames.adb:
894 Update Project Manager to new attribute names for gprbuild
895 Allow all valid declarations in configuration project files
897 2007-08-14 Robert Dewar <dewar@adacore.com>
898 Ed Schonberg <schonberg@adacore.com>
900 * opt.ads: Warning for non-local exception propagation now off by
902 New switch -gnatI to disable representation clauses
903 Implement new pragma Implicit_Packing
906 Warning for non-local exception propagation now off by default
907 Add warning for unchecked conversion of pointers wi different
909 New switch -gnatI to disable representation clauses
911 * usage.adb: new switch -gnatyS
913 * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
914 note that aggregates of anonymous array types are not flagged.
915 -gnatwc now includes membership tests optimized away
916 -gnatw.x warnings are now off by default
917 Added conditional compilation Appendix
918 Add documentation of -gnatI
919 Add documentation for new -gnatyS style check
920 Update documentation about SAL and auto-init on Windows.
923 Add documentation for pragma Check_Name and 'Enabled attribute
924 Document that Eliminate on dispatching operation is ignored
925 Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
927 Document pragma Implicit_Packing
929 * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
930 different conventions
931 New switch -gnatI to disable representation clauses
933 * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
934 recognized, report the invalid characters including "-gnat" instead of
935 just the first character in the switch.
936 New switch -gnatI to disable representation clauses
937 Set Warn_On_Object_Renames_Function true for -gnatg
939 * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
940 Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
941 Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
942 to switch -aP (add directory to project search dir).
944 * par-prag.adb: Implement new pragma Implicit_Packing
946 * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
947 type as having a non-standard representation, to force expansion on
948 conversion to related types.
949 (Analyze_Pragma): Warn on misspelled pragma
950 (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
951 Ensure consistent use of # in error messages
952 Implement pragma Implicit_Packing
954 2007-08-14 Olivier Hainque <hainque@adacore.com>
955 Eric Botcazou <ebotcazou@adacore.com>
957 * targtyps.c (get_target_maximum_default_alignment): New function.
959 that the compiler might choose by default for a type or object.
960 (get_target_default_allocator_alignment): New function. Alignment known
961 to be honored by the target default allocator.
962 (get_target_maximum_allowed_alignment): New function. Maximum alignment
963 we might accept for any type or object on the target.
964 (get_target_maximum_alignment): Now synonym of maximum_default_alignment
966 * gigi.h (get_target_maximum_default_alignment): Declare new function.
967 (get_target_default_allocator_alignment): Likewise.
968 (get_target_maximum_allowed_alignment): Likewise.
971 * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
972 result of a function call, first try to use a stabilized reference for
973 a constant renaming too.
974 (validate_alignment): Use target_maximum_allowed_alignment instead of
975 MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
976 (gnat_to_gnu_entity): Use common nodes directly.
977 (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
978 alignment and size for the object.
979 (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
980 and N_Procedure_Call_Statement.
981 (takes_address): Rename to lvalue_required_p, add third parameter
982 'aliased' and adjust recursive calls.
983 <N_Indexed_Component>: Update 'aliased' from the array type.
984 <N_Selected_Component>: New case.
985 <N_Object_Renaming_Declaration>: New Likewise.
986 (Identifier_to_gnu): Adjust for above changes.
987 (maybe_stabilize_reference) <CONST_DECL>: New case.
989 * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
990 between type variants.
991 (build_simple_component_ref): Likewise.
992 (build_call_alloc_dealloc): Use target_default_allocator_alignment
993 instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
994 aligning type circuitry for allocations from the default storage pool.
995 (build_allocator): Likewise.
996 (build_simple_component_ref): Manually fold the reference for a
997 constructor if the record type contains a template.
999 * utils.c (value_zerop): Delete.
1000 (gnat_init_decl_processing): Emit debug info for common types.
1001 (rest_of_record_type_compilation): If a union contains a field
1002 with a non-constant qualifier, treat it as variable-sized.
1003 (finish_record_type): Give the stub TYPE_DECL a name.
1004 (rest_of_record_type_compilation): Likewise.
1005 (convert) <CONSTRUCTOR>: New case. Build a new constructor if
1006 types are equivalent array types.
1007 (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
1008 even if the type is not passed by reference.
1009 (static_ctors, static_dtors): Delete.
1010 (end_subprog_body): Do not record constructors and destructors.
1011 (build_global_cdtor): Delete.
1012 (gnat_write_global_declarations): Do not call build_global_cdtor.
1014 * lang-specs.h: If TARGET_VXWORKS_RTP is defined, append -mrtp when
1015 -fRTS=rtp is specified.
1016 If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
1019 * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
1020 of the personality function with SJLJ exceptions.
1022 * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
1023 the name of the personality function with SJLJ exceptions.
1025 2007-08-14 Robert Dewar <dewar@adacore.com>
1026 Ed Schonberg <schonberg@adacore.com>
1028 * par.ads, par.adb: Improve handling of extra right parens.
1029 (Par): Remove flag From_Limited_With_Clause.
1031 * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
1032 Improve handling of extra right parens.
1034 2007-08-14 Robert Dewar <dewar@adacore.com>
1036 * par-tchk.adb (TF_Semicolon): Improve error recovery
1038 2007-08-14 Robert Dewar <dewar@adacore.com>
1039 Ed Schonberg <schonberg@adacore.com>
1041 * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
1042 enumeration type, mark all literals as referenced.
1043 (Eval_Attribute, case 'Image): If the argument is an enumeration
1044 literal and names are available, constant-fold but mark nevertheless as
1046 Clean up function names.
1047 (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
1049 (Requires_Simple_Name_Prefix): Removed.
1051 2007-08-14 Robert Dewar <dewar@adacore.com>
1052 Ed Schonberg <schonberg@adacore.com>
1054 * sem_ch11.adb: Improved warnings for unused variables
1056 * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
1057 is a synchronized interface, the derived type is limited.
1058 (Analyze_Object_Declaration): Mark the potential coextensions in the
1059 definition and expression of an object declaration node.
1060 (Build_Derived_Type): For the completion of a private type declaration
1061 with a derived type declaration, chain the parent type's representation
1062 items to the last representation item of the derived type (not the
1063 first one) if they are not present already.
1064 (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
1065 object declaration of forward references to tags.
1066 (Access_Subprogram_Declaration): In Ada2005, anonymous access to
1067 subprogram types can appear as access discriminants of synchronized
1069 (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
1070 given in prefixed form as a selected component.
1071 (Process_Discriminants): If not all discriminants have defaults, place
1072 error message on a default that is present.
1073 (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
1074 extend a synchronized tagged type.
1075 Improved warnings for unused variables
1076 (Is_Visible_Component): Fix a visibility hole on a component inherited
1077 by a private extension when parent is itself declared as a private
1078 extension, and the derivation is in a child unit.
1079 (Find_Hidden_Interface): Move spec from the package body.
1081 2007-08-14 Robert Dewar <dewar@adacore.com>
1082 Ed Schonberg <schonberg@adacore.com>
1084 * sem_ch5.adb: Improve warnings on redundant assignments
1086 * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
1088 (Is_Synchronized_Tagged_Type): New subprogram that returns true
1089 in case of synchronized tagged types (AARM 3.9.4 (6/2)).
1090 (Safe_To_Capture_Value): Can now return True for constants, even if Cond
1091 is set to False. Improves handling of Known_[Not_]Null.
1092 (Wrong_Type): Special case address arithmetic attempt
1093 (Collect_Abstract_Interfaces): Add new formal to allow collecting
1094 abstract interfaces just using the partial view of private types.
1095 (Has_Abstract_Interfaces): Add new formal to allow checking types
1096 covering interfaces using the partial view of private types.
1097 (Is_Fully_Initialized_Type): Special VM case for uTag component. This
1098 component still needs to be defined in this case, but is never
1099 initialized as VMs are using other dispatching mechanisms.
1100 (Abstract_Interface_List): For a protected type, use base type to get
1102 Improve warnings on redundant assignments
1103 (Is_Variable): Handle properly an implicit dereference of a prefixed
1105 (Build_Actual_Subtype): If this is an actual subtype for an
1106 unconstrained formal parameter, use the sloc of the body for the new
1107 declaration, to prevent anomalises in the debugger.
1109 2007-08-14 Robert Dewar <dewar@adacore.com>
1111 * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
1112 dispatching operation
1114 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1115 Gary Dismukes <dismukes@adacore.com>
1118 exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
1119 expanded aggregate code before allocator, and ahead of declaration for
1120 temporary, to prevent access before elaboration when the allocator is
1121 an actual for an access parameter.
1122 (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
1123 the TSD and the table of interfaces.
1124 (Convert_To_Assignments): Augment the test for delaying aggregate
1125 expansion for limited return statements to include the case of extended
1126 returns, to prevent creation of an unwanted transient scope.
1127 (Is_Static_Dispatch_Table_Aggregate): New subprogram.
1128 (Expand_Array_Aggregate): Handle aggregates associated with
1129 statically allocated dispatch tables.
1130 (Expand_Record_Aggregate): Handle aggregates associated with
1131 statically allocated dispatch tables.
1132 (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
1133 of anonymous access type.
1135 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1137 * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
1138 is a variable that renames a slice, use the variable itself in the
1139 expannsion when the renamed expression itself may be modified between
1140 the declaration of the renaming and the array assignment.
1142 2007-08-14 Jerome Guitton <guitton@adacore.com>
1144 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
1145 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
1146 s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
1147 New functions; dummy implementations.
1149 * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
1150 functions, used to implement the multi-tasks mode routines on VxWorks.
1152 * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
1154 binding to the VxWorks routines which have changed between VxWorks 5
1156 (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
1157 which are not callable from a RTP.
1159 * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
1160 implemented for the multi-tasks mode on VxWorks 5 and 6.
1162 * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
1164 * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
1167 2007-08-14 Vincent Celier <celier@adacore.com>
1169 * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
1170 gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
1171 mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
1172 mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
1173 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
1174 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
1175 mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
1177 (Major_Id_Name): New function.
1178 mlib-tgt.ads/mlib.tgt.adb:
1179 (Library_Major_Minor_Id_Supported): New function, default returns True
1180 Most mlib-tgt-*.adb that support shared libraries and symbolic links:
1181 (Build_Dynamic_Library): Add support for major/minor ids for shared libs
1182 Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
1183 Implementation of Library_Major_Minor_Id_Supported returns False
1185 (Clean_Library_Directory): If major/minor ids are supported, clean all
1187 Major update of the Project Manager and of the project aware tools,
1188 including gprmake, so that the same sources in the GNAT repository
1189 can be used by gprbuild.
1191 2007-08-14 Olivier Hainque <hainque@adacore.com>
1193 * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
1194 (GCC_ZCX_Support): Switch to True.
1196 * s-intman-solaris.adb (Notify_Exception): Call
1197 Adjust_Context_For_Raise before raising, as expected for signal
1198 handlers in general.
1200 * s-intman-posix.adb (Notify_Exception): Remove declaration of
1201 Adjust_Context_For_Raise, moved to the spec of this unit to be visible
1202 to other implementation bodies.
1204 * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
1205 be visible by multiple implementation bodies.
1207 * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
1208 only for conditions coming from hardware.
1209 [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
1210 adjustments to signal context prior to exception raise from signal
1212 (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
1214 Solaris section: (__gnat_adjust_context_for_raise): New function.
1215 Implementation of the machine context adjustments to perform prior to
1216 raise from a signal handler. Version for both sparc and x86.
1217 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
1218 (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
1219 prior to raising as expected for any handler, before possible nested
1220 faults to make sure all the contexts in a chain have been adjusted by
1221 the time we propagate.
1223 2007-08-14 Pascal Obry <obry@adacore.com>
1225 * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
1226 (SYSTEM_INFO): New record.
1227 (SetThreadIdealProcessor): New imported routine needed for supporting
1228 task_info pragma on Windows.
1230 * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
1231 info can be applied to the current host.
1232 (Create_Task): Set the ideal processor if information is present.
1234 * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
1235 a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
1237 2007-08-14 Olivier Hainque <hainque@adacore.com>
1239 * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
1240 stack size and initial stack pointer value for a given task.
1241 (Enter_Task): Get the stack attributes of the task we are entering and
1242 let the stack checking engine know about them.
1244 * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
1245 Let the stack-checking engine know about the initial sp value and stack
1246 size associated with the current task.
1247 (Set_Stack_Info): If a stack base has been notified for the current
1248 task, honor it. Fallback to the previous less accurate method otherwise.
1250 * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
1252 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1254 * sem_ch10.adb: Create a limited view of an incomplete type, to make
1255 treatment of limited views uniform for all visible declarations in a
1256 limited_withed package.
1257 Set flag indicating that a subprogram body for a child unit has a
1259 (Analyze_Compilation_Unit): If unit is a subprogram body that has no
1260 separate declaration, remove the unit name from visibility after
1261 compilation, so that environment is clean for subsequent compilations.
1262 (Install_Limited_Context_Clauses): Do not install a
1263 limited_private_with_clause unless the current unit is a body or a
1265 (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
1266 in the same fashion.
1267 (Install_Limited_Withed_Unit): Do not install a limited with clause if
1268 it applies to the declaration of the current package body.
1269 (Remove_Private_With_Clauses): If there is a regular with_clause for
1270 the unit, delete Private_With_Clause from context, to prevent improper
1271 hiding when processing subsequent nested packages and instantiations.
1273 2007-08-14 Jose Ruiz <ruiz@adacore.com>
1275 * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
1276 dir/file, device:/dir/file, and device:drive_letter:/dir/file as
1277 representing absolute path names.
1278 __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
1280 * cstreams.c (__gnat_full_name for VxWorks): Use
1281 __gnat_is_absolute_path to detect whether we need to add the current
1282 directory to normalize the path.
1284 2007-08-14 Javier Miranda <miranda@adacore.com>
1287 a-tags.adb (Displace): Associate a message with the raised CE
1289 (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
1290 To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
1291 To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
1293 (Default_Prim_Op_Count): Removed.
1294 (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
1295 Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
1296 Remove pragma Inline_Always.
1298 * rtsfind.ads (Default_Prim_Op_Count): Removed
1299 (Max_Predef_Prims): New entity
1300 (RE_Expanded_Name): Removed
1301 (RE_HT_Link): Removed
1302 (RE_Iface_Tag): Remmoved
1303 (RE_Ifaces_Table): Removed
1304 (RE_Interfaces_Array): Removed
1305 (RE_Interface_Data_Element): Removed
1306 (RE_Nb_Ifaces): Removed
1307 (RE_RC_Offset): Removed
1308 (RE_Static_Offset_To_Top): Removed
1310 * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
1312 (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
1313 Prim_Op_Count by Max_Predef_Prims.
1315 2007-08-14 Thomas Quinot <quinot@adacore.com>
1316 Vincent Celier <celier@adacore.com>
1318 * binde.adb (Elab_All_Links): Remove unnecessary call to
1319 Generic_Separately_Compiled (if a unit satisfies this predicate, there
1320 won't be an associated Afile).
1321 (Elab_All_Links): Fail if a referenced unit cannot be found
1324 Fix comments in bindgen regarding consistency checks done in Bcheck:
1325 the checks are made across units within a partition, not across several
1327 Fix generation of C binder file for VxWorks.
1329 * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
1330 Generic_May_Lack_ALI, more descriptive of the current use of the
1331 predicate, and update documentation.
1333 * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
1334 reorganization and documentation update for the case of predefined
1335 library generics (for which we do not reference an Afile).
1337 2007-08-14 Robert Dewar <dewar@adacore.com>
1339 * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
1340 s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
1341 s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
1342 s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
1343 s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
1344 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
1345 s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
1346 s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
1347 exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
1348 s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
1349 s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
1350 a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
1351 s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
1352 g-altcon.adb: Minor reformatting
1354 ada-tree.h: Delete empty line.
1356 ali.ads: Minor reformatting
1357 Clarification of comments.
1358 Minor spelling correction
1360 * exp_dbug.adb: Add Warnings Off to suppress new warning
1362 * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
1365 * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
1368 * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
1370 * a-textio.ads: Reorder the standard input/output/error declarations
1373 * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
1375 * par-ch2.adb: Recognize RM specially in errout
1376 Change 'R'M to RM in all error messages
1378 * scng.adb: Recognize RM specially in errout
1380 * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
1381 N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
1383 * s-direio.adb: Add missing routine header box.
1385 * sem_attr.ads: Add ??? comments
1387 * sem_eval.adb: Recognize RM specially in errout
1388 Change 'R'M to RM in all error messages
1390 * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
1392 * s-tasinf.ads: Fix minor comment typo.
1394 * a-cihama.adb: Minor comment addition
1396 * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
1399 * s-tasinf-tru64.ads: Fix minor comment typo.
1401 * itypes.ads: Comment update.
1403 * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
1406 * argv.c: Added protection against null gnat_argv and gnat_envp.
1408 * bcheck.adb (Check_Consistency): Use correct markup character ({) in
1409 warning message when Tolerate_Consistency_Errors is True.
1411 * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
1412 Any_Id, as this subprogram is only applicable to *type* entities (it
1413 sets RM_Size). Instead initialize just Esize and Alignment.
1415 2007-08-14 Bob Duff <duff@adacore.com>
1417 * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
1418 a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
1419 a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
1420 a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
1421 a-coorse.ads (Next): Applied pragma Inline.
1422 Make all Containers packages Remote_Types (unless they are already
1424 (Previous): applied pragma Inline
1425 (Elements_Type): is now a record instead of an array
1427 2007-08-14 Thomas Quinot <quinot@adacore.com>
1429 * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
1431 (Set_Item): When the new item is an element of the currently allocated
1432 table passed by reference, save a copy on the stack if we're going
1433 to reallocate. Also, in Table.Set_Item, make sure we test the proper
1434 variable to determine whether to call Set_Last.
1436 * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
1437 symbols-vms.adb, symbols-processing-vms-alpha.adb,
1438 symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
1439 some occurrences of the pattern
1441 T.Table (T.Last) := Value;
1442 with a cleaner call to
1445 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1446 Gary Dismukes <dismukes@adacore.com>
1447 Thomas Quinot <quinot@adacore.com>
1449 * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
1450 derived type with interface progenitors use the analyzed formal as the
1451 parent of the actual, to create renamings for all the inherited
1452 operations in Derive_Subprograms.
1453 (Collect_Previous_Instances): new procedure within of
1454 Load_Parent_Of_Generic, to instantiate all bodies in the compilation
1455 unit being loaded, to ensure that the generation of global symbols is
1456 consistent in different compilation modes.
1457 (Is_Tagged_Ancestor): New function testing the ancestor relation that
1458 takes progenitor types into account.
1459 (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
1460 traversing over the primitives of the formal and actual types to locate
1461 any abstract subprograms of the actual type that correspond to a
1462 nonabstract subprogram of the formal type's ancestor type(s), and issue
1463 an error if such is found.
1464 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
1465 Instantiate_Package_Body, Instantiate_Subprogram_Body):
1466 Remove bogus guard around calls to Inherit_Context.
1467 (Reset_Entity): If the entity is the selector of a selected component
1468 that denotes a named number, propagate constant-folding to the generic
1469 template only if the named number is global to the generic unit.
1470 (Set_Instance_Env): Only reset the compilation switches when compiling
1471 a predefined or internal unit.
1473 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1475 * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
1476 parameter to determine whether operation applies to the prefix.
1477 (Complete_Object_Operation): If actual has an access type and
1478 controlling formal is not an in_parameter, reject the actual if it is
1479 an access_to_constant type.
1480 (Try_Primitive_Operation): If the type of the prefix is a formal tagged
1481 type, the candidate operations are found in the scope of declaration of
1482 the type, because the type has no primitive subprograms.
1483 (Analyze_Selected_Component): If prefix is class-wide, and root type is
1484 a private extension, only examine visible components before trying to
1485 analyze as a prefixed call.
1486 Change Entity_List to Type_To_Use, for better readability.
1487 (Has_Fixed_Op): Use base type when checking whether the type of an
1488 operator has a user-defined multiplication/division
1489 (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
1490 user-defined operators are available for fixed-point types.
1492 2007-08-14 Thomas Quinot <quinot@adacore.com>
1493 Ed Schonberg <schonberg@adacore.com>
1495 * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
1496 formal At_Any_Place indicating, when True, that we want to test for
1497 availability of the stream attribute at any place (as opposed to the
1498 current visibility context only).
1499 (Missing_Read_Write_Attributes): A stream attribute is missing for the
1500 purpose of enforcing E.2.2(8) only if it is not available at any place.
1501 Take into account the Ada2005 pragma Has_Preelaborable_Initialization
1502 when checking the legality of an extension aggregate in a preelaborable
1503 package. Treat the literal null as a valid default expression in a
1504 component declaration for a type with preelaborable initialization.
1505 A limited interface is a legal progenitor for the designated type of a
1506 remote access to class-wide type.
1508 2007-08-14 Thomas Quinot <quinot@adacore.com>
1509 Ed Schonberg <schonberg@adacore.com>
1511 * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
1512 reference): Use correct entity as denoted entity for the selector of
1514 (Find_Direct_Name): Add comment about Generate_Reference incorrectly
1515 setting the Referenced_As_LHS flag for entities that are implicitly
1517 (Find_Type): If the type is an internally generated incomplete type,
1518 mark the full view as referenced, to prevent spurious warnings.
1519 (Find_Selected_Component, Has_Components): Handle properly non-limited
1520 views that are themselves incomplete types.
1521 Handle interfaces visible through limited-with clauses.
1522 (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
1523 subprogram generic actual for which we have generated a renaming.
1524 Warn when the renaming introduces a homonym of
1525 the renamed entity, and the renamed entity is directly visible.
1527 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1528 Hristian Kirtchev <kirtchev@adacore.com>
1530 * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
1531 appear in the subtree to the current allocator if it is not a static
1533 (Resolve_Allocator): Perform cleanup if resolution has determined that
1534 the allocator is not a coextension.
1535 (Resolve): Skip an interpretation hidden by an abstract operator only
1536 when the type of the interpretation matches that of the context.
1537 (Resolve): When looping through all possible interpretations of a node,
1538 do not consider those that are hidden by abstract operators.
1539 (Resolve_Actuals): When verifying that an access to class-wide object
1540 is an actual for a controlling formal, ignore anonymous access to
1541 subprograms whose return type is an access to class_wide type.
1542 (Resolve_Slice): If the prefix of the slice is a selected component
1543 whose type depends on discriminants, build its actual subtype before
1544 applying range checks on the bounds of the slice.
1545 (Valid_Conversion): In an instance or inlined body, compare root types,
1546 to prevent anomalies between private and public views.
1547 (Resolve): Improve error message for ambiguous fixed multiplication
1548 expressions that involve universal_fixed multiplying operations.
1550 2007-08-14 Javier Miranda <miranda@adacore.com>
1551 Hristian Kirtchev <kirtchev@adacore.com>
1553 * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
1554 location to allow the correct generation of errors in case of
1555 restrictions applied to the expanded code.
1556 (Expand_Entry_Barrier): Remove all generated renamings for a barrier
1557 function if the condition does not reference them.
1558 (Expand_Entry_Body_Declarations): Mark the index constant as having a
1561 2007-08-14 Thomas Quinot <quinot@adacore.com>
1563 * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
1564 typecode parameters for a union (in a variant record), remove
1565 extraneous layer of Any wrapping for member label.
1566 (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
1567 elabration statements, register the package with the name server
1568 at the beginning, not at the end, of the elaboration statements so
1569 that they can create remote access to subprogram values that designate
1570 remote subprograms from the package.
1572 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1574 * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
1575 values to compute the number of seconds since the Unix Epoc in order to
1576 account for Daylight Savings Time. Perform special processing for dates
1577 that are earlier than the Unix Epoc to obtain a negative number.
1579 2007-08-14 Emmanuel Briot <briot@adacore.com>
1581 * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
1584 2007-08-14 Eric Botcazou <ebotcazou@adacore.com>
1586 * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
1587 binder-generated file is not in Ada.
1588 Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
1589 recorded in the ALI file.
1590 Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
1592 2007-08-14 Vincent Celier <celier@adacore.com>
1594 * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
1595 (Output_Source): Do nothing if parameter is No_Sdep_Id
1597 * make.adb (Gnatmake): Do not rebuild an archive simply because a
1598 shared library it imports has a later time stamp.
1599 (Check): Resolve the symbolic links in the path name of the object
1601 Check that the ALI file is in the correct object directory
1602 Check if a file name does not correspond to the mapping of units
1604 (Display_Version): New procedure
1605 (Initialize): Process switches --version and --help
1606 Use type Path_Name_Type for path name
1608 2007-08-14 Paul Hilfinger <hilfinger@adacore.com>
1610 * impunit.adb: Re-organize System.Random_Numbers and
1611 GNAT.Random_Numbers and add to builds.
1613 * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
1615 * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
1617 * a-assert.ads, a-assert.adb: New files.
1619 2007-08-14 Gary Dismukes <dismukes@adacore.com>
1621 * layout.adb (Layout_Type): In the case of access-to-subprogram types,
1622 if AAMP_On_Target is True, then the size of the type encompasses two
1623 addresses (a static link and a subprogram address), except in the case
1624 of library-level access types.
1626 2007-08-14 Vincent Celier <celier@adacore.com>
1628 * output.ads, output.adb (Write_Eol): Remove trailing spaces before
1630 (Write_Eol_Keep_Blanks): New procedure to write a line, including
1631 possible trailing spaces.
1632 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
1634 2007-08-14 Javier Miranda <miranda@adacore.com>
1636 * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
1637 null-excluding access types.
1639 2007-08-14 Javier Miranda <miranda@adacore.com>
1641 * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
1642 that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
1643 of private types add missing check on matching interfaces in the
1644 partial and full declarations.
1645 (Analyze_Protected_Type): Code cleanup.
1646 (Analyze_Task_Type): Code cleanup.
1648 2007-08-14 Javier Miranda <miranda@adacore.com>
1650 * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
1651 generated interface thunk.
1653 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1655 * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
1656 obsolescent warning on application of 'Class to an incomplete type.
1658 * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
1659 prevent obsolescent warning on application of 'Class to an incomplete
1662 2007-08-14 Pascal Obry <obry@adacore.com>
1664 * s-fileio.adb (Is_Open): Add check for usability of the underlying
1667 2007-08-14 Cyrille Comar <comar@adacore.com>
1669 * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
1670 since it is potentially used in cases implying double finalization of
1673 2007-08-14 Jose Ruiz <ruiz@adacore.com>
1675 * s-tasini.adb (Get_Stack_Info): Move this function to
1676 System.Soft_Links.Tasking because it is common to the full and the
1677 restricted run times.
1678 (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
1679 in SSL.Tasking.Init_Tasking_Soft_Links.
1681 * s-solita.adb (Get_Stack_Info): Function moved from
1682 System.Tasking.Initialization because it is common to the full and the
1683 restricted run times.
1684 (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
1686 2007-08-14 Arnaud Charlet <charlet@adacore.com>
1688 * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
1689 s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
1690 (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
1693 * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
1696 2007-08-14 Gary Dismukes <dismukes@adacore.com>
1698 * s-veboop.adb (SU): New named number initialized to
1699 System.Storage_Unit.
1700 (True_Val): The initialization expression is revised to use SU (=
1701 Storage_Unit) rather than assuming 8 for the component size of an
1702 unpacked Boolean array.
1704 2007-08-14 Tristan Gingold <gingold@adacore.com>
1706 * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
1708 * tb-ivms.c: New file.
1710 * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
1712 2007-08-14 Geert Bosch <bosch@adacore.com>
1714 * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
1715 s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
1716 Add required linker pragmas for automatically linking with the gnalasup
1717 linear algebra support library, and the systems math library.
1718 Rename cdot to cdotu and zdot to zdotu.
1719 Update header comment to describe purpose of package.
1721 2007-08-14 Thomas Quinot <quinot@adacore.com>
1723 * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
1724 an explicitly specified Associated_Final_Chain, use that list.
1725 (Expand_N_Package_Body): Build dispatch tables of library level tagged
1727 (Expand_N_Package_Declaration): Build dispatch tables of library level
1728 tagged types. Minor code cleanup.
1730 2007-08-14 Vincent Celier <celier@adacore.com>
1732 * gnatchop.adb (Terminate_Program): Remove exception and use
1733 Types.Terminate_Program instead.
1735 * osint.ads, osint.adb (Current_Exit_Status): New global variable
1736 (Find_Program_Name): Added protection against empty name.
1737 (OS_Exit_Through_Exception): New procedure
1739 * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
1740 (OS_Exit_Default): New procedure that contains the previous
1741 implementation of procedure OS_Exit.
1742 (Final_Value): Remove obsolete Interix stuff.
1744 2007-08-14 Thomas Quinot <quinot@adacore.com>
1746 * g-socket.ads: Reorganize example code so that it also works on
1749 2007-08-14 Tristan Gingold <gingold@adacore.com>
1751 * g-trasym.ads: AIX now supports symbolic backtraces.
1753 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1755 * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
1756 units being loaded to detect circularities. A circularity may be
1757 present even if the current chain of pending units to load starts from
1758 a limited_with_clause.
1760 * lib-load.ads: Change profile of Load_Unit to use a with_clause
1761 rather than a boolean flag, in order to detect circularities in
1764 * par-load.adb: Use current with_clause in calls to Load_Unit, rather
1765 than propagating the From_Limited_With flag, in order to handle
1766 properly circularities involving with_clauses.
1768 2007-08-14 Nicolas Setton <setton@adacore.com>
1770 * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
1773 2007-08-14 Arnaud Charlet <charlet@adacore.com>
1775 * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
1776 to build for libgnala.
1777 libgnat: Add rules to build libgnala.a
1778 (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
1779 target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
1780 Add s-osinte-vxworks-kernel.adb to the target pairs of the
1781 kernel run-time lib for VxWorks 6, which would provide a different
1782 implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
1783 x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
1784 running ZCX by default.
1785 Add g-sttsne-locking to LynxOS version.
1786 Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
1787 On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
1789 * system-darwin-x86.ads: New file.
1791 * Make-lang.in: Delete files before copying onto them, so if they are
1792 read-only, the copy won't fail.
1795 2007-08-14 Pascal Obry <obry@adacore.com>
1797 * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
1800 2007-08-14 Vincent Celier <celier@adacore.com>
1802 * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
1803 (Gcc): Initialize Gcc_Name at the first call
1805 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1807 * sem_ch7.adb (Analyze_Package_Specification): Do not install private
1808 with_clauses of the enclosing unit when analyzing the package
1809 specification of a nested instance.
1811 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1813 * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
1814 (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
1815 Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
1816 layout of N_Allocator.
1818 2007-08-14 Thomas Quinot <quinot@adacore.com>
1820 * rtsfind.adb (Check_RPC): Add PCS version check.
1822 * gnatvsn.ads, gnatvsn.adb: Add PCS version.
1823 (Gnat_Free_Software): New function.
1825 * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
1826 the PCS_Version value from s-parint, used to check that it is consistent
1827 with what exp_dist expects.
1829 * s-parint.ads (PCS_Version): New entity for checking consistency
1830 between exp_dist and PCS.
1832 * gen-soccon.c: (SO_REUSEPORT): New constant.
1834 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1836 * a-calfor.adb (Image (Duration; Boolean)): Change type of local
1837 variable Sub_Second to Duration in order to accomodate a larger range
1838 of arithmetic operations.
1840 2007-08-14 Bob Duff <duff@adacore.com>
1842 * g-sttsne-locking.ads: Move comments from spec to body.
1843 * g-sttsne-locking.adb: Move comments from spec to body.
1844 * g-sttsne-vxworks.ads: Removed.
1845 * g-sttsne-vxworks.adb: Removed.
1847 2007-08-11 Ian Lance Taylor <iant@google.com>
1849 * misc.c (gnat_get_alias_set): Change return type to
1852 2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1854 * decl.c, utils2.c: Fix whitespace in last change.
1856 2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1858 * decl.c (compare_field_bitpos): Constify.
1859 * utils2.c (compare_elmt_bitpos): Likewise.
1861 2007-07-27 Aurelien Jarno <aurelien@aurel32.net>
1863 * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
1864 anonymous access type.
1865 (pthread_sigmask): Now take an access sigset_t.
1867 2007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
1869 * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
1871 2007-06-21 Eric Botcazou <ebotcazou@adacore.com>
1873 PR tree-optimization/25737
1874 * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
1876 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1878 * trans.c (Attribute_to_gnu): When subtracting an
1879 offset from a pointer, use POINTER_PLUS_EXPR with
1880 NEGATE_EXPR instead of MINUS_EXPR.
1881 (gnat_to_gnu): Likewise.
1882 * utils.c (convert): When converting between
1883 thin pointers, use POINTER_PLUS_EXPR and sizetype
1885 * utils2.c (known_alignment): POINTER_PLUS_EXPR
1886 have the same semantics as PLUS_EXPR for alignment.
1887 (build_binary_op): Add support for the semantics of
1888 POINTER_PLUS_EXPR's operands.
1889 When adding an offset to a pointer, use POINTER_PLUS_EXPR.
1891 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1893 * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
1894 of get_signed_or_unsigned_type.
1895 * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1897 2007-06-11 Bob Duff <duff@adacore.com>
1898 Thomas Quinot <quinot@adacore.com>
1900 * g-stsifd-sockets.adb (Create): Work around strange behavior of
1901 'bind' on windows that causes 'connect' to fail intermittently, by
1902 retrying the 'bind'.
1903 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
1905 2007-06-10 Duncan Sands <baldrick@free.fr>
1907 * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
1908 than to void, for the fields when making a new fat pointer type.
1909 (gnat_substitute_in_type): Now substitute_in_type.
1910 * gigi.h (gnat_substitute_in_type): Likewise. Adjust recursive calls.
1911 * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
1912 * utils.c (update_pointer_to): Update fat pointers by updating the
1913 dummy node pointers used for the fields.
1915 2007-06-06 Thomas Quinot <quinot@adacore.com>
1916 Bob Duff <duff@adacore.com>
1918 * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
1919 g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
1920 g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
1921 constant Thread_Blocking_IO, always True by default, set False
1922 on a per-runtime basis.
1923 (Need_Netdb_Buffer): New constant.
1925 * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
1926 g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
1929 * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
1930 g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
1931 Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
1932 child package Task_Safe_NetDB
1933 (Host_Error_Messages): Add stub body.
1934 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
1936 * g-soccon-mingw.ads: Add Windows-specific constants.
1937 (Need_Netdb_Buffer): New constant.
1938 (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
1939 wrapper and import inet_addr(3) from the standard sockets library
1941 (In_Addr): Add alignment clause.
1942 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
1944 2007-06-06 Robert Dewar <dewar@adacore.com>
1946 * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
1947 s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
1948 s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
1949 s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
1950 s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
1951 s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
1952 a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
1953 a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
1954 a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
1955 g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
1956 g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
1957 i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
1958 s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
1959 s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
1960 s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
1961 s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
1962 s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
1963 s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
1964 s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
1965 s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
1966 s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
1967 s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
1968 s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
1969 s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
1970 s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
1971 s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
1972 s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
1973 s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
1974 s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
1975 s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
1976 s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
1977 a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
1978 Unchecked_* by Ada.Unchecked_*
1980 2007-06-06 Robert Dewar <dewar@adacore.com>
1982 * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
1983 s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
1984 g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
1985 output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
1986 g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
1987 a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
1989 * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,
1990 s-regexp.ads, s-regpat.adb, s-regpat.ads, s-string.adb, s-string.ads,
1991 s-tasloc.adb, s-tasloc.ads: New files.
1993 2007-06-06 Bob Duff <duff@adacore.com>
1996 (Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
1997 * g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
1998 (Send_Signal, Close): Raise Invalid_Process if the process id is
2000 (Pattern_Matcher_Access): Is now a general access type to be able to
2003 2007-06-06 Thomas Quinot <quinot@adacore.com>
2004 Arnaud Charlet <charlet@adacore.com>
2006 * a-intnam-aix.ads: Adjust comment to account for SIGADAABORT change
2007 (SIGEMT is now used instead of SIGTERM on AIX).
2009 * s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
2010 (Time_Slice_Supported): Set to True.
2011 Use SIGEMT instead of SIGTERM as SIGADAABORT.
2013 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2015 * a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
2016 (Time, Time)): Use To_Relative_Time rather than manual calculation to
2017 express the bounds of Duration as Time. Raise Time_Error when the
2018 result is greater or equal to the higher bound of Duration (on the
2020 ("+" (Time, Duration)): Reorder code. Remove the declaration of constant
2022 ("-" (Time, Duration)): Reorder code. Remove the declaration of constant
2024 ("-" (Time, Time)): Reorder code.
2025 (All_Leap_Seconds): Removed.
2026 (Arithmetic_Operations.Add): Remove sign related kludge.
2027 (Arithmetic_Operations.Difference): Control the leaps seconds processing
2028 with flag Leap_Support.
2029 (Arithmetic_Operations.Subtract): Remove sign related kludge.
2030 (Check_Within_Time_Bounds): New procedure.
2031 (Clock): Control the leap seconds processing with flag Leap_Support.
2032 (Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
2033 (Formatting_Operations.Split): Control the leap seconds processing with
2035 (Formatting_Operations.Time_Of): Control the leaps seconds processing
2036 with flag Leap_Support. Adjust the year, month and day (if applicable)
2037 when the value of day seconds designates a new day.
2038 (Split): Use parameter associations for better readability. Integrate
2040 (Time_Of): Use parameter associations for better readability. Integrate
2043 * a-calfor.adb (Split): Use parameter associations for better
2044 readability. Integrate flag Is_Ada_05.
2045 (Time_Of): Remove flag Leap_Checks. Use parameter associations for
2046 better readability. Integrate flag Is_Ada_05.
2048 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2050 * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
2051 s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
2052 s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
2053 s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
2054 s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
2055 s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
2056 s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
2057 s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
2058 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
2059 s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
2060 s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
2061 time when entering this routine to detect a backward clock setting
2062 (manual setting or DST adjustment), to avoid waiting for a longer delay
2064 (Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
2065 Remove handling of deferred priority change, and replace by setting the
2066 task priority directly, as required by AI-188.
2068 (Max_Task_Image_Length): New constant.
2069 Replace Warnings (Off) by Unreferenced pragma, cleaner.
2070 (Dynamic_Priority_Support): Removed, no longer needed.
2071 (Poll_Base_Priority_Change): Ditto.
2072 (Set_Ceiling): Add this procedure to change the ceiling priority
2073 associated to a lock. This is a dummy implementation because dynamic
2074 priority ceilings are not supported by the underlying system.
2076 * a-dynpri.adb (Set_Priority): Take into account case where Target is
2077 accepting a RV with its priority boosted.
2078 Remove handling of deferred priority change, and replace by setting the
2079 task priority directly, as required by AI-188.
2081 * s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
2083 Remove handling of deferred priority change, and replace by setting the
2084 task priority directly, as required by AI-188.
2085 (Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
2088 * s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
2089 (Poll_Base_Priority_Change): Removed.
2090 Code clean up: use SSL.Current_Target_Exception.
2092 * s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
2093 to run as this is a potentially dispatching point.
2094 (Call_Synchronous): Use Local_Defer_Abort.
2095 (Callable): Relax assertion.
2096 (Selective_Wait): Relax assertion in case abort is not allowed.
2097 Remove handling of deferred priority change, and replace by setting the
2098 task priority directly, as required by AI-188.
2100 * s-tasuti.adb (Make_Passive): Adjust assertions.
2101 Remove handling of deferred priority change, and replace by setting the
2102 task priority directly, as required by AI-188.
2104 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2106 * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
2107 system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
2108 system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
2109 system-vxworks-mips.ads, system-vxworks-alpha.ads,
2110 system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
2111 system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
2112 system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
2113 system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
2114 system-solaris-sparcv9.ads, system-vms.ads, system.ads,
2115 system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
2116 system-linux-ia64.ads: Document mapping between Ada and OS priorities.
2117 This patch changes the largest non-binary modulus from 2**31-1 to
2119 (Compiler_System_Version): Removed, no longer used.
2120 Clean up system files by removing flags only used on a single target.
2121 Also remove obsolete flags, only used during bootstrap from system.ads
2122 (Address): Add a pragma Preelaborable_Initialization.
2124 * system-aix.ads: Ditto.
2125 (GCC_ZCX_Support): Set to true.
2126 Update priority range on AIX and map Ada priorities to target
2127 priorities appropriately for different scheduling policies.
2129 * ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
2131 2007-06-06 Vincent Celier <celier@adacore.com>
2133 * mlib-tgt-specific.adb, mlib-tgt-specific.ads,
2134 mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
2136 * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
2137 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
2138 mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
2139 mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
2140 mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
2141 MLib.Tgt, containing the default versions of the exported subprograms.
2142 For each platform, create a specific version of the body of new child
2143 package MLib.Tgt.Specific that contains only the body of subprograms
2144 that are different from the default.
2145 (Archive_Builder_Append_Options): New function.
2147 2007-06-06 Matthew Gingell <gingell@adacore.com>
2149 * s-osinte-aix.adb: Map Ada priorities to target priorities
2150 appropriately for different scheduling policies.
2152 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2154 * s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
2156 Remove references to Unchecked_Conversion, and use Ada.xxx instead.
2157 Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
2159 2007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
2161 * s-osprim-vms.ads, s-osprim-vms.adb (Initialize): New procedure.
2162 Noop on VMS, added for interface commonality.
2164 2007-06-06 Eric Botcazou <ebotcazou@adacore.com>
2165 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2166 Olivier Hainque <hainque@adacore.com>
2168 * decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
2169 renamed expression of a full renaming at toplevel.
2170 (gnat_to_gnu_entity, case object): If not defining, do not look inside
2171 the values the constant is initialized to if it is an N_Allocator.
2172 (gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
2173 TYPE_SIZE_UNIT of inner types after the stride is elaborated.
2174 (make_aligning_type): Accept an extra ROOM argument for storage to be
2175 made available before the aligned field, and an extra BASE_ALIGN
2176 argument for callers to pass the alignment guaranteed to be honored for
2177 the whole aligning object. Avoid call to finish_record_type, which only
2178 interferes with the sizes we want to set.
2179 (gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
2180 make_aligning_type for super-aligned objects on stack.
2181 (components_to_record): Pass the adjusted size of the type when creating
2182 fields in the qualified union for the variant part.
2183 (gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
2184 (gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
2186 (maybe_pad_type): Set TYPE_USER_ALIGN.
2187 (make_aligning_type): Likewise.
2188 ALIGN argument is unsigned int.
2189 (gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
2190 (gnat_to_gnu_param): Likewise, for parameters.
2191 (gnat_to_gnu_entity) <object>: Always instantiate the renaming object
2192 if it is constant and stems from a function call.
2193 (gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
2194 of the record is specified. Adjust accordingly.
2195 (adjust_packed): New static function.
2196 (gnat_to_gnu_field): Use it to adjust the packedness setting.
2197 (components_to_record): Likewise.
2198 (gnat_to_gnu_entity) <object>: Do not test the renamed expression for
2199 side-effects if the object is deemed constant.
2200 (gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
2201 type instead of merely finalizing it. Tidy.
2202 <E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
2203 <E_Access_Type>: Likewise.
2204 (defer_debug_incomplete_list): Rename to defer_finalize_list.
2205 (defer_debug_level): Delete.
2206 (gnat_to_gnu_entity) <debug_deferred>: Likewise
2207 <E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
2209 <E_Record_Type>: Do not explicitly defer finalizing the type.
2210 Adjust for write_record_type_debug_info renaming.
2211 <E_Subprogram_Type>: Likewise.
2212 Finalize deferred types right after deferred incomplete types are
2214 (rest_of_type_decl_compilation): New global function.
2215 (components_to_record): Rename defer_debug parameter to do_not_finalize.
2216 (components_to_record): Propagate the packedness to the fields of the
2217 qualified union type if there is a variant part.
2218 (gnat_to_gnu_entity) <E_Array_Type>: Use new function
2219 instead of inline code to adjust the XUT field offsets.
2220 (gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
2221 <E_Record_Subtype>: Do not let finish_record_type compute the sizes
2222 and write the debug info if the type derives from a discriminated one.
2223 (gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
2224 <E_Array_Subtype>: Likewise.
2225 <E_String_Literal_Subtype>: Likewise.
2226 (gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
2227 an alignment clause.
2228 (maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
2229 before giving warning.
2230 (prepend_one_attribute_to): New function, helper to prepend an attribute
2231 to an attribute list.
2232 (gnat_to_gnu_entity) <E_Procedure>: Use it.
2233 (prepend_attributes): Likewise.
2234 (gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
2235 <E_Array_Type>: Declare the padding type for the element type, if any.
2236 <E_Array_Subtype>: Likewise.
2237 (defer_limited_with): New variable.
2238 (Gigi_Equivalent_Type): New function.
2239 (gnat_to_gnu_entity): Use it at start and use result throughout.
2240 (gnat_to_gnu_entity, case E_Access_Type): Rework to use
2241 Gigi_Equivalent_Type, support Limited_With, allow two levels of
2242 indirection, precompute if unconstrained array to simplify logic, and
2243 use defer_limited_with to defer elaboration of some types from limited
2245 (finalize_from_with_types): New function.
2247 2007-06-06 Gary Dismukes <dismukes@adacore.com>
2248 Eric Botcazou <ebotcazou@adacore.com>
2249 Tristan Gingold <gingold@adacore.com>
2250 Olivier Hainque <hainque@adacore.com>
2252 * trans.c (Identifier_to_gnu): Change test for deferred constant by
2253 adding guard that the entity is an E_Constant before testing presence
2254 of Full_view (and remove unnecessary test that entity is not a type).
2255 For a CONST_DECL used by reference, manually retrieve
2256 the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
2257 (struct language_function): Move from utils.c to here.
2258 (struct parm_attr): New structure.
2259 (parm_attr, parm_attr vector, parm_attr GC vector): New types.
2260 (f_parm_attr_cache): New macro.
2261 (Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
2262 expressions for the 'First, 'Last and 'Length attributes of the
2263 unconstrained array IN parameters.
2264 (Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
2265 Allocate the information structure for the function earlier, as well
2266 as the language-specific part.
2267 If the parameter attributes cache has been populated, evaluate the
2268 cached expressions on entry.
2269 (takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
2270 N_Procedure_Call_Statement and N_Indexed_Component.
2271 (Pragma_to_gnu): Translate inspection_point to an asm statement
2272 containaing a comment and a reference to the object (either its address
2273 for BLKmode or its value).
2274 (Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
2275 to go to DECL_INITIAL. Together with the size constraint relaxation
2276 in create_var_decl, enlarges the set of situations in which an
2277 identifier may be used as an initializer without implying elaboration
2279 (Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
2280 DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
2282 (maybe_stabilize_reference): Remove lvalues_only parameter.
2283 (gnat_stabilize_reference): Adjust for above change.
2284 (gnat_to_gnu): Do not set location information on the result
2285 if it is a reference.
2286 (add_cleanup): Add gnat_node parameter and set the location of the
2288 (Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
2289 (Exception_Handler_to_gnu_zcx): Likewise.
2290 (gigi): Remove the cgraph node if the elaboration procedure is empty.
2291 (Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
2292 the former right after the latter.
2293 (start_stmt_group): Make global.
2294 (end_stmt_group): Likewise.
2295 (gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
2297 (gnu_program_error_label_stack): Likewise.
2298 (gigi): Initialize them.
2299 (call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
2300 (gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
2302 (push_exception_label_stack): New function.
2303 (takes_address): New function.
2305 * utils.c (struct language_function): Move to trans.c from here.
2306 (unchecked_convert): Do not wrap up integer constants in
2308 (create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
2309 the latter for aggregate types, unexpected by later passes, and relax an
2310 arbitrary size constraint on the former.
2311 (create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
2312 to compare the sizes.
2313 (convert_vms_descriptor): When converting to a fat pointer type, be
2314 prepared for a S descriptor at runtime in spite of a SB specification.
2315 (shift_unc_components_for_thin_pointers): New function.
2316 (write_record_type_debug_info): For variable-sized fields, cap the
2317 alignment of the pointer to the computed alignment.
2318 (finish_record_type): Change HAS_REP parameter into REP_LEVEL.
2319 If REP_LEVEL is 2, do not compute the sizes.
2320 (build_vms_descriptor): Adjust for new prototype of finish_record_type.
2321 (build_unc_object_type): Likewise.
2322 (declare_debug_type): New function.
2324 * ada-tree.def: USE_STMT: removed (not emitted anymore).
2326 * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
2327 no statement is expandable anymore.
2328 (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
2329 (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
2330 when the user requested it explicitely.
2331 (gnat_post_options): By default, set flag_eliminate_unused_debug_types
2333 (get_alias_set): Return alias set 0 for a type if
2334 TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
2336 * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
2337 (DECL_FUNCTION_STUB): New accessor macro.
2338 (SET_DECL_FUNCTION_STUB): New setter macro.
2340 * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
2342 * fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
2345 2007-06-06 Jose Ruiz <ruiz@adacore.com>
2347 * s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
2348 Rename to Abort_Task_Interrupt to be able to keep the same interface
2349 as the rest of the targets.
2351 * s-osinte-vxworks.ads s-osinte-vxworks.adb
2352 (To_VxWorks_Priority): Remove explicit "in" mode indicator
2354 * s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
2357 2007-06-06 Robert Dewar <dewar@adacore.com>
2359 * a-chahan.ads: Remove obsolescent pragmas
2361 * a-chlat1.ads: Minor reformatting
2363 2007-06-06 Robert Dewar <dewar@adacore.com>
2365 * comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
2368 * errout.adb: New Finalize/Compilation_Errors/Output_Messages
2371 * errout.ads (Finalize): Changed interface
2372 (Output_Messages): New procedure
2373 (Compilation_Errors): New Interface
2375 * prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
2376 Finalize/Output_Messages interface for Errout
2377 (Prepare_To_Preprocess): New Finalize/Output_Messages interface for
2380 2007-06-06 Thomas Quinot <quinot@adacore.com>
2381 Olivier Hainque <hainque@adacore.com>
2382 Robert Dewar <dewar@adacore.com>
2384 * a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
2386 (Raise_Current_Excep): Call Debug_Raise_Exception just before
2387 propagation starts, to let debuggers know about the event in a reliable
2389 (Local_Raise): Moved to System.Exceptions
2390 More convenient to have this as a separate unit
2392 * s-except.adb, s-except.ads: New files.
2394 * a-exextr.adb (Unhandled_Exception): Delete - replaced by
2395 Debug_Unhandled_Exception in System.Exceptions where it belongs
2396 together with a couple of other debug helpers.
2397 (Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
2398 the former Unhandled_Exception.
2400 * exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
2401 (Warn_No_Exception_Propagation): New procedure
2402 (Warn_If_No_Propagation): Rewritten for new warning generation
2403 (Expand_Exception_Handlers): New warning generation
2404 (Expand_N_Raise_xxx_Error): Rewritten for new warnings
2405 (Add_Exception_Label): Use Special_Exception_Package_Used for test
2406 instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
2407 (Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
2408 even if restriction is set (makes life easier in Check_Returns)
2409 (Expand_Local_Exception_Handlers): Follow renamed entity chain when
2410 checking exception identities.
2411 (Expand_Local_Exception_Handlers): Do not optimize when all others case
2412 (Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
2413 block for handler (used by Check_Returns)
2414 (Expand_Local_Exception_Handlers): Local_Raise now takes an address
2415 (Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
2416 remove all exception handlers when optimizing local raise statements.
2417 (Find_Local_Handler): Use Get_Renamed_Entity
2418 (Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
2419 marked analyzed after expanding exception handlers, do not generate
2420 redundant cleanup actions, because they have been constructed already.
2422 2007-06-06 Thomas Quinot <quinot@adacore.com>
2424 * a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
2425 presence of this categorization pragma is mandated by the language.
2426 (Limited_Controlled): Add missing pragma Preelaborable_Initialization
2429 2007-06-06 Vincent Celier <celier@adacore.com>
2430 Robert Dewar <dewar@adacore.com>
2432 * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
2433 butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
2434 err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
2435 fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
2436 lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
2437 makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
2438 par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
2439 prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
2440 prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
2441 sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
2442 uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
2444 Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
2445 package Namet. Make File_Name_Type and Unit_Name_Type types derived from
2446 Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
2447 Use variables of types File_Name_Type and Unit_Name_Type in error
2449 (Get_Name): Add parameter Ignore_Special, and set it reading file name
2450 (New_Copy): When debugging the compiler, call New_Node_Debugging_Output
2452 Define flags Flag217-Flag230 with associated subprograms
2453 (Flag_Word5): New record type.
2454 (Flag_Word5_Ptr): New access type.
2455 (To_Flag_Word5): New unchecked conversion.
2456 (To_Flag_Word5_Ptr): Likewise.
2457 (Flag216): New function.
2458 (Set_Flag216): New procedure.
2460 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2462 * a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
2465 * a-stwifi.ads, a-stzfix.ads: Minor reformatting
2467 2007-06-06 Javier Miranda <miranda@adacore.com>
2469 * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to
2471 (Object_Specific_Data_Array): This is now internal to the package.
2472 (Object_Specific_Data): This is now internal to the package.
2473 (Select_Specific_Data_Element): This is now internal to the package.
2474 (Select_Specific_Data_Array): This is now internal to the package.
2475 (Select_Specific_Data): This is now internal to the package.
2476 (Offset_To_Top_Function_Ptr): This is now public.
2477 (To_Offset_To_Top_Function_Ptr): Removed.
2478 (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now
2479 local to subprogram Offset_To_Top.
2480 (Predefined_DT): Removed.
2481 (Typeinfo_Ptr): Removed.
2482 (OSD): This function is now internal to this package.
2483 (SSD): This function is now internal to this package.
2484 (DT): New function that displaces the pointer to the table of primitives
2485 to get access to the enclosing wrapper record.
2486 (IW_Membership): Code cleanup.
2487 (Offset_To_Top): Code cleanup.
2488 (Predefined_DT): Removed.
2489 (Register_Interface_Tag): Removed.
2490 (Set_Interface_Table): Removed.
2491 (Set_Offset_Index): Removed.
2492 (Set_Offset_To_Top): Code cleanup.
2494 (Set_Signature): Removed.
2496 (Set_Tagged_Kind): Removed.
2497 (Typeinfo_Ptr): Removed.
2499 (Displace): Add missing check on null actual.
2501 * exp_disp.ads, exp_disp.adb
2502 (Select_Expansion_Utilities): Removed.
2503 (Build_Common_Dispatching_Select_Statements): Moved to exp_atags.
2504 (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because
2505 the interface requires a new parameter.
2506 (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
2507 Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace
2508 calls to subprograms Build_T, Build_S, etc. by the corresponding code.
2509 Done to remove package Select_Expansion_Utilities.
2510 (Make_DT): New implementation for statically allocated dispatch tables.
2511 (Make_Secondary_DT): Moved to the scope of Make_DT.
2512 (Register_Primitive): Code cleanup plus incoporate the use of the new
2513 function DT_Address_Attribute.
2514 (Expand_Interface_Thunk): The profile of this subprogram has been
2515 changed to return the Thunk_Id and the corresponding code.
2516 (Fill_DT_Entry): Removed. Its functionality is now provided by
2517 subprogram Register_Primitive.
2518 (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by
2519 subprogram Register_Primitive.
2520 (Register_Primitive): New subprogram that incorporates the previous
2521 functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry.
2522 (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This
2523 was only required to call Make_DT_Access_Action, which is now removed.
2524 (Ada_Actions): Removed
2525 (Action_Is_Proc): Removed
2526 (Action_Nb_Arg): Removed
2527 Replace all the calls to Make_DT_Access_Action by direct calls to
2528 Make_Procedure_Call_Statement or Make_Function_Call.
2529 (Set_DTC_Entity_Value): New subprogram.
2530 (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value.
2531 (Expand_Interface_Thunk): Add missing support for primitives that are
2532 functions with a controlling result (case in which there is no need
2533 to generate the thunk).
2535 * exp_atag.ads, exp_atag.adb
2536 (Build_DT): New subprogram that displaces the pointer to reference the
2537 base of the wrapper record.
2538 (Build_Typeinfo_Offset): Removed.
2539 (RTE_Tag_Node): Removed.
2540 (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp
2541 (Build_Get_RC_Offset): Removed.
2542 (Build_Inherit_Predefined_Prims): Removed.
2543 (Build_Inherit_TSD: Removed.
2544 (Build_New_TSD): Removed.
2545 (Build_Set_External_Tag): Removed.
2546 (Build_Set_Predefined_Prim_Op_Address): Add documentation.
2547 (Build_Set_Prim_Op_Address): Add documentation.
2548 (Build_Set_TSD): Removed.
2550 * rtsfind.ads, rtsfind.adb
2551 (Load_Fail): If load fails and we are not in configurable run-time
2552 mode, then raise Unrecoverable_Error.
2553 (Text_IO_Kludge): Generate an error message if a run-time library is
2554 not available in a given run-time (ie. zfp run-time).
2555 (RTE_Record_Component): Add code to check that the component we search
2556 for is not found in two records in the given run-time package.
2557 (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed
2558 (RE_DT_Predef_Prims_Offset): New entity
2559 (RE_Static_Offset_To_Top): New entity
2560 (RE_HT_Link): New entity.
2561 (System_Address_Image): Addition of this run-time package.
2562 (RE_Address_Image): New entity.
2563 (RE_Abstract_Interface): Removed.
2564 (RE_Default_Prim_Op_Count): Removed.
2565 (RE_DT_Entry_Size): Removed.
2566 (RE_DT_Min_Prologue_Size): Removed.
2567 (RE_DT_Prologue_Size): Removed.
2568 (RE_Ifaces_Table_Ptr): Removed.
2569 (RE_Interface_Data_Ptr): Removed.
2570 (RE_Type_Specific_Data): Removed.
2571 (RE_Primary_DT): Removed.
2572 (RE_Register_Interface_Tag): Removed.
2573 (RE_Set_Offset_Index): Removed.
2574 (RE_Set_OSD): Removed.
2575 (RE_Set_SSD): Removed.
2576 (RE_Set_Signature): Removed.
2577 (RE_Set_Tagged_Kind): Removed.
2578 (RE_Address_Array): New entity.
2579 (RE_DT): New entity.
2580 (RE_Iface_Tag): New entity.
2581 (RE_Interfaces_Table): New entity.
2582 (RE_No_Dispatch_Table): New entity.
2583 (RE_NDT_Prims_Ptr): New entity.
2584 (RE_NDT_TSD): New entity.
2585 (RE_Num_Prims): New entity.
2586 (RE_Offset_To_Top_Function_Ptr): New entity.
2587 (RE_OSD_Table): New entity.
2588 (RE_OSD_Num_Prims): New entity.
2589 (RE_Predef_Prims): New entity
2590 (RE_Predef_Prims_Table_Ptr): New entity.
2591 (RE_Primary_DT): New entity.
2592 (RE_Signature): New entity.
2593 (RE_SSD): New entity.
2594 (RE_TSD): New entity.
2595 (RE_Type_Specific_Data): New entity.
2596 (RE_Tag_Kind): New entity.
2598 2007-06-06 Thomas Quinot <quinot@adacore.com>
2600 * a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
2601 C imported variable.
2602 (Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
2605 2007-06-06 Robert Dewar <dewar@adacore.com>
2607 * a-tienio.adb (Get): Adjust buffer size to accomodate one extra
2610 2007-06-06 Vincent Celier <celier@adacore.com>
2612 * a-tifiio.adb (Put, internal): For negative numbers, check that there
2613 is room for at least one digit and the minus sign.
2614 (Put.Put_Character): Never put a character outside of the range of
2617 2007-06-06 Olivier Hainque <hainque@adacore.com>
2618 Eric Botcazou <ebotcazou@adacore.com>
2620 * utils2.c (build_allocator): Provide the extra arguments to
2621 make_aligning_type for super-aligned objects allocated from the default
2622 pool. Leave enough room for a pointer before the aligning field, and
2623 store the system's allocator return value there.
2624 (build_call_alloc_dealloc): When releasing a super-aligned object,
2625 retrieve the system's allocator return value from where build_allocator
2626 has stored it, just ahead of the adjusted address we are passed.
2627 (build_call_raise): Handle properly the generation of line numbers when
2628 the node is marked No_Location.
2629 (compare_elmt_bitpos): Use tree_int_cst_compare. Stabilize the sort
2630 by using DECL_UID on ties.
2631 (build_binary_op) <EQ_EXPR>: Accept fat pointer types with the same
2633 (build_call_raise): Handle converting exception into goto; support new
2635 (build_component_ref): Add new arg to build_call_raise.
2637 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2639 * a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
2640 "." in the case of nnn.xxx when nnn terminates with an underscore.
2641 Parse the remaining "#" or ":" in the case of nnn#.xxx#
2643 2007-06-06 Robert Dewar <dewar@adacore.com>
2645 * a-tigeau.ads, a-tigeau.adb: (Store_Char): Change Buf to IN OUT
2647 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2648 Vincent Celier <celier@adacore.com>
2649 Robert Dewar <dewar@adacore.com>
2651 * bindgen.adb (Gen_Output_File_Ada): Generate pragma No_Run_Time when
2653 (Gen_Output_File_Ada, Gen_Output_File_C): Never use __attribute
2654 ((destructor)) for adafinal, even when switch -a is used.
2655 Do not issue pragma Linker_Destructor for adafinal when switch -a is
2657 (Gen_Object_Files_Options): Add formatting of Linker Options, when
2658 Output_Linker_Option_List is set. Suppress this formatting when
2659 Zero_Formatting is set.
2660 Add case for CLI_Target.
2661 (System_Restrictions_Used): New flag, used to avoid generating with of
2662 System_Restrictions and initialization of the data unless there is
2663 some use of System.Restrictions in the partition.
2664 (Check_System_Restrictions_Used): New procedure
2666 * s-stalib.adb: Remove with of System.Restrictions. No longer needed
2667 since we only with this unit in the binder file if it is used elsewhere
2670 2007-06-06 Vincent Celier <celier@adacore.com>
2672 * bindusg.adb: Add line for @<response file>
2673 Add lines for new switches -R and -Z
2675 * gnatbind.adb (Gnatbind): Do not include sources from the GNAT
2676 hierarchy in the list of files of the closure when -R is used
2677 (Gnatbind): Accept arguments starting with '@' to indicate response
2678 files and take the arguments from the response files.
2679 If List_Closure is set, display the referenced files
2681 2007-06-06 Javier Miranda <miranda@adacore.com>
2682 Robert Dewar <dewar@adacore.com>
2683 Ed Schonberg <schonberg@adacore.com>
2685 * checks.ads, checks.adb (Apply_Address_Clause_Check): Handle case in
2686 which the address-clause is applied to in-mode actuals (allowed by
2688 (Apply_Discriminant_Check): Do not generate a check if the type is
2689 constrained by a current instance.
2690 (Activate_Division_Check): New procedure
2691 (Activate_Overflow_Check): New procedure
2692 (Activate_Range_Check): New procedure
2693 Call these new Activate procedures instead of setting flags directly
2694 (Apply_Array_Size_Check): Removed, no longer needed.
2695 Code clean up: remove obsolete code related to GCC 2.
2696 (Get_E_Length): Protect against bomb in case scope is standard
2697 (Selected_Range_Checks): If the node to be checked is a conversion to
2698 an unconstrained array type, and the expression is a slice, use the
2699 bounds of the slice to construct the required constraint checks.
2700 Improve NOT NULL error messages
2701 (Apply_Constraint_Check): If the context is a null-excluding access
2702 type, diagnose properly the literal null.
2704 2007-06-06 Pascal Obry <obry@adacore.com>
2706 * clean.adb (Clean_Archive): Use untouched casing for the archive name
2707 and the corresponding .deps file.
2708 (Clean_Interface_Copy_Directory): Use untouched casing for the library
2709 src directory. Minor code-clean-up. Use untouched casing for files
2710 read into the library src dir.
2711 (Clean_Library_Directory): Idem.
2712 (Parse_Cmd_Line): Accept new switch -aP
2714 2007-06-06 Javier Miranda <miranda@adacore.com>
2715 Ed Schonberg <schonberg@adacore.com>
2716 Robert Dewar <dewar@adacore.com>
2717 Eric Botcazou <ebotcazou@adacore.com>
2718 Arnaud Charlet <charlet@adacore.com>
2720 * einfo.ads, einfo.adb (Available_View): New synthesized attribute
2721 applicable to types that have the With_Type flag set. Returns the
2722 non-limited view of the type, if available, otherwise the type itself.
2723 For class-wide types, there is no direct link in the tree, so we have
2724 to retrieve the class-wide type of the non-limited view of the Etype.
2725 New attributes Static_Initialization and Static_Elaboration_Desired.
2726 Remove the pragma Thread_Body, and the associated flag
2727 Is_Thread_Body in entities, and all related code.
2728 (Suppress_Value_Tracking_On_Call): New flag
2729 E_Exception has Esize and Alignment fields
2730 (Universal_Aliasing): New function.
2731 (Set_Universal_Aliasing): New procedure.
2732 (Write_Entity_Flags): Deal with Universal_Aliasing flag.
2733 (Check_Nested_Access): New procedure.
2734 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
2735 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
2736 (Related_Interface): New attribute. Present in dispatch table pointer
2737 components of records. Set to point to the entity of the corresponding
2739 (Is_By_Reference_Type): Recurse on the full view of an incomplete type.
2740 (Original_Access_Type): Remove, not needed.
2741 (Root_Type): Handle properly subtypes of class-wide-types.
2744 * sem_ch4.adb (Analyze_Explicit_Dereference): Add support for
2745 class-wide types visible through limited-with clauses.
2746 (Try_Primitive_Operation): When examining all primitive operations of a
2747 tagged type, do not consider subprograms labeled as hidden unless they
2748 belong to a private generic type with a tagged parent.
2749 (Try_Object_Operation): Extensive rewriting, to handle properly various
2750 overloading cases, when several ancestors may have class-wide operations
2751 that are possible candidates, and when the overloaded functions return
2752 array types and have defaulted parameters so that the call may be
2753 interpreted as an indexing.
2754 (Analyze_Allocator): Remove Mark_Allocator and its invocation.
2755 (Process_Function_Call): use Next, rather than Next_Actual, to analyze
2756 successive actuals before analyzing the call itself.
2757 (Try_Primitive_Operation): A primitive operation is compatible with the
2758 prefix if the prefix has a synchronized type and the type of the formal
2759 is its corresponding record, as can be the case when the primitive
2760 operation is declared outside of the body of the type.
2761 (Traverse_Homonyms): New subprocedure of Try_Class_Wide_Operation, to
2762 perform homonym traversal, looking for class-wide operation matches
2763 (formerly done in statements of Try_Class_Wide_Operation). Matches on
2764 access parameters are now restricted to anonymous access types.
2765 (Mark_Allocator): An allocator with a discriminant association parent is
2767 (Try_One_Prefix_Interpretation): If the type of the object is
2768 incomplete, as can be happen when it is a limited view obtained through
2769 a limited_with_clause, the selected component is not part of a prefixed
2771 (Complete_Object_Operation): Diagnose properly an object that is not
2772 aliased when the corresponding controlling formal is an access
2774 (Try_Primitive_Operation, Try_Class_Wide_Operation): Diagnose properly
2775 ambiguous calls in prefixed notation, where two primitives differ only
2776 in that the controlling argument of one is an access parameter.
2778 * sem_ch6.adb (Has_Single_Return): Add guard in code that determines
2779 whether a function that returns an unconstrained type can be inlined.
2780 (Process_Formals): Diagnose properly the illegal use of an incomplete
2781 type in the profile of an access_to_subprogram declaration.
2782 (Check_Synchronized_Overriding): Nothing check for concurrent types, the
2783 operations are attached to the corresponding record.
2784 (Analyze_Subprogram_Specification): Add variables Formal and Formal_Typ.
2785 When processing a primitive of a concurrent type which implements an
2786 interface change the type of all controlling formals to that of the
2787 corresponding record type.
2788 (Check_Synchronized_Overriding): Relax the conditional logic when trying
2789 to determine the tagged type to which a primitive belongs.
2790 (Check_Conventions): Capture condition to ignore a primitive operation
2791 (which is shared between the loop in Check_Conventions and the one in
2792 Check_Convention) in a new local function Skip_Check.
2793 (Check_Convention): Rename Prim_Op to Second_Prim_Op to avoid possible
2794 confusion with Check_Conventions' own Prim_Op local variable.
2795 (Create_Extra_Formals): Test for a tagged result type rather than a
2796 controlling result when determining whether to add a BIP_Alloc_Form
2797 formal and a BIP_Final_List formal to the function.
2798 (Check_Conformance); For parameters that are anonymous access types,
2799 subtype conformance requires that the not null and the constant
2800 indicators must match
2801 (Check_Synchronized_Overriding): New parameter Formal_Typ. Add machinery
2802 to retrieve the appropriate type when processing a concurrent type
2803 declared within a generic. Minor comment reformatting. Change invocation
2804 of Overrides_Synchronized_Primitive to Find_Overridden_Synchronized_Pri-
2806 (Analyze_Subprogram_Body): If the return type of a function is an
2807 anonymous access to the limited view of a class-wide type, and the
2808 non-limited view of the type is available, update the type of the
2809 function so that code can be generated.
2810 (Process_Formals): In case of access-subtype itype whose designated
2811 type is also an itype (situation that happens now with access to
2812 subprograms) we mark the access-type itype with the Has_Delayed_Freeze
2813 attribute to avoid backend problems.
2814 (Check_Return_Subtype_Indication): Replace R_Type with R_Stm_Type in
2815 init of R_Stm_Type_Is_Anon_Access. Also check that base types of the
2816 anonymous types' designated types are same before testing
2817 Subtypes_Statically_Match.
2818 (Create_Extra_Formals): Test for a named access parameter that is a
2819 controlling formal as an additional condition for adding an
2820 accessibility level formal. This can occur in the subp type created for
2821 dispatching calls in Expand_Dispatching_Call, and allows calling
2822 Create_Extra_Formals from that procedure rather than special-casing the
2823 extra formals there.
2824 (Create_Extra_Formals): Add BIP_Alloc_Form and BIP_Final_List formals
2825 when the function has a controlling result.
2826 (Check_Returns): Add much more knowledge of the optimization of local
2827 raise statements to gotos, to retain proper warnings in this case.
2828 (Check_Statement_Sequence): Ignore N_Push_xxx_Label and N_Pop_xxx_Label
2829 nodes when looking for last statement.
2831 * sem_type.ads, sem_type.adb (Specific_Type): Add support for
2832 class-wide types visible through limited with clauses.
2833 (Add_One_Interp): If the operands are anonymous access types, the
2834 predefined operator on universal_access is immediately visibles
2835 (Find_Unique_Type): Handle anonymous access to subprogram types just as
2836 other anonymous access types.
2837 (Disambiguate): Take into account CIL convention.
2838 (Interface_Present_In_Ancestor): Add support for class-wide interfaces.
2840 2007-06-06 Robert Dewar <dewar@adacore.com>
2842 * sinput.ads, sinput.adb, uintp.ads, urealp.adb, stringt.adb,
2843 sem_elim.adb, prj-strt.adb, repinfo.ads, repinfo.adb, namet.ads,
2844 elists.ads, elists.adb, lib.ads, lib.adb (Unlock): New procedure.
2845 Fix lower bound of tables.
2848 * nlists.adb: Ditto.
2849 (Prev_Node, Next_Node): Change index type to Int so that it properly
2850 covers the range First_Node_Id - 1 up.
2852 2007-06-06 Javier Miranda <miranda@adacore.com>
2853 Ed Schonberg <schonberg@adacore.com>
2854 Bob Duff <duff@adacore.com>
2855 Hristian Kirtchev <kirtchev@adacore.com>
2857 * exp_aggr.ads, exp_aggr.adb:
2858 (Build_Record_Aggr_Code): Add missing initialization of secondary tags
2859 in extension aggregates.
2860 (Flatten): Other conditions being met, an aggregate is static if the
2861 low bound given by component associations is different from the low
2862 bound of the base index type.
2863 (Packed_Array_Aggregate_Handled): If the component type is itself a
2864 packed array or record, the front-end must expand into assignments.
2865 (Gen_Ctrl_Actions_For_Aggr): In call to Init_Controller, pass False to
2866 Init_Pr, instead of Ancestor_Is_Expression.
2867 (Gen_Ctrl_Actions_For_Aggr): When processing an aggregate of a
2868 coextension chain root, either generate a list controller or use the
2869 already existing one.
2870 (Static_Array_Aggregate): New procedure to construct a positional
2871 aggregate that can be handled by the backend, when all bounds and
2872 components are compile-time known constants.
2873 (Expand_Record_Aggregate): Force conversion of aggregates of tagged
2874 types covering interface types into assignments.
2875 (Replace_Type): move to Build_Record_Aggr_Code.
2876 (Expand_Record_Aggr_Code): if the target of the aggregate is an
2877 interface type, convert to the definite type of the aggregate itself,
2878 so that needed components are visible.
2879 (Convert_Aggr_In_Object_Decl): If the aggregate has controlled
2880 components and the context is an extended return statement do not
2881 create a transient block for it, to prevent premature finalization
2882 before the return is executed.
2883 (Gen_Assign): Do not generate a call to deep adjust routine if the
2884 component type is itself an array of controlled (sub)-components
2885 initialized with an inner aggregate.
2886 (Component_Check): New name for Static_Check. This name is now more
2887 appropriate, and documentation is added which was missing.
2888 (Component_Check): Add test for bit aligned component value
2889 (Component_Not_OK_For_Backend): Renames Has_Delayed_Nested_Aggregate_Or_
2890 Tagged_Comps, name is more appropriate given added function below.
2891 (Component_Not_OK_For_Backend): Check for bit aligned component ref.
2893 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2894 Javier Miranda <miranda@adacore.com>
2895 Robert Dewar <dewar@adacore.com>
2897 * exp_attr.adb (Expand_N_Attribute_Reference): Case Callable and
2898 Terminated: Add unchecked type conversion from System.Address to
2899 System.Tasking.Task_Id when calling the predefined primitive
2901 Disable new Ada 05 accessibility check for JVM.NET targets, which
2902 cannot be implemented in a practical way.
2903 (Expand_N_Attribute_Reference: case Attribute_Tag): The use of 'Tag in
2904 the sources always references the tag of the actual object. Therefore,
2905 if 'Tag is applied in the sources to class-wide interface objects we
2906 generate code that displaces "this" to reference the base of the object.
2907 (Expand_N_Attribute_Reference, case Size): Return specified size if
2909 (Expand_N_Attribute_Reference): The expansion of the 'Address attribute
2910 has code that displaces the pointer of the object to manage interface
2911 types. However this code must not be executed when the prefix is a
2912 subprogram. This bug caused the wrong expansion of the internally
2913 generated assignment that fills the dispatch table when the primitive
2914 is a function returning a class-wide interface type.
2915 (Expand_N_Attribute_Reference:Attribute_Valid): Remove incorrect call to
2916 Set_Attribute_Name for Name_Unaligned_Valid.
2918 2007-06-06 Ed Schonberg <schonberg@adacore.com>
2919 Gary Dismukes <dismukes@adacore.com>
2921 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
2922 If the initialization is the equivalent aggregate of the initialization
2923 procedure of the type, do not remove it.
2924 (Expand_N_Attribute_Definition_Clause): Exclude access variables
2925 initialized to null from having their expression reset to empty and
2926 note this exception in the comment.
2928 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2929 Robert Dewar <dewar@adacore.com>
2930 Ed Schonberg <schonberg@adacore.com>
2931 Gary Dismukes <dismukes@adacore.com>
2933 * exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames.
2934 Add "with" and "use" clauses for Sem_Attr.
2935 (Expand_Current_Value): Do not replace occurences of attribute
2936 references where the prefix must be a simple name.
2938 * sem_attr.ads, sem_attr.adb: Remove "with" and "use" clauses for
2939 Namet. Add new arrays Attribute_Name_Modifies_Prefix and
2940 Attribute_Requires_Simple_Name_Prefix.
2941 (Name_Modifies_Prefix): Body of new function.
2942 (Requires_Simple_Name_Prefix): Body of new function.
2943 (Resolve_Attribute, case Access): Improve error message for case of
2944 mismatched conventions.
2945 (Analyze_Attribute, case 'Tag): The prefix the attribute cannot be of an
2947 (Analyze_Attribute, case 'Access): If the type of the prefix is a
2948 constrained subtype for a nominal unconstrained type, use its base type
2949 to check for conformance with the context.
2950 (Resolve_Attribute): Remove test of the access type being associated
2951 with a return statement from condition for performing accessibility
2952 checks on access attributes, since this case is now captured by
2953 Is_Local_Anonymous_Access.
2954 (Analyze_Access_Attribute): Set Address_Taken on entity
2955 (Analyze_Attribute, case Address): Set Address_Taken on entity
2956 (OK_Self_Reference): Traverse tree to locate enclosing aggregate when
2957 validating an access attribute whose prefix is a current instance.
2958 (Resolve_Attribute): In case of attributes 'Code_Address and 'Address
2959 applied to dispatching operations, if freezing is required then we set
2960 the attribute Has_Delayed_Freeze in the prefix's entity.
2961 (Check_Local_Access): Set flag Suppress_Value_Tracking_On_Call in
2962 current scope if access of local subprogram taken
2963 (Analyze_Access_Attribute): Check legality of self-reference even if the
2964 expression comes from source, as when a single component association in
2965 an aggregate has a box association.
2966 (Resolve_Attribute, case 'Access): Do not apply accessibility checks to
2967 the prefix if it is a protected operation and the attribute is
2968 Unrestricted_Access.
2969 (Resolve_Attribute, case 'Access): Set the Etype of the attribute
2970 reference to the base type of the context, to force a constraint check
2971 when the context is an access subtype with an explicit constraint.
2972 (Analyze_Attribute, case 'Class): If the prefix is an interface and the
2973 node is rewritten as an interface conversion. leave unanalyzed after
2974 resolution, to ensure that type checking against the context will take
2977 2007-06-06 Ed Schonberg <schonberg@adacore.com>
2978 Javier Miranda <miranda@adacore.com>
2979 Robert Dewar <dewar@adacore.com>
2981 * exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a
2982 wrapper when the full view of the controlling type of an inherited
2983 function that dispatches on result implements interfaces.
2984 (Expand_N_Object_Declaration): In cases where the type of the
2985 declaration is anonymous access, create finalization list for it.
2986 (Expand_N_Object_Declaration): Generate a persistent_bss directive only
2987 if the object has no explicit initialization, to match description of
2988 functionality of pragam Persistent_BSS.
2989 (Build_Equivalent_Array_Aggregate, Build_Equivalent_Record_Aggregate):
2990 new function to build static aggregates, to replace initialization call
2991 when static initialization is desired.
2992 (Freeze_Type): Generate a list controller for an access type whenever
2993 its designated type has controlled anonymous access discriminants.
2994 (Build_Equivalent_Aggregate): New procedure to compute a static
2995 aggregate to be used as default initialization for composite types,
2996 instead of a generating a call to the initialization procedure for the
2998 (Build_Initialization_Call): When available, replace a call to the
2999 initialization procedure with a copy of the equivalent static aggregate
3001 (Expand_N_Object_Declaration): Use New_Occurrence_Of in generated
3002 declarations for objects of a class-wide interface type, rather than
3003 just identifiers, to prevent visibility problems.
3004 (Expand_N_Object_Declaration): When expanding the declaration for an
3005 object of a class-wide interface type, preserve the homonym chain of
3006 the original entity before exchanging it with that of the generated
3007 renaming declaration.
3008 (Freeze_Enumeration_Type): Don't raise CE if No_Exception_Propagation
3009 active, because there is no way to handle the exception.
3010 (Freeze_Record_Type): In case of CPP_Class types add a call to Make_DT
3011 to do a minimum decoration of the Access_Disp_Table list.
3012 (Expand_Record_Controller): Avoid the addition of the controller between
3013 the component containing the tag of a secondary dispatch table and its
3014 adjacent component that stores the offset to the base of the object.
3015 This latter component is only generated when the parent type has
3016 discriminants ---documented in Add_Interface_Tag_Components).
3017 (Apply_Array_Size_Check): Removed, no longer needed.
3018 (Expand_N_Full_Type_Declaration): If the type has anonymous access
3019 components, create a Master_Entity for it only if it contains tasks.
3020 (Build_Init_Procedure): Suppress the tag assignment compiling under
3022 (Freeze_Record_Type): Remove code associated with creation of dispatch
3024 (Init_Secondary_Tags): Update type of actuals when generating calls to
3025 Ada.Tags.Set_Offset_To_Top
3026 (Stream_Operation_OK): Disable use of streams compiling under no
3028 (Expand_N_Object_Declaration): Don't do Initialize_Scalars initalization
3029 if Has_Init_Expression set.
3030 (Build_Init_Procedure): Replace call to Fill_DT_Entry by call to
3031 Register_Primitive, which provides the same functionality.
3032 (Requires_Init_Proc): Return false in case of interface types.
3033 (Add_Secondary_Tables): Use the new attribute Related_Interface to
3035 (Predefined_Primitive_Freeze): Do not assume that an internal entity
3036 is always associated with a predefined primitive because the internal
3037 entities associated with interface types are not predefined primitives.
3038 Therefore, the call to Is_Internal is replaced by a call to the
3039 function Is_Predefined_Dispatching_Operation.
3040 (Make_Eq_If): When generating the list of comparisons for the
3041 components of a given variant, omit the controller component that is
3042 present if the variant has controlled components.
3044 2007-06-06 Javier Miranda <miranda@adacore.com>
3045 Hristian Kirtchev <kirtchev@adacore.com>
3046 Bob Duff <duff@adacore.com>
3048 * exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to
3049 handle the creation of finalization lists and calls for nested
3050 coextensions when the root of the chains is part of a return statement.
3051 (Inside_A_Return_Statement): New function inside Complete_Coextension_
3053 (Expand_Record_Equality): Skip components that are interface types.
3054 (Displace_Allocator_Pointer): Add missing support for interface subtypes
3055 (Expand_N_Allocator): Replace invocation of Is_Local_Access_Discriminant
3056 with Rewrite_Coextension. Change the condition for detecting coextension
3058 (Is_Local_Access_Discriminant): Removed.
3059 (Rewrite_Coextension): New routine which rewrites a static coextension
3060 as a temporary and uses its unrestricted access in the construction of
3062 (Complete_Coextension_Finalization): New routine. Generate finalization
3063 attachment calls to all delayed coextensions.
3064 (Expand_N_Allocator): Call Complete_Coextension_Finalization whenever
3065 the allocator is not a coextension itself and has delayed coextensions.
3066 If the current allocator is controlled, but also a coextension, delay
3067 the generation of the finalization attachment call.
3068 Rename local variable "Node" to "Nod" in order to avoid confusion with
3070 (Expand_Allocator_Expression): Call Adjust for initialized allocators of
3071 limited types that are not inherently limited. Such an allocator is
3072 illegal, but is generated by the expander for a return statement, to
3073 copy the result onto the secondary stack. This is the only case where a
3074 limited object can be copied. Generate code to displace the pointer
3075 to the object if the qualified expression is a class-wide interface
3076 object. Such displacement was missing and hence the copy of the object
3078 (Apply_Accessibility_Check): Handle allocated objects initialized in
3080 (Displace_Allocator_Pointer): Subsidiary procedure to Expand_N_Allocator
3081 and Expand_Allocator_Expression. Allocating class-wide interface objects
3082 this routine displaces the pointer to the allocated object to reference
3083 the component referencing the corresponding secondary dispatch table.
3084 Expand_Allocator_Expression): Add missing support to allocate class-wide
3085 interface objects initialized with a qualified expression.
3086 (Get_Allocator_Final_List): Test for an anonymous access type that is a
3087 function result type, and use the finalization list associated with the
3088 function scope in that case (such an anonymous type should not be
3089 treated like an access parameter's type).
3091 2007-06-06 Ed Schonberg <schonberg@adacore.com>
3092 Gary Dismukes <dismukes@adacore.com>
3093 Javier Miranda <miranda@adacore.com>
3095 * exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a
3096 controlled type, use Make_Handler_For_Ctrl_Operation to construct the
3097 required exception handler.
3098 (Expand_Simple_Function_Return, Expand_N_Return_Statement): Handle
3099 properly the case of a function whose return type is a limited
3100 class-wide interface type. Modify the code of the accessibility
3101 check to handle class-wide interface objects. In this case we need to
3102 displace "this" to reference the primary dispatch table to get access
3103 to the TSD of the object (to evaluate its accessibility level).
3104 (Expand_N_Extended_Return_Statement): Test for a tagged result type
3105 rather than a controlling result as one of the conditions for
3106 generating tests of the implicit BIP_Alloc_Form formal. The
3107 initialization assignment is also handled according to whether the
3108 result is tagged instead of controlling.
3109 In the case where the init assignment is inserted in the "then" part of
3110 the allocation conditional, rewrite the target to be a dereference of
3111 the implicit BIP_Object_Access formal.
3112 If the returned value is unconstrained and created on the secondary
3113 stack, mark the enclosing block and function so that the secondary
3114 stack is not reclaimed on return.
3115 Treat returns from functions with controlling results similarly to
3116 returns from functions with unconstrained result subtypes.
3117 If the object returned is unconstrained, and an allocator must be
3118 created for it, analyze the allocator once the block for the extended
3119 return is installed, to ensure that finalizable components
3120 of the expression use the proper finalization list. Guard the call to
3121 Move_Final_List with a check that there is something to finalize.
3122 (Make_Tag_Ctrl_Assignment): Use "old" handling
3123 of controlled type assignment for virtual machines, since new code uses
3124 unsupported features (such as direct access to bytes in memory).
3126 2007-06-06 Gary Dismukes <dismukes@adacore.com>
3127 Ed Schonberg <schonberg@adacore.com>
3129 * exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
3130 accessibility actual, check for the case of an aliased object that has
3131 been rewritten as an Access attribute, and assign Prev to Prev_Orig so
3132 we fall into processing for the attribute rather than the name of the
3134 (Expand_Inline_Call): If an actual is a literal, and the corresponding
3135 formal has its address taken in the body, create a temporary to capture
3136 value. If the return type is a limited interface, do not treat the
3137 return value as Controlled.
3138 (Is_In_Place_Function): If the return type is a limited interface,
3139 treat as returning in place. The actual returned object may not always
3140 be limited, but the caller has to assume that it is returned in place.
3141 (Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
3142 context of an allocator, use the correct finalization chain (that is,
3143 the chain belonging to the access type, rather than the chain belonging
3144 to the current scope).
3145 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
3146 result type rather than a controlling result as a precondition for
3147 adding an allocation form actual to a build-in-place call.
3148 (Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
3149 (Freeze_Subprogram): Code cleanup. Remove all the code that register the
3150 primitive in the dispatch tables. This work is now done by Make_DT when
3152 (Register_Predefined_DT_Entry): Removed.
3153 (Add_Return): If end label is not present, use sloc of last statement
3154 for generated return statement in procedure, for better gdb behavior
3156 (Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
3157 object address nodes to ensure proper processing by routines like
3159 (Expand_Call): Fix generation of validity check for parameter
3160 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
3161 the allocation form parameter if the result subtype is constrained,
3162 except when the function has a controlling result.
3163 (Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
3164 rather than Is_Controlled and Has_Controlled_Component, since we want to
3165 include class-wide result types in this treatment. Also test for a
3166 controlling result, since that also requires passing a finalization
3168 (Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
3169 even when the result subtype is constrained, to handle calls involving
3170 controlling results.
3171 (Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
3172 is now called even when the result subtype is constrained, to handle
3173 calls involving controlling results.
3174 (Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
3175 on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
3176 now performs the test).
3177 (Make_Build_In_Place_Call_In_Object_Declaration):
3178 Add_Alloc_Form_Actual_* is now called even when the result subtype is