summaryrefslogtreecommitdiff
path: root/gcc/ada/rtsfind.ads
Commit message (Collapse)AuthorAgeFilesLines
* 2010-10-12 Thomas Quinot <quinot@adacore.com>charlet2010-10-121-8/+8
| | | | | | | | | | | | | | | * rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs, PolyORB case): Request is now a controlled type: we can declare the request on the stack, and we do not need explicit cleanup actions anymore. 2010-10-12 Bob Duff <duff@adacore.com> * s-rident.ads (Profile_Info): This variable is now constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165376 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-11 Robert Dewar <dewar@adacore.com>charlet2010-10-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-textio.adb: Minor reformatting 2010-10-11 Robert Dewar <dewar@adacore.com> * a-suesen.ads, a-suenst.ads, a-suesen.adb, a-suenst.adb, a-suewse.adb, a-suewst.adb, a-suewse.ads, a-suewst.ads, a-suezse.ads, a-suezst.ads, a-suezse.adb, a-suezst.adb: New name for string encoding packages. * impunit.adb: New names for string encoding units * Makefile.rtl: New names for string encoding units * rtsfind.ads: Minor code reorganization. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb: Code clean up. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Check_Limited_Return): Specialize warning on limited returns when in a generic context. (Analyze_Function_Return): ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165276 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-11 Vincent Celier <celier@adacore.com>charlet2010-10-111-0/+1
| | | | | | | | | | | | | | | | | | * Makefile.rtl: Add s-multip. * adaint.c: New function __gnat_number_of_cpus, implemented for Linux, defaulting to 1 for other platforms. * adaint.h: New function __gnat_number_of_cpus. * impunit.adb (Non_Imp_File_Names_12): New file list for Ada 2012, with a single component "s-multip". * impunit.ads (Kind_Of_Unit): New enumerated value Ada_12_Unit for Ada 2012. * rtsfind.ads (RTU_Id): New enumerated value System_Multiprocessors * s-multip.ads, s-multip.adb: New Ada 2012 package. * sem_ch10.adb (Analyze_With_Clause): Check also Ada 2012 units. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165274 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-08 Robert Dewar <dewar@adacore.com>charlet2010-10-081-0/+2
| | | | | | | | | | | | | | | | | | | | | * sem_aggr.adb: Minor reformatting. 2010-10-08 Robert Dewar <dewar@adacore.com> * exp_imgv.adb (Expand_Image_Attribute): Handle special calling sequence for soft hyphen for Character'Image case. * rtsfind.ads (Image_Character_05): New entry * s-imgcha.adb (Image_Character_05): New procedurew * s-imgcha.ads (Image_Character_05): New procedure * s-imgwch.adb (Image_Wide_Character): Deal with Ada 2005 soft hyphen case. * s-valcha.adb (Value_Character): Recognize SOFT_HYPHEN for 16#AD# * sem_attr.adb (Eval_Attribute, case Width): Handle soft_hyphen name properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165168 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-07 Robert Dewar <dewar@adacore.com>charlet2010-10-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | * exp_disp.adb, exp_dist.adb, exp_util.ads, exp_util.adb, exp_ch11.adb: Rename Full_Qualified_Name to Fully_Qualified_Name_String * sem_util.adb, sem_util.ads (Full_Qualified_Name): Moved to Exp_Util.Fully_Qualified_Name_String. 2010-10-07 Robert Dewar <dewar@adacore.com> * rtsfind.ads: Add entry for Ada.Real_Time.Timing_Events.Set_Handler * sem_res.adb (Resolve_Call): A call to Ada.Real_Time.Timing_Events.Set_Handler violates restriction No_Relative_Delay (AI-0211). 2010-10-07 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb: Small change in error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165092 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-07 Ed Schonberg <schonberg@adacore.com>charlet2010-10-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * par-ch5.adb (P_Sequence_Of_Statements): In Ada2012 a label can end a sequence of statements. 2010-10-07 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Check_Files): Only add a .ci files if it exists 2010-10-07 Javier Miranda <miranda@adacore.com> * a-tags.ads, a-tags.adb (Type_Is_Abstract): New subprogram. * rtsfind.ads (RE_Type_Is_Abstract): New entity. * exp_disp.adb (Make_DT): Initialize TSD component Type_Is_Abstract. 2010-10-07 Arnaud Charlet <charlet@adacore.com> * sem_ch12.adb (Mark_Context): Removed, no longer needed. (Analyze_Package_Instantiation): No longer analyze systematically a generic body in CodePeer mode. * freeze.adb, sem_attr.adb: Update comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165081 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-10 Eric Botcazou <ebotcazou@adacore.com>charlet2010-09-101-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_disp.adb: Minor reformatting. 2010-09-10 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Analyze_Pragma): Ignore Inline_Always pragma in CodePeer mode. 2010-09-10 Thomas Quinot <quinot@adacore.com> * sem_res.adb: Minor reformatting. * exp_ch9.adb, rtsfind.ads, exp_ch4.adb, exp_ch3.adb: Do not hardcode magic constants for task master levels (instead, reference named numbers from System.Tasking). 2010-09-10 Eric Botcazou <ebotcazou@adacore.com> * gnatvsn.ads (Ver_Prefix): New constant string. * bindgen.adb (Gen_Output_File_Ada): Use it in lieu of hardcoded value. (Gen_Output_File_C): Likewise. * g-comver.adb (Ver_Prefix): Add cross-reference to Gnatvsn.Ver_Prefix in comment. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Items): Do not traverse children of the main unit, to prevent spurious circularities in the walk order. (Depends_On_Main): Use elsewhere to prevent circularities when the body of an ancestor of the main unit depends on a child of the main unit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164157 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-07-13 Thomas Quinot <quinot@adacore.com>charlet2009-07-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | * rtsfind.ads, exp_dist.adb (RE_Allocate_Buffer): Runtime entry removed, not used anymore. (Exp_Dist.PolyORB_Support.Helpers.Assign_Opaque_From_Any): New subprogram, implements copy of an Any value into a limited object. (Exp_Dist.PolyORB_Support.Build_General_Calling_Stubs, Exp_Dist.PolyORB_Support.Build_Subprogram_Receiving_Stubs, Exp_Dist.PolyORB_Support.Helpers.Build_From_Any_Function): For the case of parameters of a limited type, use the above new subprogram. 2009-07-13 Emmanuel Briot <briot@adacore.com> * prj-nmsc.adb, prj-proc.adb, mlib.adb (Add_Source): new parameter Location. (Copy_ALI_Files): Avoid calls to read when pointing outside of the allocated space. (Error_Report): Remove global variable, replaced by parameters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149560 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-05-06 Ed Schonberg <schonberg@adacore.com>charlet2009-05-061-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | * sem_aggr.adb (Resolve_Record_Aggregate): If a defaulted component of an aggregate with box default is of a discriminated private type, do not build a subaggregate for it. A proper call to the initialization procedure is generated for it. 2009-05-06 Thomas Quinot <quinot@adacore.com> * rtsfind.adb, rtsfind.ads, exp_dist.adb, exp_dist.ads (Exp_Dist.Build_TC_Call, Build_From_Any_Call, Build_To_Any_Call): Use PolyORB strings to represent Ada.Strings.Unbounded_String value; use standard array code for Standard.String. (Exp_Dist): Bump PolyORB s-parint API version to 3. (Rtsfind): New entities TA_Std_String, Unbounded_String. 2009-05-06 Robert Dewar <dewar@adacore.com> * g-comlin.ads: Minor reformatting * xoscons.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147149 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-24 Ed Schonberg <schonberg@adacore.com>charlet2009-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_res.adb: additional optimization to inhibit creation of redundant transient scopes. 2009-04-24 Bob Duff <duff@adacore.com> * rtsfind.ads: Minor comment fix 2009-04-24 Emmanuel Briot <briot@adacore.com> * prj-proc.adb, prj-nmsc.adb (Find_Ada_Sources, Get_Path_Name_And_Record_Ada_Sources): merged, since these were basically doing the same work (for explicit or implicit sources). (Find_Explicit_Sources): renamed to Find_Sources to better reflect its role. Rewritten to share some code (testing that all explicit sources have been found) between ada_only and multi_language modes. 2009-04-24 Jerome Lambourg <lambourg@adacore.com> * sem_prag.adb (Check_Form_Of_Interface_Name): Allow space in Ext_Name for CLI imported types. (Analyze_Pragma): Allow CIL or Java imported functions returning access-to-subprogram types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146720 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-20 Ed Schonberg <schonberg@adacore.com>charlet2009-04-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch4.adb (Analyze_User_Defined_Binary_Op): If left operand is overloaded and one interpretation matches the context, label the operand with the type of first formal. 2009-04-20 Bob Duff <duff@adacore.com> * debug.ads: Minor comment fix. * debug.adb: Minor comment fixes. 2009-04-20 Javier Miranda <miranda@adacore.com> * rtsfind.ads (RE_Null_Id): New entity of package Ada.Exceptions * exp_ch6.adb (Expand_Inlined_Call): Undo previous patch. * exp_ch11.adb (Expand_N_Raise_Statement): When the raise stmt is expanded into a call to Raise_Exception, avoid passing the exception-name'identity in runtimes in which this argument is not used. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146416 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-20 Robert Dewar <dewar@adacore.com>charlet2009-04-201-0/+18
| | | | | | | | | | | | | | | | | | | | * s-conca5.adb, s-conca5.ads, s-conca7.adb, s-conca7.ads, s-conca9.adb, s-conca9.ads, rtsfind.ads, s-conca2.adb, s-conca2.ads, s-conca4.adb, s-conca4.ads, s-conca6.adb, s-conca6.ads, s-conca8.adb, s-conca8.ads, s-conca3.adb, s-conca3.ads (Str_Concat_Bounds_x): New functions. * exp_ch4.adb (Expand_Concatenate): Minor code reorganization 2009-04-20 Pascal Obry <obry@adacore.com> * initialize.c (__gnat_initialize): Add braces to kill warning. * adaint.c: Minor reformatting, untabify, remove trailing spaces. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146379 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-17 Robert Dewar <dewar@adacore.com>charlet2009-04-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Add documentation about No_Streams restriction * sem_attr.adb (Check_Stream_Attribute): Exclude implicit stream attributes when checking No_Streams restriction. 2009-04-17 Thomas Quinot <quinot@adacore.com> * rtsfind.ads (RE_Request_Destroy): New PolyORB s-parint entity. * exp_dist.adb (PolyORB_Support.Build_General_Calling_Stubs): Add missing calls to RE_Request_Destroy to deallocate request objects after use. 2009-04-17 Nicolas Setton <setton@adacore.com> * link.c: Fix support for passing a response file under Darwin. 2009-04-17 Emmanuel Briot <briot@adacore.com> * prj.adb (Free): new subprogram. 2009-04-17 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb: additional initialization on incomplete subtypes. * sem_ch6.adb (Process_Formals): if the subprogram is in the private part and one of the formals is an incomplete tagged type, attach to list of private dependends of the type for later validation. * sem_ch7.adb (Uninstall_Declarations): diagnose attempts to declare primitive operations of a Taft-amendmment type. * freeze.adb (Freeze_Entity): Remove tests on formals of an incomplete type. The check is performed on package exit, possibly after the subprogram is frozen. 2009-04-17 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Get_Directories): Get the object and exec directory before looking for source directories, but make sure that there are nil if they are not explicitely declared and there is explicitely no sources in the project. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146227 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-16 Robert Dewar <dewar@adacore.com>charlet2009-04-161-37/+62
| | | | | | | | | | * exp_ch6.adb: Add comments * rtsfind.ads: Add entries for s-conca? routines git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146160 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-10 Bob Duff <duff@adacore.com>charlet2009-04-101-1/+1
| | | | | | | | | | | | | | | | * rtsfind.ads: Minor code change: make RE_Unit_Table constant. * rtsfind.adb: Minor comment changes, and remove useless code. * sinfo.ads: Add ??? comment. 2009-04-10 Vincent Celier <celier@adacore.com> * vms_data.ads: Add missing GNAT SYNC VMS qualifiers -main= and -U git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145914 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-07 Robert Dewar <dewar@adacore.com>charlet2009-04-071-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_warn.adb (Check_Infinite_Loop_Warning.Test_Ref): Add defence against missing parent. 2009-04-07 Thomas Quinot <quinot@adacore.com> * xoscons.adb: Minor reformatting 2009-04-07 Robert Dewar <dewar@adacore.com> * rtsfind.ads: Remove obsolete string concatenation entries 2009-04-07 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_Concatenate): Redo handling of bounds 2009-04-07 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Check_Body_Required): Handle properly imported subprograms. 2009-04-07 Gary Dismukes <dismukes@adacore.com> * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case Attribute_Address): When Init_Or_Norm_Scalars is True and the object is of a scalar or string type then suppress the setting of the expression to Empty. * freeze.adb (Warn_Overlay): Also emit the warnings about default initialization for the cases of scalar and string objects when Init_Or_Norm_Scalars is True. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145694 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-08-22 Kevin Pouget <pouget@adacore.com>charlet2008-08-221-8/+2
| | | | | | | | | | | | | | | * s-shasto.ads, s-shasto.adb: Move Shared_Var_ROpen, Shared_Var_WOpen and Shared_Var_Close procedure specifications from package spec to package body. * rtsfind.ads: Remove RE_Shared_Var_Close, RE_Shared_Var_ROpen, RE_Shared_Var_WOpen entries. * exp_dist.adb: Update RE_Any_Content_Ptr to RE_Any_Container_Ptr in Build_To_Any_Call, Build_TypeCode_Call and Build_From_Any_Call procedures. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139445 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-08-04 Kevin Pouget <pouget@adacore.com>charlet2008-08-041-2/+9
| | | | | | | | | | | | | | | | | | * snames.h, snames.adb, snames.ads: Add Attr_To_Any, Attr_From_Any and Attr_TypeCode defines. * exp_dist.ads, exp_dist.adb: Add Build_From_Any_Call, Build_To_Any_Call and Build_TypeCode_Call procedures. * exp_attr.adb, sem_attr.adb: Add corresponding cases. * rtsfind.ads: Add corresponding names. * tbuild.adb: Update prefix restrictions to allow '_' character. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138598 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-08-01 Hristian Kirtchev <kirtchev@adacore.com>charlet2008-08-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | * rtsfind.ads: Add block IO versions of stream routines for Strings. * bindgen.adb, gnat_rm.texi, gnat_ugn.texi, opt.ads, sem_prag.adb, snames.adb, snames.ads, snames.h, par-prag.adb: Undo Canonical_Streams related changes. * s-rident.ads: Add new restriction No_Stream_Optimizations. * s-ststop.ads, s-ststop.adb: Comment reformatting. Define enumeration type to designate different IO mechanisms. Enchance generic package Stream_Ops_Internal to include an implementation of Input and Output. * exp_attr.adb (Find_Stream_Subprogram): If restriction No_Stream_Optimization is active, choose the default byte IO implementations of stream attributes for Strings. Otherwise use the corresponding block IO version. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138511 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-28 Robert Dewar <dewar@adacore.com>charlet2008-05-281-30/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | * restrict.ads: Add missing restrictions, and properly label all GNAT defined ones * rtsfind.ads: Add entry for Ada_Real_Time.Timing_Events.Timing_Event Add entry for Ada.Task_Termination.Set_Specific_Handler Add entry for Ada.Task_Termination.Specific_Handler * s-rident.ads: Add missing restrictions and properly mark all gnat defined ones * sem_ch3.adb: (Analyze_Object_Declaration): Check No_Local_Timing_Events restriction * sem_res.adb: (Resolve_Call): Check violation of No_Specific_Termination_Handlers * gnat_rm.texi: Add missing restrictions, and properly label all GNAT defined ones git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136087 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-26 Doug Rupp <rupp@adacore.com>charlet2008-05-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * s-vaflop.adb: (Return_D, Return_F, Return_G): New functions. * s-vaflop.ads: (Return_D, Return_F, Return_G): New functions. * exp_vfpt.adb: (Expand_Vax_Foreign_Return): New procedure * exp_vfpt.ads: (Expand_Vax_Foreign_Return): New procedure * rtsfind.ads: (RE_Return_D, RE_Return_F, RE_Return_G): New RE_Ids (RE_Return_D, RE_Return_F, RE_Return_G): New RE_Unit_Table elements * exp_ch6.adb: Import Exp_Vfpt (Expand_N_Function_Call): Call Expand_Vax_Foreign_Return. * s-vaflop-vms-alpha.adb: (Return_D, Return_F, Return_G): New functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135937 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-26 Thomas Quinot <quinot@adacore.com>charlet2008-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | * rtsfind.ads, rtsfind.adb: (RE_Get_RACW): New runtime library entity provided by PolyORB s-parint. (Check_RPC): Support per-PCS-kind API versioning. exp_dist.ads, exp_dist.adb: (Build_Stub_Tag, Get_Stub_Elements): New utility subprograms. (PolyORB_Support.Add_RACW_From_Any): Offload common code to new runtime library function Get_RACW. (PolyORB_Support.Add_RACW_To_Any): Offload common code to new runtime library function Get_Reference. (PolyORB_Support.Add_RACW_Read_Attribute): Use Get_RACW instead of going through an intermediate Any. (PolyORB_Support.Add_RACW_Write_Attribute): Use Get_Reference instead of going through an intermediate Any. * sem_dist.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135932 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-26 Hristian Kirtchev <kirtchev@adacore.com>charlet2008-05-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch3.adb (Build_Init_Statements): Alphabetize local variables. Create the statements which map a string name to protected or task entry indix. * exp_ch9.adb: Add with and use clause for Stringt. Minor code reformatting. (Build_Entry_Names): New routine. (Make_Initialize_Protection, Make_Task_Create_Call): Generate a value for flag Build_Entry_Names which controls the allocation of the data structure for the string names of entries. * exp_ch9.ads (Build_Entry_Names): New subprogram. * exp_util.adb (Entry_Names_OK): New function. * exp_util.ads (Entry_Names_OK): New function. * rtsfind.ads: Add RO_PE_Set_Entry_Name and RO_TS_Set_Entry_Name to enumerations RE_Id and RE_Unit_Table. * s-taskin.adb Add with and use clause for Ada.Unchecked_Deallocation. (Free_Entry_Names_Array): New routine. * s-taskin.ads: Comment reformatting. Add types String_Access, Entry_Names_Array, Entry_Names_Array_Access. Add component Entry_Names to record Ada_Task_Control_Block. (Free_Entry_Names_Array): New routine. * s-tassta.adb (Create_Task): If flag Build_Entry_Names is set, dynamically allocate an array of string pointers. This structure holds string entry names. (Free_Entry_Names): New routine. (Free_Task, Vulnerable_Free_Task): Deallocate the entry names array. (Set_Entry_Names): New routine. * s-tassta.ads: (Create_Task): Add formal Build_Entry_Names. The flag is used to control the allocation of the data structure which stores entry names. (Set_Entry_Name): New routine. * s-tpoben.adb: Add with and use clause for Ada.Unchecked_Conversion. (Finalize): Deallocate the entry names array. (Free_Entry_Names): New routine. (Initialize_Protection_Entries): When flag Build_Entry_Names is set, create an array of string pointers to hold the entry names. (Set_Entry_Name): New routine. * s-tpoben.ads: Add field Entry_Names to record Protection_Entries. (Initialize_Protection_Entries): Add formal Build_Entry_Names. (Set_Entry_Name): New routine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135896 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-20 Kevin Pouget <pouget@adacore.com>charlet2008-05-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_smem.ads, exp_smem.adb: Construction of access and assign routines has been replaced by an instantiation of System.Shared_Storage.Shared_Var_Procs generic package, while expanding shared variable declaration. Calls to access and assign routines have been replaced by calls to Read/Write routines of System.Shared_Storage.Shared_Var_Procs instantiated package. * rtsfind.ads: RE_Shared_Var_Procs entry has been added in RE_Unit_Table It identifies the new generic package added in s-shasto. * s-shasto.adb, s-shasto.ads: A new generic package has been added, it is instantiated for each shared passive variable. It provides supporting procedures called upon each read or write access by the expanded code. * sem_attr.adb: For this runtime unit (always compiled in GNAT mode), we allow stream attributes references for limited types for the case where shared passive objects are implemented using stream attributes, which is the default in GNAT's persistent storage implementation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135627 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ada/rwild2008-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_ugn.texi: Fix typos. * raise-gcc.c, repinfo.adb, repinfo.ads, restrict.adb, restrict.ads, rtsfind.adb, rtsfind.ads, s-arit64.ads, s-asthan-vms-alpha.adb, s-auxdec.ads, s-casuti.ads, s-fatflt.ads, s-fatgen.adb, s-fatlfl.ads, s-fatllf.ads, s-fatsfl.ads, s-filofl.ads, s-finimp.adb, s-finroo.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads, s-hibaen.ads, s-htable.ads, s-imgcha.adb, s-imgenu.ads, s-imgint.adb, s-imgrea.adb, s-inmaop-dummy.adb, s-inmaop.ads, s-interr-vms.adb, s-interr-vxworks.adb, s-interr.adb, s-interr.ads, s-intman-vxworks.ads, s-intman.ads, s-mastop-irix.adb, s-os_lib.adb, s-os_lib.ads, s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads, s-osinte-hpux.ads, s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.ads, s-osinte-rtems.ads, s-osinte-solaris-posix.ads, s-osprim-mingw.adb, s-osprim-vms.adb, s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-vms-restrict.ads, s-parame-vxworks.ads, s-parame.ads, s-parint.adb, s-parint.ads, s-poosiz.adb, s-proinf-irix-athread.ads, s-proinf.ads, s-regexp.adb, s-regpat.adb, s-regpat.ads, s-rident.ads: Fix comment typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134177 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-04-08 Javier Miranda <miranda@adacore.com>charlet2008-04-081-7/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Robert Dewar <dewar@adacore.com> Ed Schonberg <schonberg@adacore.com> * a-tags.adb (Register_Interface_Offset): New subprogram. (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment). (To_Predef_Prims_Table_Ptr): Removed. (Acc_Size): Removed. (To_Acc_Size): Removed. (Parent_Size): Modified to the call the subprogram returning the size of the parent by means of the new TSD component Size_Func. * a-tags.ads (Offset_To_Top_Ptr): New access type declaration. (DT_Offset_To_Top_Offset): New constant value that is used to generate code referencing the Offset_To_Top component of the dispatch table's prologue. (Prim_Ptr): New declaration of access to procedure. Used to avoid the use of 'address to initialize dispatch table slots. (Size_Func): New component of the TSD. Used by the run-time to call the size primitive of the tagged type. * checks.adb (Apply_Access_Check): Avoid check when accessing the Offset_To_Top component of a dispatch table. (Null_Exclusion_Static_Checks): If the non-null access type appears in a deferred constant declaration. do not add a null expression, to prevent spurious errors when full declaration is analyzed. (Apply_Discriminant_Check): If both discriminant constraints share a node which is not static but has no side effects, do not generate a check for that discriminant. (Generate_Index_Checks): Set Name_Req to true in call to duplicate subexpr, since the prefix of an attribute is a name. * checks.ads: Fix nit in comment. * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec and body of predefined primitives in case of CPP tagged type derivations. (Freeze_Type): Deal properly with no storage pool case (Make_Predefined_Primitive_Specs): Generate specification of abstract primitive Deep_Adjust if a nonlimited interface is derived from a limited interface. (Build_Dcheck_Functions): Create discriminant-checking functions only for variants that have some component(s). (Build_Slice_Assignment): In expanded code for slice assignment, handle properly the case where the slice bounds extend to the last value of the underlying representation. (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value (Is_Variable_Size_Record): An array component has a static size if index bounds are enumeration literals. * exp_disp.adb (Make_DT): Use the first subtype to determine whether an external tag has been specified for the type. (Building_Static_DT): Add missing support for private types. (Make_DT): Add declaration of Parent_Typ to ensure consistent access to the entity associated with the parent of Typ. This is done to avoid wrong access when the parent is a private type. (Expand_Interface_Conversion): Improve error message when the configurable runtime has no support for dynamic interface conversion. (Expand_Interface_Thunk): Add missing support to interface types in configurable runtime. (Expand_Dispatching_Call): remove obsolete code. (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and ensure that all subtypes and aggregates associated with dispatch tables have the attribute Is_Dispatch_Table_Entity set to true. (Register_Primitive): Rename one variable to improve code reading. Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o of the pointer to the 'size primitive in the TSD. * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity. (RE_Offset_To_Top_Ptr): New entity. (RE_Register_Interface_Offset): New entity. (RE_Set_Dynamic_Offset_To_Top): New entity. (RE_Set_Offset_To_Top): Removed entity. (RE_Prim_Ptr): New entity (RE_Size_Func): New entity (RE_Size_Ptr): New entity (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF. (Ada_Dispatching_Child): Define this new subrange. (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock, RE_Time_Span, and RE_Time_Span_Zero). (RE_Unit_Table): Add new required run-time calls * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching children. * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram. (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that initializes the Offset_To_Top component of a dispatch table. (Build_Predef_Prims): Removed. (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by its actual code. (Build_Set_Size_Function): New subprogram. * exp_ch13.adb: Do not generate storage variable for storage_size zero (Expand): Handle setting/restoring flag Inside_Freezing_Actions git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134020 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtsfind.adb (Check_CRT): Take into account RTE_Available_Callcharlet2007-12-131-6/+12
| | | | | | | | | | | Fixes another case where RTE_Available_Call was ignored instead of being taken into account. (Load_Fail): Ditto. * rtsfind.ads: Add new entries. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130848 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-09-10 Robert Dewar <dewar@adacore.com>charlet2007-09-101-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb, mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads, ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads, bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads, bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb, butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb, comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads, elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads, err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb, exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads, exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb, exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads, exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb, exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads, exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads, exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb, exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb, exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads, exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb, fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads, get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb, gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb, gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads, gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads, gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads, gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb, gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads, inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads, lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb, lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads, make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads, mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb, mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads, mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt, osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb, osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads, par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb, par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads, prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads, prj-util.adb, prj-util.ads, restrict.adb, restrict.ads, rtsfind.adb, rtsfind.ads, scn.adb, scn.ads, scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb, sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb, sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads, sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb, sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads, sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb, sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads, sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb, sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads, sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb, sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb, sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads, sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads, stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb, styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads, switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb, switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb, tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads, treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads, types.h, uintp.h, urealp.h, usage.adb, usage.ads, validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb, xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb, xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb, gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb, mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb, symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb, mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb, mlib-tgt-vms.ads: Replace headers with GPL v3 headers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128332 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-08-14 Javier Miranda <miranda@adacore.com>charlet2007-08-141-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-tags.ads, a-tags.adb (Displace): Associate a message with the raised CE exception. (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr, To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr, To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package spec. (Default_Prim_Op_Count): Removed. (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind, Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind): Remove pragma Inline_Always. * rtsfind.ads (Default_Prim_Op_Count): Removed (Max_Predef_Prims): New entity (RE_Expanded_Name): Removed (RE_HT_Link): Removed (RE_Iface_Tag): Remmoved (RE_Ifaces_Table): Removed (RE_Interfaces_Array): Removed (RE_Interface_Data_Element): Removed (RE_Nb_Ifaces): Removed (RE_RC_Offset): Removed (RE_Static_Offset_To_Top): Removed * exp_atag.ads (Build_Inherit_Prims): Addition of a new formal. (Build_Inherit_Predefined_Prims): Replace occurrences of Default_ Prim_Op_Count by Max_Predef_Prims. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127438 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-04-20 Javier Miranda <miranda@adacore.com>charlet2007-06-061-71/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to the package. (Object_Specific_Data_Array): This is now internal to the package. (Object_Specific_Data): This is now internal to the package. (Select_Specific_Data_Element): This is now internal to the package. (Select_Specific_Data_Array): This is now internal to the package. (Select_Specific_Data): This is now internal to the package. (Offset_To_Top_Function_Ptr): This is now public. (To_Offset_To_Top_Function_Ptr): Removed. (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now local to subprogram Offset_To_Top. (Predefined_DT): Removed. (Typeinfo_Ptr): Removed. (OSD): This function is now internal to this package. (SSD): This function is now internal to this package. (DT): New function that displaces the pointer to the table of primitives to get access to the enclosing wrapper record. (IW_Membership): Code cleanup. (Offset_To_Top): Code cleanup. (Predefined_DT): Removed. (Register_Interface_Tag): Removed. (Set_Interface_Table): Removed. (Set_Offset_Index): Removed. (Set_Offset_To_Top): Code cleanup. (Set_OSD): Removed. (Set_Signature): Removed. (Set_SSD): Removed. (Set_Tagged_Kind): Removed. (Typeinfo_Ptr): Removed. (TSD): Removed. (Displace): Add missing check on null actual. * exp_disp.ads, exp_disp.adb (Select_Expansion_Utilities): Removed. (Build_Common_Dispatching_Select_Statements): Moved to exp_atags. (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because the interface requires a new parameter. (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec, Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace calls to subprograms Build_T, Build_S, etc. by the corresponding code. Done to remove package Select_Expansion_Utilities. (Make_DT): New implementation for statically allocated dispatch tables. (Make_Secondary_DT): Moved to the scope of Make_DT. (Register_Primitive): Code cleanup plus incoporate the use of the new function DT_Address_Attribute. (Expand_Interface_Thunk): The profile of this subprogram has been changed to return the Thunk_Id and the corresponding code. (Fill_DT_Entry): Removed. Its functionality is now provided by subprogram Register_Primitive. (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by subprogram Register_Primitive. (Register_Primitive): New subprogram that incorporates the previous functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry. (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This was only required to call Make_DT_Access_Action, which is now removed. (Ada_Actions): Removed (Action_Is_Proc): Removed (Action_Nb_Arg): Removed Replace all the calls to Make_DT_Access_Action by direct calls to Make_Procedure_Call_Statement or Make_Function_Call. (Set_DTC_Entity_Value): New subprogram. (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value. (Expand_Interface_Thunk): Add missing support for primitives that are functions with a controlling result (case in which there is no need to generate the thunk). * exp_atag.ads, exp_atag.adb (Build_DT): New subprogram that displaces the pointer to reference the base of the wrapper record. (Build_Typeinfo_Offset): Removed. (RTE_Tag_Node): Removed. (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp (Build_Get_RC_Offset): Removed. (Build_Inherit_Predefined_Prims): Removed. (Build_Inherit_TSD: Removed. (Build_New_TSD): Removed. (Build_Set_External_Tag): Removed. (Build_Set_Predefined_Prim_Op_Address): Add documentation. (Build_Set_Prim_Op_Address): Add documentation. (Build_Set_TSD): Removed. * rtsfind.ads, rtsfind.adb (Load_Fail): If load fails and we are not in configurable run-time mode, then raise Unrecoverable_Error. (Text_IO_Kludge): Generate an error message if a run-time library is not available in a given run-time (ie. zfp run-time). (RTE_Record_Component): Add code to check that the component we search for is not found in two records in the given run-time package. (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed (RE_DT_Predef_Prims_Offset): New entity (RE_Static_Offset_To_Top): New entity (RE_HT_Link): New entity. (System_Address_Image): Addition of this run-time package. (RE_Address_Image): New entity. (RE_Abstract_Interface): Removed. (RE_Default_Prim_Op_Count): Removed. (RE_DT_Entry_Size): Removed. (RE_DT_Min_Prologue_Size): Removed. (RE_DT_Prologue_Size): Removed. (RE_Ifaces_Table_Ptr): Removed. (RE_Interface_Data_Ptr): Removed. (RE_Type_Specific_Data): Removed. (RE_Primary_DT): Removed. (RE_Register_Interface_Tag): Removed. (RE_Set_Offset_Index): Removed. (RE_Set_OSD): Removed. (RE_Set_SSD): Removed. (RE_Set_Signature): Removed. (RE_Set_Tagged_Kind): Removed. (RE_Address_Array): New entity. (RE_DT): New entity. (RE_Iface_Tag): New entity. (RE_Interfaces_Table): New entity. (RE_No_Dispatch_Table): New entity. (RE_NDT_Prims_Ptr): New entity. (RE_NDT_TSD): New entity. (RE_Num_Prims): New entity. (RE_Offset_To_Top_Function_Ptr): New entity. (RE_OSD_Table): New entity. (RE_OSD_Num_Prims): New entity. (RE_Predef_Prims): New entity (RE_Predef_Prims_Table_Ptr): New entity. (RE_Primary_DT): New entity. (RE_Signature): New entity. (RE_SSD): New entity. (RE_TSD): New entity. (RE_Type_Specific_Data): New entity. (RE_Tag_Kind): New entity. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125379 138bc75d-0d04-0410-961f-82ee72b054a4
* New file.charlet2007-04-061-211/+133
| | | | | | | Resync. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123611 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtsfind.adb: Remove s-polint from comment as it exists no more.charlet2006-10-311-265/+281
| | | | | | | | | | | | | | | | | * rtsfind.ads: Move entity RE_Get_Active_Partition_Id to package System.DSA_Services. Move all the entities in obsolete package System.PolyORB_Interface to System.Partition_Interface. (RE_Storage_Size): New function in System.Tasking. (RE_Get_Ceiling): New entity. (RE_Set_Ceiling): New entity. (RO_PE_Get_Ceiling): New entity. (RO_RE_Set_Ceiling): New entity. (Inherit_CPP_DT): New entity git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118296 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-02-13 Javier Miranda <miranda@adacore.com>charlet2006-02-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gary Dismukes <dismukes@adacore.com> * exp_ch3.adb (Component_Needs_Simple_Initialization): Add check for availability of RE_Interface_Tag. (Build_Initialization_Call): Fix wrong access to the discriminant value. (Freeze_Record_Type): Do not generate the tables associated with timed and conditional dispatching calls through synchronized interfaces if compiling under No_Dispatching_Calls restriction. When compiling for Ada 2005, for a nonabstract type with a null extension, call Make_Controlling_Function_Wrappers and insert the wrapper function declarations and bodies (the latter being appended as freeze actions). (Predefined_Primitive_Bodies): Do not generate the bodies of the predefined primitives associated with timed and conditional dispatching calls through synchronized interfaces if we are compiling under No_Dispatching_Calls. (Build_Init_Procedure): Use RTE_Available to check if a run-time service is available before generating a call. (Make_Controlling_Function_Wrappers): New procedure. (Expand_N_Full_Type_Declaration): Create a class-wide master for access-to-limited-interfaces because they can be used to reference tasks that implement such limited interface. (Build_Offset_To_Top_Functions): Build the tree corresponding to the procedure spec and body of the Offset_To_Top function that is generated when the parent of a type with discriminants has secondary dispatch tables. (Init_Secondary_Tags): Handle the case in which the parent of the type containing secondary dispatch tables has discriminants to generate the correct arguments to call Set_Offset_To_Top. (Build_Record_Init_Proc): Add call to Build_Offset_To_Top_Functions. * a-tags.ads, a-tags.adb: (Check_Index): Removed. Add Wide_[Wide_]Expanded_Name. (Get_Predefined_Prim_Op_Address): New subprogram that provides exactly the same functionality of Get_Prim_Op_Address but applied to predefined primitive operations because the pointers to the predefined primitives are now saved in a separate table. (Parent_Size): Modified to get access to the separate table of primitive operations or the parent type. (Set_Predefined_Prim_Op_Address): New subprogram that provides the same functionality of Set_Prim_Op_Address but applied to predefined primitive operations. (Set_Signature): New subprogram used to store the signature of a DT. (Displace): If the Offset_To_Top value is not static then call the function generated by the expander to get such value; otherwise use the value stored in the table of interfaces. (Offset_To_Top): The type of the actual has been changed to Address to give the correct support to tagged types with discriminants. In this case this value is stored just immediately after the tag field. (Set_Offset_To_Top): Two new formals have been added to indicate if the offset_to_top value is static and hence pass this value to the run-time to store it in the table of interfaces, or else if this value is dynamic and then pass to the run-time the address of a function that is generated by the expander to provide this value for each object of the type. * rtsfind.ads (Default_Prin_Op_Count): Removed. (Default_Prim_Op_Count): New entity (Get_Predefined_Prim_Op_Address): New entity (Set_Predefined_Prim_Op_Address): New entity (RE_Set_Signature): New entity git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111059 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-12-05 Javier Miranda <miranda@adacore.com>charlet2005-12-091-14/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hristian Kirtchev <kirtchev@adacore.com> * a-tags.ads, a-tags.adb (Offset_To_Top): Moved from the package body to the specification because the frontend generates code that uses this subprogram. (Set_Interface_Table): Add missing assertion. Update documentation describing the run-time structure. (Displace): New subprogram that displaces the pointer to the object to reference one of its secondary dispatch tables. (IW_Membership): Modified to use the new table of interfaces. (Inherit_TSD): Modified to use the new table of interfaces. (Register_Interface_Tag): Use the additional formal to fill the contents of the new table of interfaces. (Set_Interface_Table): New subprogram that stores in the TSD the pointer to the table of interfaces. (Set_Offset_To_Top): Use the additional formal to save copy of the offset value in the table of interfaces. Update structure of GNAT Primary and Secondary dispatch table diagram. Add comment section on GNAT dispatch table prologue. (Offset_To_Signature): Update the constant value of the Signature field. (Dispatch_Table): Update comment on hidden fields in the prologue. (Get_Entry_Index, Get_Prim_Op_Kind, Get_Offset_Index, OSD, Set_Entry_Index, Set_Offset_Index, Set_Prim_Op_Kind, SSD, TSD): Change the type of formal parameter T to Tag, introduce additional assertions. (Get_Num_Prim_Ops, Set_Num_Prim_Ops): Remove an unnecessary type conversion. (Get_Tagged_Kind, Set_Tagged_Kind): New bodies. * exp_ch6.adb (Register_Interface_DT_Entry): Remove the Thunk_Id actual in all the calls to Expand_Interface_Thunk. Instead of referencing the record component containing the tag of the secondary dispatch table we have to use the Offset_To_Top run-time function to get this information; otherwise if the pointer to the base of the object has been displace we get a wrong value if we use the 'position attribute. * exp_disp.adb (Expand_Interface_Thunk): Remove the Thunk_Id actual in all the calls to Expand_Interface_Thunk. (Make_Secondary_DT): Secondary dispatch tables do not have a table of interfaces; hence the call to Set_Interface_Table was clearly wrong. (Collect_All_Interfaces): Modify the internal subprogram Collect to ensure that the interfaces implemented by the ancestors are placed at the header of the generated list. (Expand_Interface_Conversion): Handle the case in which the displacement associated with the interface conversion is not statically known. In this case we generate a call to the new run-time subprogram Displace. (Make_DT): Generate and fill the new table of interfaces. (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Add entries for Get_Tagged_Kind and Set_Tagged_Kind. (Tagged_Kind): New function that determines the tagged kind of a type with respect to limitedness and concurrency and returns a reference to RE_Tagged_Kind. (Make_Disp_Asynchronous_Select_Body, Make_Disp_Conditional_Select_Body, Make_Disp_Timed_Select_Body): Correctly retrieve the pointer to the primary dispatch table for a type. (Make_DT, Make_Secondary_DT): Set the tagged kind in the primary and secondary dispatch table respectively of a tagged type. * exp_disp.ads (Expand_Interface_Thunk): Remove Thunk_Id formal. (Expand_Interface_Conversion): New subprogram to indicate if the displacement of the type conversion is statically known. (DT_Access_Action): Add values Get_Tagged_Kind and Set_Tagged_Kind. * rtsfind.ads (RE_Offset_To_Top): New entity (RTU_Id): Add Ada_Task_Termination to the list so that it is made accessible to users. (Re_Displace): New entity (RE_Interface_Data): New entity (RE_Set_Interface_Data): New_Entity (RE_Id, RE_Unit_Table): Add entry for RE_Get_Tagged_Kind, Set_Tagged_Kind, RE_Tagged_Kind, RE_TK_Abstract_Limited_Tagged, RE_TK_Abstract_Tagged, RE_TK_Limited_Tagged, RE_TK_Protected, RE_TK_Tagged, RE_TK_Task. * exp_ch3.adb (Init_Secondary_Tags): Modify the subprogram Init_Secondary_Tags_Internal to allow its use with interface types and also to generate the code for the new additional actual required by Set_Offset_To_Top. (Build_Init_Statements): In case of components associated with abstract interface types there is no need to generate a call to its IP. (Freeze_Record_Type): Generate Select Specific Data tables only for concurrent types. (Make_Predefined_Primitive_Specs, Predefined_Primitive_Bodies): Generate the bodies and specifications of the predefined primitive operations dealing with dispatching selects and abort, 'Callable, 'Terminated only for concurrent types. * exp_sel.ads, exp_sel.adb: New files. * exp_ch9.adb (Build_Protected_Entry, Expand_N_Protected_Body, Expand_N_Protected_Type_Declaration, Make_Initialize_Protection): Handle properly protected objects and attach handler in the case of the restricted profile. Move embeded package Select_Expansion_Utilities into a separate external package. (Expand_N_Asynchronous_Select, Expand_N_Conditional_Select, Expand_N_Timed_Entry_Call): Correct calls external package Exp_Sel. (Build_K, Build_S_Assignment): New subprograms, part of the select expansion utilities. (Expand_N_Asynchronous_Select, Expand_N_Conditional_Entry_Call, Expand_N_Timed_Entry_Call): Optimize expansion of select statements where the trigger is a dispatching procedure of a limited tagged type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108284 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-11-14 Hristian Kirtchev <kirtchev@adacore.com>charlet2005-11-151-8/+77
| | | | | | | | | | | | | | | | | | | | | | | Javier Miranda <miranda@adacore.com> * rtsfind.ads, exp_util.adb, exp_util.ads, exp_disp.adb, exp_disp.ads, exp_ch7.adb, sem_ch9.adb, snames.adb, snames.ads, exp_ch9.adb, exp_ch9.ads, exp_ch6.adb, exp_ch3.adb, exp_ch3.ads, einfo.ads, einfo.adb: Complete support for Ada 2005 interfaces. * a-tags.ads, a-tags.adb: Major rewrite and additions to implement properly new Ada 2005 interfaces (AI-345) and add run-time checks (via assertions). * exp_dbug.ads, exp_dbug.adb (Get_Secondary_DT_External_Name): New subprogram that generates the external name associated with a secondary dispatch table. (Get_Secondary_DT_External_Name): New subprogram that generates the external name associated with a secondary dispatch table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106965 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-09-01 Hristian Kirtchev <kirtchev@adacore.com>charlet2005-09-051-31/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Javier Miranda <miranda@adacore.com> Gary Dismukes <dismukes@adacore.com> Ed Schonberg <schonberg@adacore.com> * a-tags.adb (IW_Membership): Give support to "Iface_CW_Typ in T'Class". For this purpose the functionality of this subprogram has been extended to look for the tag in the ancestors tag table. Update the structure of the GNAT Dispatch Table to reflect the additional two tables used in dispatching selects. Introduce appropriate array types and record components in Type_Specific_Data to reflect the two tables. (Get_Entry_Index, Set_Entry_Index): Retrieve and set the entry index in the TSD of a tag, indexed by position. (Get_Prim_Op_Kind, Set_Prim_Op_Kind): Retrieve and set the primitive operation kind in the TSD of a tag, indexed by position. * a-tags.ads: Introduce an enumeration type to capture different primitive operation kinds. Define a constant reflecting the number of predefined primitive operations. (Get_Entry_Index, Set_Entry_Index): Set and retrieve the entry index of an entry wrapper. (Get_Prim_Op_Kind, Set_Prim_Op_Kind): Set and retrieve the kind of callable entity of a primitive operation. * exp_ch3.adb (Freeze_Record_Type): Generate the declarations of the primitive operations used in dispatching selects for limited interfaces, limited tagged, task and protected types what implement a limited interface. (Freeze_Type): Generate the bodies of the primitive operations used in dispatching selects for limited tagged, task and protected types that implement a limited interface. Generate statements to populate the two auxiliary tables used for dispatching in select statements. (Freeze_Record_Type): Add call to initialize the dispatch table entries associated with predefined interface primitive operations. (Build_Dcheck_Function): Change Set_Subtype_Mark to Set_Result_Definition. (Build_Variant_Record_Equality): Change Subtype_Mark to Result_Definition. (Freeze_Enumeration_Type): Change Subtype_Mark to Result_Definition. (Predef_Spec_Or_Body): Change Subtype_Mark to Result_Definition. (Build_Assignment): Simplify the code that adds the run-time-check. (Expand_N_Object_Declaration): Code cleanup. * exp_ch7.adb (Make_Clean): Select the appropriate type for locking entries when there is a protected type that implements a limited interface. * exp_ch9.adb: Add package Select_Expansion_Utilities that contains common routines used in expansion of dispatching selects. (Add_Private_Declarations): Select the appropriate protection type when there is a protected type that implements a limited interface. (Build_Parameter_Block): Generate a wrapped parameter block. (Build_Protected_Subprogram_Body): Select the appropriate type for locking entries when there is a protected type that implements a limited interface. (Build_Wrapper_Spec): Set the flag and wrapped entity for procedures classified as entry wrappers. (Expand_N_Asynchronous_Select): Add support for expansion of dispatching asynchronous selects. (Expand_N_Conditional_Entry_Call): Add support for expansion of dispatching conditional selects. (Expand_N_Protected_Type_Declaration): Select the appropriate type for protection when there is a protected type that implements limited interfaces. (Expand_N_Timed_Entry_Call): Add support for expansion of dispatching timed selects. (Extract_Dispatching_Call): Extract the entity of the name of a dispatching call, the object parameter, actual parameters and corresponding formals. (Make_Initialize_Protection): Correct logic of protection initialization when there is a protected type that implements a limited interface. (Parameter_Block_Pack): Populate a wrapped parameter block with the values of actual parameters. (Parameter_Block_Unpack): Retrieve the values from a wrapped parameter block and assign them to the original actual parameters. * exp_ch9.ads (Subprogram_Protection_Mode): New type. (Build_Protected_Sub_Specification): Change the type and name of the last formal to account for the increased variety of protection modes. * einfo.ads, einfo.adb (Was_Hidden): New attribute. Present in all entities. Used to save the value of the Is_Hidden attribute when the limited-view is installed. (Is_Primitive_Wrapper, Set_Is_Primitive_Wrapper): Retrieve and change the attribute of procedures classified as entry wrappers. (Wrapped_Entity, Set_Wrapped_Entity): Retrieve and change the wrapped entity of a primitive wrapper. (Write_Entity_Flags): Output the name and value of the Is_Primitive_Wrapper attribute. (Write_Field27_Name): Output the name and entity of the field Wrapped_ Entity. (Underlying_Type): If we have an incomplete entity that comes from the limited view then we return the Underlying_Type of its non-limited view if it is already available. (Abstract_Interface_Alias): Flag applies to all subrogram kinds, including operators. (Write_Field26_Name): Add entry for Overridden_Operation (Overridden_Operation): New attribute of functions and procedures. * exp_disp.ads, exp_disp.adb (Default_Prim_Op_Position): Return a predefined position in the dispatch table for the primitive operations used in dispatching selects. (Init_Predefined_Interface_Primitives): Remove the hardcoded number of predefined primitive operations and replace it with Default_Prim_Op_Count. (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec, Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Update the names of the generated primitive operations used in dispatching selects. (Init_Predefined_Interface_Primitives): No need to inherit primitives in case of abstract interface types. They will be inherit by the objects implementing the interface. (Make_DT): There is no need to inherit the dispatch table of the ancestor interface for the elaboration of abstract interface types. The dispatch table will be inherited by the object implementing the interface. (Copy_Secondary_DTs): Add documentation. (Validate_Position): Improve this static check in case of aliased subprograms because aliased subprograms must have the same position. (Init_Predefined_Interface_Primitives): New subprogram that initializes the entries associated with predefined primitives of all the secondary dispatch tables. (Build_Anonymous_Access_Type): Removed. (Expand_Interface_Actuals): With the previous cleanup there is no need to build an anonymous access type. This allows further cleanup in the code generated by the expander. (Expand_Interface_Conversion): If the actual is an access type then build an internal function to handle the displacement. If the actual is null this function returns null because no displacement is required; otherwise performs a type conversion that will be expanded in the code that returns the value of the displaced actual. (Expand_Interface_Actuals): Avoid the generation of unnecessary type conversions that have no effect in the generated code because no displacement is required. Code cleanup; use local variables to avoid repeated calls to the subprogram directly_designated_type(). * exp_util.ads, exp_util.adb (Is_Predefined_Dispatching_Operation): Classify the primitive operations used in dispatching selects as predefined. (Implements_Limited_Interface): Determine whether some type either directly implements a limited interface or extends a type that implements a limited interface. (Build_Task_Image_Function): Change Subtype_Mark to Result_Definition. (Expand_Subtype_From_Expr): Do not build actual subtype if the expression is limited. (Find_Interface_Tag): Add code to handle class-wide types and entities from the limited-view. * rtsfind.ads: Add entries in RE_Id and RE_Unit_Table for Get_Entry_Index, Get_Prim_Op_Kind, POK_Function, POK_Procedure, POK_Protected_Entry, POK_Protected_Function, POK_Protected_Procedure, POK_Task_Entry, POK_Task_Procedure, Prim_Op_Kind, Set_Entry_Index, Set_Prim_Op_Kind. * sem_ch9.adb (Analyze_Triggering_Alternative): Check for legal type of procedure name or prefix that appears as a trigger in a triggering alternative. * uintp.ads: Introduce constants Uint_11 and Uint_13. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103850 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF addresskcook2005-07-011-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101492 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-06-14 Gary Dismukes <dismukes@adacore.com>charlet2005-06-161-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Javier Miranda <miranda@adacore.com> Ed Schonberg <schonberg@adacore.com> Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Expand_Allocator_Expression): When an initialized allocator's designated type is a class-wide type, and compiling for Ada 2005, emit a run-time check that the accessibility level of the type given in the allocator's expression is not deeper than the level of the allocator's access type. (Tagged_Membership): Modified to gives support to abstract interface types. * a-tags.ads, a-tags.adb (type Type_Specific_Data): Add component Access_Level. (Descendant_Tag): New predefined function (Is_Descendant_At_Same_Level): New predefined function (Get_Access_Level): New private function (Set_Access_Level): New private procedure (IW_Membership): New function. Given the tag of an object and the tag associated with an interface, evaluate if the object implements the interface. (Register_Interface_Tag): New procedure used to initialize the table of interfaces used by the IW_Membership function. (Set_Offset_To_Top): Initialize the Offset_To_Top field in the prologue of the dispatch table. (Inherit_TSD): Modified to copy the table of ancestor tags plus the table of interfaces of the parent. (Expanded_Name): Raise Tag_Error if the passed tag equals No_Tag. (External_Tag): Raise Tag_Error if the passed tag equals No_Tag. (Parent_Tag): Return No_Tag in the case of a root-level tagged type, and raise Tag_Error if the passed tag equalis No_Tag, to conform with Ada 2005 semantics for the new predefined function. * exp_attr.adb (Expand_N_Attribute, case Attribute_Input): Generate call to Descendant_Tag rather than Internal_Tag. (Expand_N_Attribute, case Attribute_Output): Emit a check to ensure that the accessibility level of the attribute's Item parameter is not deeper than the level of the attribute's prefix type. Tag_Error is raised if the check fails. The check is only emitted for Ada_05. (Find_Stream_Subprogram): If a TSS exists on the type itself for the requested stream attribute, use it. (Expand_N_Attribute_Reference): If the designated type is an interface then rewrite the referenced object as a conversion to force the displacement of the pointer to the secondary dispatch table. (Expand_N_Attribute_Reference, case 'Constrained): Return false if this is a dereference of an object with a constrained partial view. * exp_ch5.adb (Expand_N_Return_Statement): When a function's result type is a class-wide type, emit a run-time check that the accessibility level of the returned object is not deeper than the level of the function's master (only when compiling for Ada 2005). * exp_disp.ads, exp_disp.adb (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Add entries for new Get_Access_Level and Set_Access_Level routines in these tables. (Make_DT): Generate a call to set the accessibility level of the tagged type in its TSD. (Make_DT): Code cleanup. The functionality of generating all the secondary dispatch tables has been moved to freeze_record_type. (Make_Abstract_Interface_DT): Minor code cleanup. (Set_All_DT_Position): Code cleanup. As part of the code cleanup this subprogram implements a new algorithm that provides the same functionality and it is more clear in case of primitives associated with abstract interfaces. (Set_All_Interfaces_DTC_Entity): Removed. As part of the code clean up, the functionality of this subprogram is now provided by Set_All_DT_Position. (Write_DT): New subprogram: a debugging procedure designed to be called within gdb to display the dispatch tables associated with a tagged type. (Collect_All_Interfaces): New subprogram that collects the whole list of interfaces that are directly or indirectly implemented by a tagged type. (Default_Prim_Op_Position): New subprogram that returns the fixed position in the dispatch table of the default primitive operations. (Expand_Interface_Actuals): New subprogram to generate code that displaces all the actuals corresponding to class-wide interfaces to reference the interface tag of the actual object. (Expand_Interface_Conversion): New subprogram. Reference the base of the object to give access to the interface tag associated with the secondary dispatch table. (Expand_Interface_Thunk): New subprogram that generates the code of the thunk. This is required for compatibility with the C+ ABI. (Make_Abstract_Interface_DT): New subprogram that generate the declarations for the secondary dispatch tables associated with an abstract interface. (Set_All_Interfaces_DTC_Entity): New subprogram that sets the DTC_Entity attribute for each primitive operation covering interface subprograms (Expand_Dispatching_Call, Fill_DT_Entry, Make_DT, Set_All_DT_Position): These subprograms were upgraded to give support to abstract interfaces * rtsfind.ads (type RE_Id): Add RE_Descendant_Tag, RE_Is_Descendant_At_Same_Level, RE_Get_Access_Level, and RE_Set_Access_Level. (RE_Unit_Table): Add entries for new Ada.Tags operations. Add support to call the followig new run-time subprograms: IW_Membership, Register_Interface_Tag, and Set_Offset_To_Top * sem_ch3.adb (Constant_Redeclaration): Allow a deferred constant to match its full declaration when both have an access definition with statically matching designated subtypes. (Analyze_Component_Declaration): Delete commented out code that was incorrectly setting the scope of an anonymous access component's type. (Process_Discriminants): Set Is_Local_Anonymous_Access for the type of an access discriminant when the containing type is nonlimited. (Make_Incomplete_Type_Declaration): Create an incomplete type declaration for a record type that includes self-referential access components. (Check_Anonymous_Access_Types): Before full analysis of a record type declaration, create anonymous access types for each self-referential access component. (Analyze_Component_Declaration, Array_Type_Declaration): Indicate that an access component in this context is a Local_Anonymous_Access, for proper accessibility checks. (Access_Definition): Set properly the scope of the anonymous access type created for a stand-alone access object. (Find_Type_Of_Object): An object declaration may be given with an access definition. (Complete_Subprograms_Derivation): New subprogram used to complete type derivation of private tagged types implementing interfaces. In this case some interface primitives may have been overriden with the partial-view and, instead of re-calculating them, they are included in the list of primitive operations of the full-view. (Build_Derived_Record_Type): Modified to give support to private types implemening interfaces. (Access_Definition): Reject ALL on anonymous access types. (Build_Derived_Record_Type): In the case of Ada 2005, allow a tagged type derivation to occur at a deeper accessibility level than the parent type. For the case of derivation within a generic body however, disallow the derivation if the derived type has an ancestor that is a formal type declared in the formal part of an enclosing generic. (Analyze_Object_Declaration): For protected objects, remove the check that they cannot contain interrupt handlers if not declared at library level. (Add_Interface_Tag_Components): New subprogram to add the tag components corresponding to all the abstract interface types implemented by a record type or a derived record type. (Analyze_Private_Extension_Declaration, Build_Derived_Record_Type, Derived_Type_Declaration, Find_Type_Name, Inherit_Components, Process_Full_View, Record_Type_Declaration): Modified to give support to abstract interface types (Collect_Interfaces): New subprogram that collects the list of interfaces that are not already implemented by the ancestors (Process_Full_View): Set flag Has_Partial_Constrained_View appropriately when partial view has no discriminants and full view has defaults. (Constrain_Access): Reject a constraint on a general access type if the discriminants of the designated type have defaults. (Access_Subprogram_Declaration): Associate the Itype node with the inner full-type declaration or subprogram spec. This is required to handle nested anonymous declarations. (Analyze_Private_Extension_Declaration, Build_Derived_Record_Type, Derived_Type_Declaration, Find_Type_Name, Inherit_Components, Process_Full_View, Record_Type_Declaration): Modified to give support to abstract interface types (Derive_Subprograms): Addition of a new formal to indicate if we are in the case of an abstact-interface derivation (Find_Type_Of_Subtype_Indic): Moved from the body of the package to the specification because it is requied to analyze all the identifiers found in a list of interfaces * debug.adb: Complete documentation of flag "-gnatdZ" * exp_ch3.adb: Implement config version of persistent_bss pragma (Check_Stream_Attributes): Use Stream_Attribute_Available instead of testing for TSS presence to properly enforce visibility rules. (Freeze_Record_Type): Code cleanup. Modified to call the subprogram Make_Abstract_Interfaces_DT to generate the secondary tables associated with abstract interfaces. (Build_Init_Procedure): Modified to initialize all the tags corresponding. (Component_Needs_Simple_Initialization): Similar to other tags, interface tags do not need initialization. (Freeze_Record_Type): Modified to give support to abstract interface types. (Expand_N_Object_Declaration): Do not generate an initialization for a scalar temporary marked as internal. * exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Handle properly an in-out parameter that is a component in an initialization procedure, whose constraint might depend on discriminants, and that may be misaligned because of packing or representation clauses. (Is_Legal_Copy): New predicate to determine whether a possibly misaligned in-out actual can actually be passed by copy/return. This is an error in case the type is by_reference, and a warning if this is the consequence of a DEC import pragma on the subprogram. (Expand_Call, Freeze_Subprogram): Modified to give support to abstract interface types (Expand_Inlined_Call): Mark temporary generated for the return value as internal, so that no useless scalar normalization is generated for it. (Expand_N_Subprogram_Declaration): Save unanalyzed body so calls to null procedure can always be inlined. (Expand_N_Subprogram_Declaration): If this is the declaration of a null procedure, generate an explicit empty body for it. * exp_util.ads, exp_util.adb (Find_Interface_ADT): New subprogram. Given a type implementing an interface, returns the corresponding access_disp_table value. (Find_Interface_Tag): New subprogram. Given a type implementing an interface, returns the record component containing the tag of the interface. (Find_Interface_Tag): New overloaded subprogram. Subsidiary to the previous ones that return the corresponding tag and access_disp_table entities. (Is_Predefined_Dispatching_Operation): Determines if a subprogram is a predefined primitive operation. (Expand_Subtype_From_Expr): If the expression is a selected component within an initialization procedure, compute its actual subtype, because the component may depend on the discriminants of the enclosing record. * i-cpp.ads, i-cpp.adb: This package has been left available for compatibility with previous versions of the frontend. As part of the new layout this is now a dummy package that uses declarations available at a-tags.ads * par-ch3.adb (P_Identifier_Declarations): Give an error for use of "constant access" and "aliased [constant] access" when not compiling with -gnat05. Suppress Ada 2005 keyword warning if -gnatwY used (P_Identifier_Declarations): Add support for object declarations with access definitions. (Private_Extension_Declaration): Complete the documentation (P_Derived_Type_Def_Or_Private_Ext_Decl): Fill the inteface_list attribute in case of private extension declaration (P_Type_Declaration): Mark as "abstract" the type declarations corresponding with protected, synchronized and task interfaces (P_Declarative_Items): "not" and "overriding" are overriding indicators for a subprogram or instance declaration. * sem_ch12.adb (Analyze_Subprogram_Instantiation): Verify that an instantiation that is a dispatching operation has controlling access parameters that are null excluding. Save and restore Ada_Version_Explicit, for implementation of AI-362 (Validate_Derived_Type_Instance): Add check for abstract interface types. (Analyze_Formal_Package): Establish Instantiation source for the copy of the generic that is created to represent the formal package. (Analyze_Package_Instantiation): Instantiate body immediately if the package is a predefined unit that contains inlined subprograms, and we are compiling for a Configurable_Run_Time. (Instantiate_Formal_Subprogram): Indicate that null default subprogram If the program has a null default, generate an empty body for it. * sem_ch6.adb, sem_ch9.adb (Analyze_Subprograms_Declaration): Update error message condition, null procedures are correctly detected now. (New_Overloaded_Entity): Bypass trivial overriding indicator check for subprograms in the context of protected types. Instead, the indicator is examined in Sem_Ch9 while analysing the subprogram declaration. (Check_Overriding_Indicator): Check consistency of overriding indicator on subprogram stubs as well. (Analyze_Subprogram_Declaration): Diagnose null procedures declared at the library level. (Analize_Subprogram_Specification): When analyzing a subprogram in which the type of the first formal is a concurrent type, replace this type by the corresponding record type. (Analyze_Subprogram_Body): Undo the previous work. (Analyze_Procedure_Call): If the call has the form Object.Op, the analysis of the prefix ends up analyzing the call itself, after which we are done. (Has_Interface_Formals): New subprogram subsidiary to analyze subprogram_specification that returns true if some non class-wide interface subprogram is found (New_Overloaded_Entity): Modified to give support to abstract interface types (Conforming_Types): In Ada 2005 mode, conformance checking of anonymous access to subprograms must be recursive. (Is_Unchecked_Conversion): Improve the test that recognizes instantiations of Unchecked_Conversion, and allows them in bodies that are to be inlined by the front-end. When the body comes from an instantiation, a reference to Unchecked_Conversion will be an Expanded_Name, even though the body has not been analyzed yet. Replace Is_Overriding and Not_Overriding in subprogram_indication with Must_Override and Must_Not_Override, to better express intent of AI. (Analyze_Subprogram_Body): If an overriding indicator is given, check that it is consistent with the overrinding status of the subprogram at this point. (Analyze_Subprogram_Declaration): Indicate that a null procedure is always inlined. If the subprogram is a null procedure, indicate that it does not need a completion. * sem_disp.adb (Check_Controlling_Type): Give support to entities available through limited-with clauses. (Check_Dispatching_Operation): A stub acts like a body, and therefore is allowed as the last primitive of a tagged type if it has no previous spec. (Override_Dispatching_Operation, Check_Dispatching_Operation): Modified to give support to abstract interface types * sem_res.adb (Valid_Conversion): Perform an accessibility level check in the case where the target type is an anonymous access type of an object or component (that is, when Is_Local_Anonymous_Access is true). Prevent the special checks for conversions of access discriminants in the case where the discriminant belongs to a nonlimited type, since such discriminants have their accessibility level defined in the same way as a normal component of an anonymous access type. (Resolve_Allocator): When an allocator's designated type is a class-wide type, check that the accessibility level of type given in the allocator's expression or subtype indication is not statically deeper than the level of the allocator's access type. (Check_Discriminant_Use): Diagnose discriminant given by an expanded name in a discriminant constraint of a record component. (Resolve_Explicit_Dereference): Do not check whether the type is incomplete when the dereference is a use of an access discriminant in an initialization procedure. (Resolve_Type_Conversion): Handle conversions to abstract interface types. (Valid_Tagged_Conversion): The conversion of a tagged type to an abstract interface type is always valid. (Valid_Conversion): Modified to give support to abstract interface types (Resolve_Actuals): Enable full error reporting on view conversions between unrelated by_reference array types. The rule for view conversions of arrays with aliased components is weakened in Ada 2005. Call to obsolescent subprogram is now considered to be a violation of pragma Restrictions (No_Obsolescent_Features). (Check_Direct_Boolean_Operator): If the boolean operation has been constant-folded, there is nothing to check. (Resolve_Comparison_Op, Resolve_Equality_Op, Resolve_Boolean_Op): Defer check on possible violation of restriction No_Direct_Boolean_Operators until after expansion of operands, to prevent spurious errors when operation is constant-folded. * sem_type.ads, sem_type.adb (Covers, Intersect_Types, Specific_Type, Has_Compatible_Type): Modified to give support to abstract interface types. (Interface_Present_In_Ancestor): New function to theck if some ancestor of a given type implements a given interface * sem_ch4.adb (Analyze_Call): Handle properly an indirect call whose prefix is a parameterless function that returns an access_to_procedure. (Transform_Object_Operation): Handle properly function calls of the form Obj.Op (X), which prior to analysis appear as indexed components. (Analyze_One_Call): Complete the error notification to help new Ada 2005 users. (Analyze_Allocator): For an allocator without an initial value, where the designated type has a constrained partial view, a discriminant constraint is illegal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101024 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-29 Javier Miranda <miranda@adacore.com>charlet2005-03-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | | * a-tags.ads, a-tags.adb (Get_TSD): Subprogram removed. (Inherit_DT): The first formal has been redefined as a Tag. This allows us the removal of the subprogram Get_TSD. (TSD): Replace the call to Get_TSD by the actual code. * exp_disp.ads, exp_disp.adb: Remove support to call Get_TSD. (Make_DT): Upgrade the call to Inherit_TSD according to the new interface: the first formal is now a Tag. * i-cpp.ads, i-cpp.adb (CPP_Inherit_DT): The first formal has been redefined as a Tag. This change allows us to remove the subprogram Get_TSD. (CPP_Get_TSD): Subprogram removed. (TSD): Replace the call to CPP_Get_TSD by the actual code. * rtsfind.ads: Remove support to call the run-time subprogram Get_TSD git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97168 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-17 Javier Miranda <miranda@adacore.com>charlet2005-03-181-4/+0
| | | | | | | | | | | | | | | | | | | * a-tags.ads, a-tags.adb (Get_Expanded_Name): Removed. (Get_Inheritance_Depth): Removed. (Set_Inheritance_Depth): Removed. * rtsfind.ads, exp_disp.ads, exp_disp.adb: Remove support to call the subprogram Get_Expanded_Name because it is not referenced by the frontend. * i-cpp.ads, i-cpp.adb (CPP_Get_Expanded_Name): Removed. (CPP_Get_Inheritance_Depth): Removed. (CPP_Set_Inheritance_Depth): Removed. * tbuild.ads, tbuild.adb (Make_DT_Component): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96662 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-02-09 Robert Dewar <dewar@adacore.com>charlet2005-02-101-15/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thomas Quinot <quinot@adacore.com> Javier Miranda <miranda@adacore.com> Pascal Obry <obry@adacore.com> Ed Schonberg <schonberg@adacore.com> Doug Rupp <rupp@adacore.com> Gary Dismukes <dismukes@adacore.com> Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * g-zstspl.ads: New file. * a-chahan.ads, a-chahan.adb: Add declarations from AI-285 * a-string.ads: Add pragma Ada_05 for wide_wide_space to get warning in Ada 95 mode Add definition of Wide_Wide_Space for AI-285 * impunit.ads, impunit.adb, sem_ch10.adb: Complete rewrite and new interface (to support Ada 95 and Ada 2005 units). Add Unbounded_IO files Add entries for Wide_Wide packages for AI-285 Add list of containers packages to Ada 2005 unit list * a-swuwti.ads, a-swuwti.adb, a-suteio.ads, a-suteio.adb: Updates to support new Unbounded_IO package cleanly. * g-utf_32.ads, g-utf_32.adb: New files. * Makefile.rtl: Add entry for g-utf_32 Add new files for Unbounded_IO Adjust make file for new AI-285 wide wide packages Add AI-302 containers to the run time. * a-stwibo.adb, a-stwibo.ads, a-stwisu.adb, a-stwisu.ads, a-strbou.ads, a-strbou.adb, a-strsup.ads, a-strsup.adb: New subprograms for AI-301. * a-stwiun.adb, a-stwiun.ads: Minor reformatting. * a-stunau.ads: Minor comment correction * rtsfind.ads, rtsfind.adb: Add definitions for Wide_Wide attributes etc. Also extend Text_IO_Kludge to support Wide_Wide_Text_IO (Check_RPC): Update to match changes in expanded code. Clean up unused entity. * exp_ch3.ads, exp_ch3.adb: Fix various places where Wide_Wide_String was not taken into account. This includes proper initialization with Normalize_Scalars. (Get_Simple_Init_Val): Major rewrite for initialize scalars and normalize scalars cases (particularly the latter) to do a better job of finding invalid representations. * s-scaval.ads, s-scaval.adb: Add values for zero invalid values * s-strops.ads, s-strops.adb: Remove string normalize routines, never used * exp_dist.adb: Add support for wide wide character type (Expand_Receiving_Stubs_Bodies): For a package declaration that has a private part, generate stub bodies at the end of the private part, not the visible part. (Add_RACW_Primitive_Operations_And_Bodies): Add last missing code for PolyORB support. (Add_Obj_RPC_Receiver_Completion): Add PCS-specific subprograms and generic wrapper to execute final processing after completing the expansion of the RPC receiver for an RACW. * snames.h, snames.ads, snames.adb: Add definitions for wide_wide packages and attributes. (Preset_Names): Addition of the new reserved words of Ada 2005, that is interface, overriding and synchronized. (Get_Pragma_Id): Give support to the use of the new reserved word "interface" as a pragma name. (Is_Pragma_Name): Give support to the use of the new reserved word "interface" as a pragma name. (Preset_Names): Add stream_size string for the Stream_Size Ada2005 attribute implementation. * exp_attr.adb (Expand_Attribute_Reference): Do not apply validity checks to entities that are output parameters of Asm operations. Handle the Stream_Size attribute. Add implementation of Wide_Wide_Value, Wide_Wide_Image, Wide_Wide_Width * exp_imgv.ads, exp_imgv.adb: Add support for wide wide character type * sem_attr.adb (Eval_Attribute): Raise compile-time constraint error for second parameter being 0.0. Add support for wide wide character type. (Analyze_Attribute, Eval_Attribute): Handle the Stream_Size attribute. * s-valwch.adb, s-valwch.ads, s-imgwch.ads, s-imgwch.adb, s-wchstw.ads, s-wchstw.adb, s-wchwts.adb, s-wchwts.ads, s-widwch.adb, s-widwch.ads, s-wwdcha.adb, s-wwdcha.ads, s-wwdenu.adb, s-wwdenu.ads, s-wwdwch.adb, s-wwdwch.ads: Add support for wide wide character cases. * cstand.adb: Create entities for Wide_Wide_Character and Wide_Wide_String. * i-c.ads, i-c.adb: Fix not raising CE for null wide strings in accordance with AI-258. Add new declarations for 16/32 bit C character types (Part of AI285) * einfo.ads, einfo.adb (Is_Obsolescent, Is_Ada_2005): New flag (Obsolescent_Warning): New field (Rep_Clause): New local subprogram used to share code. Returns the rep clause for which the name is given in parameter. (Has_Stream_Size_Clause): New routine. (Stream_Size_Clause): Idem. Implementation is based on Rep_Clause. (Address_Clause): Implementation is now using Rep_Clause. (Alignment_Clause): Idem. (Size_Clause): Idem. * lib-xref.adb (Generate_Reference): Test for reference to Ada 2005 entity in non-Ada 2005 mode and generate warning. * par-prag.adb: Add handling of one argument form for pragma Ada_05. (Prag): Code cleanup. Remove old gnat pragma "overriding" * sem_prag.adb: Add handling of one argument form for pragma Ada_05 (Analyze_Pragma, case Elaborate, Elaborate_All): Do not disable warnings on the named unit if the pragma is not in the current compilation unit, so that elaboration calls in the current unit can set up an elaboration dependency on the named unit, as needed. (Analyze_Pragma, case Obsolescent): Allow pragma to be used for library subprogram as well as for subprograms declared within a package. (Analyze_Pragma, Sig_Flags): Code cleanup. Remove support for the GNAT pragma overriding. * krunch.ads, krunch.adb: Add special handling of Wide_Wide (krunched to z) to avoid some instances of duplication for Wide_Wide packages. * namet.ads, namet.adb: Implement encoding (WWhhhhhhhh) for wide wide characters. * scn.adb: Char_Literal_Value field is now a Uint * scng.adb: Significant rewrite to handle new Ada 2005 features allowing wide and wide wide characters in program text, e.g. for identifiers, as described in AI-285. (Set_Reserved): New procedure, makes setting up keywords cleaner. (Initialize_Scanner): Register the new reserved words of Ada 2005. (Scan): Give support to the new reserved words. * par-ch2.adb (P_Identifier): Compiling in Ada95 mode, generate a warning notifying that interface, overriding, and synchronized are new reserved words. (P_Pragma): Allow the use of the new reserved word "interface" as a pragma name. * gnatls.adb, gnatbind.adb, ali-util.adb, binde.adb, ali.ads, ali.adb: Code cleanup. Rename identifiers named "interface" to "SAL_Interface". * bindgen.adb (Gen_Main_Ada): Add support for the new SEH (Structured Exception handling). (Gen_Main_C): Idem. * bindgen.adb: (Gen_Main_Ada): Set the default exit code if specified. (Gen_Main_C): Likewise. Part of *DC20-006. (Gen_Output_File_C): Remove redundant output of gnat_exit_status. Code cleanup. Rename identifiers named "interface" to "SAL_Interface" * switch-b.adb, bindusg.adb, opt.ads, vms_data.ads: Add handling of new -Xnnn switch. * mlib-prj.adb, mlib.adb: Code cleanup. Rename one identifier that has a collision with the new Ada 2005 "interface" reserved word. * par-ch3.adb (P_Defining_Identifier): Compiling in Ada95 mode, generate a warning notifying that interface, overriding, and synchronized are new reserved words. * scans.ads (Token_Type): Addition of the tokens corresponding to the new reserved words of Ada 2005: Tok_Interface, Tok_Overriding and Tok_Synchronized. * sem_res.adb (Resolve_Actuals): Change error messages to refer to "dispatching" rather than "primitive" operations, since dispatching calls are now allowed to abstract formal subprograms (which are not primitive). Char_Literal_Value field is now a Uint (Resolve_Slice): If the prefix is an access to an unconstrained array, compute the actual subtype of the designated object to impose the proper index constraints. (Resolve_Selected_Component): Do not insert an access check if the prefix is an access type: such a node is expanded into an explicit dereference, on which the access check is performed anyway. Removes expensive duplicate checks. (Resolve_Call): Use new flag Is_Obsolescent and field Obsolescent_Warning so that pragma Obsolescent works on library subprograms. Add support for wide wide character type (Resolve_Allocator): Replace the error message on wrong null-exclusion value by a warning message. (Resolve_Type_Conversion): If the mixed-mode expression is interpreted as fixed-point, and one of the operands is non-static and universal, it can only be an illegal exponentiation operation, in which case there is no real value to retrieve. * exp_strm.adb: Add support for wide wide character type (Build_Elementary_Input_Call): Compute the size of the stream element by querying the rep chain to find the Stream_Attribute attribute value. (Build_Elementary_Write_Call): Ditto. * sem_aggr.adb: Char_Literal_Value field is now a Uint Add support for wide wide character type Replace the error messages on wrong null-exclusion value by warnings as described in Ada 2005. (Resolve_Extension_Aggregate): Document the fact that the error message on class-wide expressions in extensions aggregates. * sem_case.adb: Add support for wide wide character type * sem_ch13.adb: Add support for wide wide character type (Analyze_Attribute_Definition_Clause): Handle the Stream_Size attribute. * sem_ch3.adb: Add support for wide wide character type (Process_Subtype): If constraint is illegal for the type, set Ekind of now-useless Itype, to prevent cascaded errors on a compiler built without -gnatp. * sem_ch8.adb: Add with and use of Sem_Disp. (Analyze_Subprogram_Renaming): Replace unclean uses of Corresponding_Spec with Corresponding_Formal_Spec (and delete setting of Corresponding_Spec to Empty). (Attribute_Renaming): Replace use of Corresponding_Spec with Corresponding_ Formal_Spec and simplify condition. (Use_One_Package): Check that scope of homonym of identifier is defined, before checking whether it is a wrapper package. Add support for wide wide character type * sem_eval.adb: Add support for wide wide character type. (Eval_Arithmetic_Op): Check for compile time known signed integer overflow in the non-static case. (Subtypes_Statically_Match): A formal scalar type and its base type do not statically match. * sem_util.adb (Collect_Primitive_Operations): Minor change of "/=" to "not in" for test of N_Formal_Subprogram_Declaration (which is now a subtype). (Unit_Declaration_Node): Ditto. (Is_Variable_Prefix): For the case of an indexed component whose prefix has a packed array type, the prefix has been rewritten into a type conversion. Determine variable-ness from the converted expression. Handle wide wide character cases. * stand.ads: Add types Wide_Wide_Character and Wide_Wide_String * stringt.ads, stringt.adb: Handle full UTF-32 range. Remove ["0A"] from comment, since it can look like a line terminator. Currently we don't permit this, but this is under discussion by the ARG, and it is easy enough to use a different example. * s-wchcon.ads, s-wchcnv.ads, s-wchcnv.adb: Add new subprograms for handling UTF-32 encoding for wide wide character. Implement new brackets coding ["hhhhhhhh"] Add UTF-8 encodings for full UTF-32 range * ttypes.ads: Add definition of Standard_Wide_Wide_Character_Size * types.h, types.ads, types.adb: Wide_Wide_Character now has full 31 bit range Add full UTF-32 support. (RT_Exception_Code): Addition of CE_Null_Not_Allowed; used to notify that constraint error will be raised at run-time because a null value is assigned to a null-excluding object. Remove some obsolete declarations and make Char_Code unsigned. * a-except.adb (Rcheck_30): New subprogram. Addition of the message corresponding to CE_Null_Not_Allowed, and adjust the output of all the Rcheck subprograms. * checks.adb (Check_Null_Not_Allowed): Replace the error message on wrong null-exclusion value by a warning message. (Enable_Range_Check): Do range check if the prefix is an explicit dereference whose designated object is an unconstrained array. Current algorithm for removing duplicate checks is over-eager in this case. * sem_ch5.adb (Analyze_Assignment): Replace the error messages on wrong null-exclusion value by a warning message * atree.h, atree.ads, atree.adb: Remove Char_Code field support completely. Add support for Uint2 field sem_ch2.adb, exp_ch11.adb, exp_dbug.adb, exp_prag.adb: Char_Literal_Value field is now a Uint. * exp_util.adb (Insert_Actions): Replace N_Formal_Subprogram_Declaration by N_Formal_{Abstract|Concrete}_Subprogram_Declaration. Char_Literal_Value field is now a Uint. * sinfo.ads, sinfo.adb (Corresponding_Formal_Spec): New function defined for subprogram renaming declarations. When set, the field indicates the defining entity of a corresponding formal subprogram when the renaming corresponds to a formal subprogram association in an instantiation. (Set_Corresponding_Formal_Spec): New procedure to return Corresponding_Formal_Spec field. Minor changes of "=" to "in" in tests of N_Formal_Subprogram_Declaration (which is now a subtype). Char_Literal_Value field is now a Uint * exp_disp.ads, exp_disp.adb (Make_DT): Generate code that moves the pointer to the base of the dispatch table. Minor changes to comments. (Controlling_Type): New function for determining the tagged type associated with a tagged primitive subprogram. (Expand_Dispatching_Call): Add support for a controlling actual that is directly a value of type Ada.Tag rather than a tagged object. * i-cpp.ads, i-cpp.adb, a-tags.ads, a-tags.adb: Update documentation describing the new layout. (Dispatch_Table): The expander computes the actual array size, allocates the Dispatch_Table record accordingly, and generates code that displaces the base of the record after the Typeinfo_Ptr component. The access to these components is done by means of local functions. (Offset_To_Top): New function. (Typeinfo_Ptr): New function. (Get_TSD): Modified to access the new position of the TSD. (Set_TSD): Modified to save the TSD in its new position. * par-ch12.adb (P_Formal_Subprogram_Declaration): Add parsing for the case of formal abstract subprograms. Add check and message for -gnat05. Update comments. * sem_ch12.adb: Add with and use for Sem_Disp. (Analyze_Associations): Minor change from "=" to "in" for use of N_Formal_Subtype_Declaration (which is now a subtype). (Set_Analyzed_Formal): Minor changes from "=" to "in" for uses of N_Formal_Subtype_Declaration (which is now a subtype). (Analyze_Formal_Subprogram): Add handling for N_Formal_Abstract_Subprogram, marking the formal as abstract and dispatching, setting the controlling status of the formal parameters and result, and issuing an error if there is no controlling type for the formal subprogram. (Instantiate_Formal_Subprogram): Rather than setting Corresponding_Spec, which is an unclean use of that field, we set the new field Corresponding_Formal_Spec to make the formal subprogram available to processing in Analyze_Subprogram_Declaration. (Analyze_Formal_{Discrete, Decimal_Fixed_Point, Fixed_Point, Floating_Point, Modular_Integer, Signed_Integer}_Type: Make formal type Constrained, so that it is is does not statically match its anonymous base type. * sem_ch6.adb (Analyze_Subprogram_Specification): Include test for abstract formal subprograms in error check for functions returning abstract types. Set scope of new designator for a parameterless subprogram, so that it is available when checking the body for nested subprograms, before full analysis of said body. (Analyze_Subprogram_Body): Warn on inlining bodies with nested subprogram only if inner one comes from source. (Analyze_Function_Call): If the call is given in object notation, the analysis of the name rewrites the node and analyzes it with the proper argument list. After analyzing the name, if the call has been rewritten and the result type is set, no further analysis is needed. (Analyze_Return_Type): Subsidiary to Process_Formals: analyze subtype mark in function specification, in a context where the formals are visible and hide outer homographs. * sem_disp.adb (Check_Controlling_Type): Relax the check for same scope as the tagged type for the cases of abstract formal subprograms and renamings of those. Clean up spec comments. (Check_Dispatching_Context): Add error message to indicate "abstract procedure", covering the case of a call to a formal abstract procedure that has statically tagged operands. (Check_Dispatching_Call): Check for the case of an actual given by a tag-indeterminate function call whose type is an ancestor of the containing call's associated tagged type. This situation can occur for inherited primitives with function defaults. In this case we use the tagged type's tag directly as the controlling argument for the calls. (Expand_Call): Name change on call to Expand_Dispatch_Call. * sprint.adb (Sprint_Node_Actual): Split N_Formal_Subprogram_Declaration into two alternatives for the new cases N_Formal_Abstract_Subprogram_Declaration and N_Formal_Concrete_Subprogram_Declaration. Char_Literal_Value field is now a Uint. * trans.c: Get rid of junk Uint2 reference. Char_Literal_Value field is now a Uint. (gnat_to_gnu, case N_Aggregate): Check TYPE_UNCHECKED_UNION_P. (gigi): Correct third arg to gimplify_body. * ada-tree.h: (TYPE_UNCHECKED_UNION_P): New flag. (TYPE_LANG_FLAG_0): Check for record or union. * treepr.adb: Char_Literal_Value field is now a Uint * uintp.h, uintp.ads, uintp.adb: Add new routines UI_To_CC and UI_From_CC. * widechar.ads, widechar.adb (Is_UTF_32_Non_Graphic): New function Add full UTF-32 support Char_Code is now 32 bits * sinput.ads, sinput.adb (Skip_Line_Terminators): Extend to deal with wide character UTF_32 line terminators. Initialize Main_Source_File to avoid error when no main source is loaded. * errout.adb (Finalize): Do not check Num_SRef_Pragmas (Main_Source_File) when no main source has been loaded, to avoid potential crash. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94809 138bc75d-0d04-0410-961f-82ee72b054a4
* * exp_dist.adb:charlet2005-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Declare subprogram index in Build_RPC_Receiver_Body, to reduce the amount of PCS-specific code in RACW stubs generation. (Copy_Specification): Set Etype on copied formal parameter entities, as this information is needed for PolyORB stubs generation. (PolyORB_Support.Build_Subprogram_Receiving_Stubs): Remove unused variable Dynamic_Async. (Build_Subprogram_Receiving_Stubs): Make PCS-specific (Build_RPC_Receiver_Specification): Make generic again, as recent changes have allowed RPC receivers to have the same profile for both variants of the PCS. Reorganise RPC receiver generation to reduce differences between the structure of GARLIC and PolyORB RPC receivers. (Add_Receiving_Stubs_To_Declarations): Make this subprogram PCS-specific. Simplify elaboration code for RCI packages. * s-parint.ads, s-parint.adb, rtsfind.ads: Reorganise RPC receiver generation to reduce differences between the structure of GARLIC and PolyORB RPC receivers. * s-stratt.adb: Fix typo in comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92837 138bc75d-0d04-0410-961f-82ee72b054a4
* * exp_dist.adb (Specific_Build_General_Calling_Stubs,charlet2004-12-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Specific_Build_Stub_Target): New subprograms. (Build_Subprogram_Calling_Stubs): Make this procedure independent from the PCS implementation used, using the above PCS-customized subprograms. Minor reformatting. (PolyORB_Support.Helpers): New subunit containing supporting subprograms for generation of DSA code targeted to the PolyORB PCS. (Add_Stub_Type): Rewrite to isolate the parts that are specific to one implementation of the partition communication subsystem in ancillary subprograms. (Specific_Build_Stub_Type, GARLIC_Support.Build_Stub_Type, PolyORB_Support.Build_Stub_Type): New subrograms containing the PCS-specific part of Add_Stub_Type. (Insert_Partition_Check): Use runtime library function to perform E.4(19) check. * rtsfind.ads: New entity System.PolyORB_Interface.Make_Ref (RE_Same_Partition): New entity, from s-parint. * s-parint.ads, s-parint.adb (Same_Partition): New subprogram. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91884 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-10-26 Thomas Quinot <quinot@act-europe.fr>charlet2004-10-271-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_dist.adb (Build_General_Calling_Stubs): New formal parameter RACW_Type, used in the PolyORB version. Rename RCI_Info to RCI_Locator, for consistency between the PolyORB version and the GARLIC version. * snames.ads, snames.adb, s-parint.ads, s-parint.adb: Rename RCI_Info to RCI_Locator for better consistency between the GARLIC and PolyORB versions of the distributed systems annex. (DSA_Implementation_Name): This enumeration lists the possible implementations of the Partition Communication Subsystem for the Distributed Systems Annex (DSA). The three available implementations are the dummy stub implementation (No_DSA), and two versions based on two different distribution runtime libraries: GARLIC and PolyORB. Both the GARLIC PCS and the PolyORB PCS are part of the GLADE distribution technology. Change the literal GLADE_DSA to GARLIC_DSA to accurately describe that organization. * rtsfind.ads: Rename RCI_Info to RCI_Locator for better consistency between the GARLIC and PolyORB versions of the distributed systems annex. Remove RE_Unbounded_Reclaim_Pool since it is unused. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89652 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>charlet2004-09-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * misc.c (gnat_print_type): Use TYPE_RM_SIZE_NUM. * trans.c (struct stmt_group): Delete field GLOBAL. (gnat_init_stmt_group): Do not initialize it. (call_to_gnu): Use save_expr, not protect_multiple_eval. (Exception_Handler_to_gnu_sjlj): Call build_int_cst, not build_int_2 (gnat_to_gnu, case N_Character_Literal, N_String_Literal): Likewise. (gnat_to_gnu, case N_Compilation_Unit): Do not set GLOBAL in stmt group. (start_stmt_group): Likewise. (add_stmt, add_decl_expr): Rework handling of global DECL_EXPRs. * utils2.c (ggc.h): Include. (build_call_raise): Call build_int_cst, not build_int_2. * utils.c (gnat_init_decl_processing): Fix arg to build_common_tree_nodes. (create_subprog_type): Do not use SET_TYPE_CI_CO_LIST. (gnat_define_builtin): Set built_in_decls. (init_gigi_decls): Call build_int_cst, not build_int_2. * ada-tree.h (struct lang_decl, struct lang_type): Field is type tree. (GET_TYPE_LANG_SPECIFIC, SET_TYPE_LANG_SPECIFIC): New macros. (GET_DECL_LANG_SPECIFIC, SET_DECL_LANG_SPECIFIC): Likewise. (TYPE_CI_CO_LIST, SET_TYPE_CI_CO_LIST, TYPE_MODULE, SET_TYPE_MODULE): Use them. (TYPE_INDEX_TYPE, SET_TYPE_INDEX_TYPE, TYPE_DIGITS_VALUE): Likewise. (SET_TYPE_DIGITS_VALUE, TYPE_UNCONSTRAINED_ARRAY): Likewise. (SET_TYPE_UNCONSTRAINED_ARRAY, TYPE_ADA_SIZE, SET_TYPE_ADA_SIZE): Likewise. (TYPE_ACTUAL_BOUNDS, SET_TYPE_ACTUAL_BOUNDS): Likewise. (DECL_CONST_CORRESPONDING_VAR, SET_DECL_CONST_CORRESPONDING_VAR): Likewise. (DECL_ORIGINAL_FIELD, SET_DECL_ORIGINAL_FIELD): Likewise. (TYPE_RM_SIZE_INT, TYPE_RM_SIZE_ENUM, SET_TYPE_RM_SIZE_ENUM): Deleted. (TYPE_RM_SIZE_NUM): New macro. (TYPE_RM_SIZE): Modified to use above. * cuintp.c: (build_cst_from_int): New function. (UI_To_gnu): Use it. * decl.c (gnat_to_gnu_entity): Use TYPE_RM_SIZE_NUM. (make_type_from_size): Avoid changing TYPE_UNSIGNED of a type. (gnat_substitute_in_type, case ARRAY_TYPE): If old had a MIN_EXPR for the size, copy it into new. 2004-08-31 Robert Dewar <dewar@gnat.com> * exp_ch6.adb (Expand_Call): Properly handle validity checks for packed indexed component where array is an IN OUT formal. This generated garbage code previously. * gnat_ugn.texi: Document -fverbose-asm * gnat-style.texi: Minor updates (note that boolean constants and variables are joined with AND/OR rather than short circuit forms). 2004-08-31 Ed Schonberg <schonberg@gnat.com> * exp_util.adb (Safe_Unchecked_Type_Conversion): Conversion is safe if it is an upward conversion of an untagged type with no representation change. 2004-08-31 Thomas Quinot <quinot@act-europe.fr> * rtsfind.ads: Move RCI_Subp_Info and RCI_Subp_Info_Array to System.Partition_Interface. * checks.adb (Apply_Access_Checks): Do not generate checks when expander is not active (but check for unset reference to prefix of dereference). * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): Uniformly rewrite pragma Debug as an if statement with a constant condition, for consistent treatment of entity references contained within the enclosed procedure call. 2004-08-31 Vincent Celier <celier@gnat.com> * bindgen.adb: (Set_EA_Last): New procedure (Gen_Exception_Table_Ada, Gen_Exception_Table_C): Use new procedure Set_EA_Last. (Gen_Adafinal_Ada): If no finalization, adafinal does nothing (Gen_Output_File_Ada): Always call Gen_Adafinal_Ada, so that SAL can be linked without errors. (Gen_Exception_Table_Ada): Correct bugs when generating code for arrays ST and EA. (Gen_Exception_Table_C): Correct same bugs * vms_data.ads: Add new qualifier /VERBOSE_ASM to GCC_Switches * g-os_lib.adb (Normalize_Pathname.Get_Directory): When Dir is empty, on Windows, make sure that the drive letter is in upper case. * g-os_lib.ads (Normalize_Pathname): Add a comment to indicate that on Windows, when the drive letter is added and Case_Sensitive is True, the drive letter is forced to upper case. * mlib-tgt-irix.adb (Build_Dynamic_Library): Transfer all -lxxx options to Options_2 for the call to MLib.Utl.Gcc. * bld.adb (Put_Include_Project): Use '/', not '\' on Windows as directory separator when defining BASE_DIR. 2004-08-19 Pascal Obry <obry@gnat.com> * gprcmd.adb (Extend): Do not output trailing directory separator. This is not needed and it confuses Windows GNU/make which does not report directory terminated by a slash as a directory. (gprcmd): Idem for "pwd" internal command. * Makefile.generic: Use __GPRCOLON__ instead of pipe character in target names rewrite to fix regressions with recent version of GNU/make. Starting with GNU/make 3.80 the pipe character was not handled properly anymore. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86883 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-15 Robert Dewar <dewar@gnat.com>charlet2004-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * makegpr.adb, s-secsta.ads, sem_ch3.adb, sem_case.adb: Minor reformatting * gnat_ugn.texi: Add instantiation of direct_io or sequential_io with access values as an example of a warning. * gnat_rm.texi: Document new attribute Has_Access_Values * gnat-style.texi: Document that box comments belong on nested subprograms * sem_util.ads (Has_Access_Values): Improved documentation * s-finimp.ads, s-finimp.adb: Fix spelling error in comment * sem_prag.adb (Check_Duplicated_Export_Name): New procedure (Process_Interface_Name): Call to this new procedure (Set_Extended_Import_Export_External_Name): Call to this new procedure * s-mastop-x86.adb, 9drpc.adb: Fix spelling error in comment * a-direio.ads, a-sequio.ads: Warn if Element_Type has access values * einfo.ads: Minor comment typo fixed 2004-07-15 Jose Ruiz <ruiz@act-europe.fr> * snames.adb: Add _atcb. * snames.ads: Add Name_uATCB. * s-tarest.adb (Create_Restricted_Task): ATCBs are always preallocated (in the expanded code) when using the restricted run time. * s-tarest.ads (Create_Restricted_Task): Created_Task transformed into a in parameter in order to allow ATCBs to be preallocated (in the expanded code). * s-taskin.adb (Initialize_ATCB): T converted into a in parameter in order to allow ATCBs to be preallocated. In case of error, the ATCB is deallocated in System.Tasking.Stages. * s-taskin.ads (Initialize_ATCB): T converted into a in parameter in order to allow ATCBs to be preallocated. * s-tassta.adb (Create_Task): In case of error the ATCB is deallocated here. It was previously done in Initialize_ATCB. * rtsfind.ads: Make the Ada_Task_Control_Block visible. * exp_ch9.adb: Preallocate the Ada_Task_Control_Block when using the Restricted run time. * exp_ch3.adb: When using the Restricted run time, pass the preallocated Ada_Task_Control_Block when creating a task. 2004-07-15 Ed Schonberg <schonberg@gnat.com> * sem_util.adb (Normalize_Actuals): If there are no actuals on a function call that is itself an actual in an enclosing call, diagnose problem here rather than assuming that resolution will catch it. * sem_ch7.adb (Analyze_Package_Specification): If the specification is the local copy of a generic unit for a formal package, and the generic is a child unit, install private part of ancestors before compiling private part of spec. * sem_cat.adb (Validate_Categorization_Dependency): Simplify code to use scope entities rather than tree structures, to handle properly parent units that are instances rewritten as bodies for inlining purposes. * sem_ch10.adb (Get_Parent_Entity, Implicit_With_On_Parent, Remove_Parents): Handle properly a parent unit that is an instantiation, when the unit has been rewritten as a body for inlining purposes. * par.adb (Goto_List): Global variable to collect goto statements in a given unit, for use in detecting natural loops. * par-ch5.adb (P_Goto_Statement): Add goto to global Goto_List, for use in detecting natural loops. * par-labl.adb (Find_Natural_Loops): Recognize loops create by backwards goto's, and rewrite as a infinite loop, to improve locality of temporaries. * exp_util.adb (Force_Evaluation): Recognize a left-hand side subcomponent that includes an indexed reference, to prevent the generation of copies that would miscompile the desired assignment statement. (Build_Task_Image_Decls): Add a numeric suffix to generated name for string variable, to avoid spurious conflicts with the name of the type of a single protected object. * exp_ch4.adb (Expand_Array_Equality): If indices are distinct, use a loop with an explicit exit statement, to avoid generating an out-of-range value with 'Succ leading to spurious constraint_errors when compiling with -gnatVo. 2004-07-15 Thomas Quinot <quinot@act-europe.fr> * sem_ch4.adb (Analyze_Slice): Always call Analyze on the prefix: it might not be analyzed yet, even if its Etype is already set (case of an unchecked conversion built using Unchecked_Convert_To, for example). If the prefix has already been analyzed, this will be a nop anyway. * exp_ch5.adb (Make_Tag_Ctrl_Assignment): For an assignment of a controller type, or an assignment of a record type with controlled components, copy only user data, and leave the finalization chain pointers untouched. 2004-07-15 Vincent Celier <celier@gnat.com> * make.adb (Collect_Arguments): Improve error message when attempting to compile a source not part of any project, when -x is not used. * prj.ads: (Defined_Variable_Kind): New subtype * prj-attr.adb (Register_New_Package): Two new procedures to register a package with or without its attributes. (Register_New_Attribute): Mew procedure to register a new attribute in a package. New attribute oriented subprograms: Attribute_Node_Id_Of, Attribute_Kind_Of, Set_Attribute_Kind_Of, Attribute_Name_Of, Variable_Kind_Of, Set_Variable_Kind_Of, Optional_Index_Of, Next_Attribute. New package oriented subprograms: Package_Node_Id_Of, Add_Unknown_Package, First_Attribute_Of, Add_Attribute. * prj-attr.ads (Attribute_Node_Id): Now a private, self initialized type. (Package_Node_Id): Now a private, self initialized type (Register_New_Package): New procedure to register a package with its attributes. New attribute oriented subprograms: Attribute_Node_Id_Of, Attribute_Kind_Of, Set_Attribute_Kind_Of, Attribute_Name_Of, Variable_Kind_Of, Set_Variable_Kind_Of, Optional_Index_Of, Next_Attribute. New package oriented subprograms: Package_Node_Id_Of, Add_Unknown_Package, First_Attribute_Of, Add_Attribute. * prj-dect.adb (Parse_Attribute_Declaration, Parse_Package_Declaration): Adapt to new spec of Prj.Attr. * prj-makr.adb (Make): Parse existing project file before creating other files. Fail if there was an error during parsing. * prj-proc.adb (Add_Attributes, Process_Declarative_Items): Adapt to new spec of Prj.Attr. * prj-strt.adb (Attribute_Reference, Parse_Variable_Reference): Adapt to new spec of Prj.Attr. 2004-07-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * utils2.c: Fix typo in comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84774 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-06 Vincent Celier <celier@gnat.com>charlet2004-07-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vms_conv.ads: Minor reformatting. Alphabetical order for enumerated values of type Command_Type, to have the command in alphabetical order for the usage. * vms_conv.adb (Process_Argument): Set Keep_Temporary_Files to True for the special qualifier /KEEP_TEMPORARY_FILES (minimum 6 characters). * gnat_ugn.texi: Document new switch -dn for the GNAT driver. * makegpr.adb (Global_Archive_Exists): New global Boolean variable (Add_Archive_Path): Only add the global archive if there is one. (Build_Global_Archive): Set Global_Archive_Exists depending if there is or not any object file to put in the global archive, and don't build a global archive if there is none. (X_Switches): New table (Compile_Link_With_Gnatmake): Pass to gnatmake the -X switches stored in the X_Switches table, if any. (Initialize): Make sure the X_Switches table is empty (Scan_Arg): Record -X switches in table X_Switches * opt.ads (Keep_Temporary_Files): New Boolean flag, defaulted to False. * make.adb: Minor comment fix * gnatname.adb (Gnatname): When not on VMS, and gnatname has been invoked with directory information, add the directory in front of the path. * gnatchop.adb (Gnatchop): When not on VMS, and gnatchop has been invoked with directory information, add the directory in front of the path. * gnatcmd.adb (Delete_Temp_Config_Files): Only delete temporary files when Keep_Temporary_Files is False. (GNATCmd): When not on VMS, and the GNAT driver has been invoked with directory information, add the directory in front of the path. When not on VMS, handle new switch -dn before the command to set Keep_Temporary_Files to True. (Non_VMS_Usage): Use lower case for the non VMS usage: this is valid everywhere. * gnatlink.adb (Gnatlink): When not on VMS, and gnatlink has been invoked with directory information, add the directory in front of the path. 2004-07-06 Thomas Quinot <quinot@act-europe.fr> * snames.ads, snames.adb (Name_Stub): New name for the distributed systems annex. * rtsfind.ads: New RTE TC_Object, for DSA/PolyORB. New RTEs RAS_Proxy_Type and RAS_Proxy_Type_Access, for DSA. * g-socket.adb (To_Timeval): Fix incorrect conversion of Selector_Duration to Timeval for the case of 0.0. * exp_util.ads (Evolve_Or_Else): Fix overenthusiastic copy/paste of documentation from Evolve_And_Then. 2004-07-06 Jose Ruiz <ruiz@act-europe.fr> * s-taprop-tru64.adb, s-taprop-os2.adb, s-taprop-mingw.adb, s-taprop-posix.adb: Update comment. 2004-07-06 Robert Dewar <dewar@gnat.com> * s-osinte-hpux.ads, s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-osinte-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads, s-taprop-irix.adb, s-interr-sigaction.adb, s-taprop-irix-athread.adb, s-osinte-hpux-dce.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb, s-taprop-solaris.adb, s-interr-vms.adb, s-osinte-vms.ads, s-taprop-vms.adb, s-osinte-vxworks.ads, s-osprim-vxworks.adb, a-numaux-x86.adb, a-except.adb, a-exexpr.adb, a-intsig.adb, a-tags.adb, a-tags.ads, bindgen.ads, checks.adb, checks.adb, csets.ads, einfo.ads, einfo.ads, elists.adb, exp_ch4.adb, exp_ch7.adb, exp_dist.adb, exp_util.adb, freeze.adb, g-dynhta.adb, gnatmem.adb, g-regexp.adb, inline.adb, i-os2thr.ads, osint.adb, prj.adb, scng.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch4.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_type.ads, sem_warn.adb, s-ficobl.ads, s-finimp.adb, s-htable.adb, sinfo.ads, sinput-l.ads, s-interr.adb, s-interr.ads, sprint.adb, s-tarest.adb, s-tasini.ads, s-taskin.ads, s-taskin.ads, uname.adb, vms_data.ads: Minor reformatting, Fix bad box comment format. * gnat_rm.texi: Fix minor grammatical error * sem_attr.adb, exp_attr.adb: New attribute Has_Access_Values * sem_util.ads, sem_util.adb (Requires_Transient_Scope): Allow many more cases of discriminated records to be recognized as not needing a secondary stack. (Has_Access_Values): New function. * snames.h, snames.adb, snames.ads: New attribute Has_Access_Values * cstand.adb, layout.ads, layout.adb, sem_ch13.ads: Change name Set_Prim_Alignment to Set_Elem_Alignment (more accurate correspondence with LRM terminology). Change terminology in comments primitive type => elementary type. 2004-07-06 Ed Schonberg <schonberg@gnat.com> PR ada/15602 * sem_ch7.adb (Unit_Requires_Body): For a generic package, the formal parameters do not impose any requirements on the presence of a body. 2004-07-06 Ed Schonberg <schonberg@gnat.com> PR ada/15593 * sem_ch12.adb (Analyze_Package_Instantiation): If the generic is not a compilation unit and is in an open scope at the point of instantiation, assume that a body may be present later. 2004-07-06 Ed Schonberg <schonberg@gnat.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case 'Size): Improve error message when specified size is not supported. * sem_ch6.adb (Maybe_Primitive_Operation): A library-level subprogram is never a primitive operation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84152 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-06-28 Robert Dewar <dewar@gnat.com>charlet2004-06-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mlib-tgt-tru64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb, mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb, mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb, a-strmap.adb, a-strmap.ads, clean.adb: Minor reformatting * exp_util.adb (Is_Possibly_Unaligned_Slice): Completely rewritten, to deal with problem of inefficient slices on machines with strict alignment, when the slice is a component of a composite. * checks.adb (Apply_Array_Size_Check): Do not special case 64-bit machines, we need the check there as well. 2004-06-28 Ed Schonberg <schonberg@gnat.com> * exp_ch5.adb (Expand_Assign_Array): Use correct condition to determine safe copying direction for overlapping slice assignments when component is controlled. * sem_ch12.adb (Instantiate_Formal_Package): Implicit operations of a formal derived type in the actual for a formal package are visible in the enclosing instance. 2004-06-28 Ed Schonberg <schonberg@gnat.com> PR ada/15600 * sem_util.adb (Trace_Components): Diagnose properly an illegal circularity involving a private type whose completion includes a self-referential component. (Enter_Name): Use Is_Inherited_Operation to distinguish a source renaming or an instantiation from an implicit derived operation. 2004-06-28 Pascal Obry <obry@gnat.com> * mlib-tgt-mingw.adb: (Library_Exists_For): Remove "lib" prefix from DLL. (Library_File_Name_For): Idem. 2004-06-28 Matthew Gingell <gingell@gnat.com> * g-traceb.ads: Add explanatory note on the format of addresses expected by addr2line. 2004-06-28 Jerome Guitton <guitton@act-europe.fr> * Makefile.in: Force debugging information on s-tasdeb.adb, a-except.adb and s-assert.adb needed by the debugger. 2004-06-28 Vincent Celier <celier@gnat.com> * make.adb (Collect_Arguments_And_Compile): Change Flag1 to Need_To_Build_Lib. (Gnatmake): Ditto. * mlib-prj.adb (Check_Library): Replace Flag1 with Need_To_Build_Lib * prj.adb: Minor reformatting (Project_Empty): Change Flag1 to Need_To_Build_Lib. Remove Flag2. * prj.ads: Comment updates Minor reformatting (Project_Data): Change Flag1 to Need_To_Build_Lib. Remove Flag2: not used. * prj-dect.adb (Parse_Declarative_Items): Accept "null" as a declaration. * gnat_ugn.texi: Put a "null;" declaration in one project file example * gnat_rm.texi: Document Empty declarations "null;". * makegpr.adb (Compile_Link_With_Gnatmake): Put the global archives in front of the linker options. (Link_Foreign): Put the global archives and the libraries in front of the linker options. 2004-06-28 Javier Miranda <miranda@gnat.com> * rtsfind.adb: (Get_Unit_Name): Fix typo in comment (RTU_Loaded): Code cleanup (Set_RTU_Loaded): New procedure to register as *loaded* explicitly withed predefined units. * rtsfind.ads (Set_RTU_Loaded): New procedure to register as *loaded* explicitly withed predefined units. Fix typo in comment * sem_ch10.adb (Analyze_Compilation_Unit): Register as *loaded* explicitly withed predefined units. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83789 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-05-27 Vincent Celier <celier@gnat.com>charlet2004-05-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vms_data.ads: Add new GNAT PRETTY qualifiers /NO_BACKUP and COMMENTS_LAYOUT=UNTOUCHED * symbols-vms.adb, symbols-vms-alpha.adb: Renamed symbols-vms.adb to symbols-vms-alpha.adb 2004-05-27 Thomas Quinot <quinot@act-europe.fr> * sem.ads: Clarify documentation on checks suppression. * einfo.ads (Is_Known_Non_Null): Minor comment typo fix and rephrasing. 2004-05-27 Ed Schonberg <schonberg@gnat.com> * sem_util.adb (Is_Descendent_Of): Examine properly all ancestors in the case of multiple derivations. (Is_Object_Reference): For a selected component, verify that the prefix is itself an object and not a value. * sem_ch12.adb (Same_Instantiated_Constant): New name for Same_Instantiated_Entity. (Same_Instantiated_Variable): Subsidiary to Check_Formal_Package_Instance, to recognize actuals for in-out generic formals that are obtained from a previous formal package. (Instantiate_Subprogram_Body): Emit proper error when generating code and the proper body of a stub is missing. * sem_ch4.adb (Remove_Address_Interpretations): If the operation still has a universal interpretation, do the disambiguation here. * exp_ch4.adb (Expand_N_Type_Conversion, Expand_N_Unchecked_Type_Conversion): Special handling when target type is Address, to avoid typing anomalies when Address is a visible integer type. * exp_ch6.adb (Expand_N_Subprogram_Body): Use Is_Descendent_Of_Address to determine whether a subprogram should not be marked Pure, even when declared in a pure package. 2004-05-27 Jose Ruiz <ruiz@act-europe.fr> * gnat_ugn.texi: Replace pragma Ravenscar by pragma Profile. * gnat_rm.texi: Replace Max_Entry_Queue_Depth by Max_Entry_Queue_Length Document No_Dynamic_Attachment, that supersedes No_Dynamic_Interrupts. Update the documentation about the Ravenscar profile, following the definition found in AI-249. * sem_prag.adb: Use FIFO_Within_Priorities and Ceiling_Locking when setting the Profile (Ravenscar). This must be done in addition to setting the required restrictions. * rtsfind.ads: Add the set of operations defined in package Ada.Interrupts. * exp_ch6.adb: Check whether we are violating the No_Dynamic_Attachment restriction. 2004-05-27 Eric Botcazou <ebotcazou@act-europe.fr> lang-specs.h: Always require -c or -S and always redirect to /dev/null if -gnatc or -gnats is passed. 2004-05-27 Hristian Kirtchev <kirtchev@gnat.com> * sem_prag.adb (Sig_Flags): A Pragma_Unchecked_Union does not count as a significant reference. Warnings are now properly emitted when a discriminated type is not referenced. * lib-xref.adb (Generate_Reference): A deferred constant completion, record representation clause or record type discriminant does not produce a reference to its corresponding entity. Warnings are now properly emitted when deferred constants and record types are not referenced. 2004-05-27 Geert Bosch <bosch@gnat.com> * Makefile.in: Use long version of libm routines on ia64 gnu/linux. Fixes ACATS Annex G tests. 2004-05-27 Robert Dewar <dewar@gnat.com> * rtsfind.adb (RTU_Loaded): Temporary kludge to get past bug of not handling WITH 2004-05-27 Arnaud Charlet <charlet@act-europe.fr> * s-interr.adb (Server_Task): Take into account case of early return from sigwait under e.g. linux. 2004-05-27 Sergey Rybin <rybin@act-europe.fr> * gnat_ugn.texi: Add description for the new gnatpp options: -rnb - replace the original source without creating its backup copy -c0 - do not format comments git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82324 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-05-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>charlet2004-05-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of function-at-a-time conversion * misc.c (adjust_decl_rtl): Deleted. (LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Define. * gigi.h: (adjust_decl_rtl, kept_level_p, set_block): Deleted. (add_decl_stmt, add_stmt, block_has_vars): New functions. (gnat_pushlevel, gnat_poplevel): Renamed from pushlevel and poplevel. * decl.c (elaborate_expression, maybe_pad_type): Call add_decl_stmt when making a decl. (gnat_to_gnu_entity): Likewise. Use add_stmt to update setjmp buffer. Set TREE_ADDRESSABLE instead of calling put_var_into_stack and flush_addressof. No longer call adjust_decl_rtl. (DECL_INIT_BY_ASSIGN_P): New macro. (DECL_STMT_VAR): Likewise. * trans.c (gigi): Call start_block_stmt to make the outermost BLOCK_STMT. (gnat_to_code, gnu_to_gnu, tree_transform, process_decls, process_type): Call start_block_stmt and end_block_stmt temporarily. Use gnat_expand_stmt instead of expand_expr_stmt. (add_decl_stmt): New function. (tree_transform): Call it. (add_stmt): Also emit initializing assignment for DECL_STMT if needed. (end_block_stmt): Set type and NULL_STMT. (gnat_expand_stmt): Make recursize call instead of calling expand_expr_stmt. (gnat_expand_stmt, case DECL_STMT): New case. (set_lineno_from_sloc): Do nothing if global. (gnu_block_stmt_node, gnu_block_stmt_free_list): New variables. (start_block_stmt, add_stmt, end_block_stmt): New functions. (build_block_stmt): Call them. (gnat_to_code): Don't expand NULL_STMT. (build_unit_elab): Rename pushlevel and poplevel to gnat_* and change args. (tree_transform): Likewise. (tree_transform, case N_Null_Statement): Return NULL_STMT. (gnat_expand_stmt, case NULL_STMT): New case. (gnat_expand_stmt, case IF_STMT): Allow nested IF_STMT to have no IF_STMT_TRUE. * utils2.c (gnat_mark_addressable, case VAR_DECL): Do not set TREE_ADDRESSABLE. * utils.c (create_var_decl): Do not call expand_decl or expand_decl_init. Set TREE_ADDRESSABLE instead of calling gnat_mark_addressable. Set DECL_INIT_BY_ASSIGN_P when needed and do not generate MODIFY_EXPR here. (struct e_stack): Add chain_next to GTY. (struct binding_level): Deleted. (struct ada_binding_level): New struct. (free_block_chain): New. (global_binding_level, clear_binding_level): Deleted. (global_bindings_p): Rework to see if no chain. (kept_level_p, set_block): Deleted. (gnat_pushlevel): Renamed from pushlevel and extensive reworked to use new data structure and work directly on BLOCK node. (gnat_poplevel): Similarly. (get_decls): Look at BLOCK_VARS. (insert_block): Work directly on BLOCK node. (block_has_var): New function. (pushdecl): Rework for new binding structures. (gnat_init_decl_processing): Rename and rework calls to pushlevel and poplevel. (build_subprog_body): Likewise. (end_subprog_body): Likewise; also set up BLOCK in DECL_INITIAL. * ada-tree.def (DECL_STMT, NULL_STMT): New codes. * ada-tree.h: (DECL_INIT_BY_ASSIGN_P): New macro. (DECL_STMT_VAR): Likewise. 2004-05-17 Robert Dewar <dewar@gnat.com> * restrict.ads, restrict.adb (Process_Restriction_Synonym): New procedure * sem_prag.adb (Analyze_Pragma, case Restrictions): Cleanup handling of restriction synonyums by using Restrict.Process_Restriction_Synonyms. * snames.ads, snames.adb: Add entries for Process_Restriction_Synonym * s-restri.ads (Tasking_Allowed): Correct missing comment * s-rident.ads: Add entries for restriction synonyms * ali.adb: Fix some problems with badly formatted ALI files that can result in infinite loops. * s-taprop-lynxos.adb, s-tpopsp-lynxos.adb, s-taprop-tru64.adb, s-tpopsp-posix-foreign.adb, s-taprop-irix.adb, s-interr-sigaction.adb, s-taprop-irix-athread.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb, s-interr-dummy.adb, s-taprop-os2.adb, s-taprop-solaris.adb, s-tpopsp-solaris.adb, s-asthan-vms.adb, s-inmaop-vms.adb, s-interr-vms.adb, s-taprop-vms.adb, s-tpopde-vms.adb, s-taprop-mingw.adb, s-interr-vxworks.adb, s-taprop-vxworks.adb, s-tpopsp-vxworks.adb, s-taprop-posix.adb, s-tpopsp-posix.adb, s-tratas-default.adb, a-dynpri.adb, a-tasatt.adb, a-taside.adb, a-taside.ads, exp_attr.adb, exp_ch9.adb, g-thread.adb, rtsfind.ads, sem_attr.adb, s-interr.adb, s-interr.ads, s-soflin.ads, s-taasde.adb, s-taasde.ads, s-taenca.adb, s-taenca.ads, s-taprop.ads, s-tarest.adb, s-tarest.ads, s-tasdeb.adb, s-tasdeb.ads, s-tasini.adb, s-tasini.ads, s-taskin.adb, s-taskin.ads, s-tasque.adb, s-tasque.ads, s-tasren.adb, s-tasren.ads, s-tassta.adb, s-tassta.ads, s-tasuti.adb, s-tasuti.ads, s-tataat.adb, s-tataat.ads, s-tpinop.adb, s-tpinop.ads, s-tpoben.adb, s-tpobop.adb, s-tpobop.ads, s-tporft.adb, s-tposen.adb, s-tposen.ads, s-tratas.adb, s-tratas.ads: Change Task_ID to Task_Id (minor cleanup). 2004-05-17 Vincent Celier <celier@gnat.com> * g-os_lib.adb (Normalize_Pathname.Final_Value): Remove trailing directory separator. * prj-proc.adb (Recursive_Process): Inherit attribute Languages from project being extended, if Languages is not declared in extending project. 2004-05-17 Javier Miranda <miranda@gnat.com> * sem_ch10.adb (Install_Limited_Withed_Unit): Do not install the limited view of a visible sibling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81935 138bc75d-0d04-0410-961f-82ee72b054a4