1. 06 Jun, 2007 40 commits
    • Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run time... · 66680f7a
      2007-04-20  Jose Ruiz  <ruiz@adacore.com>
      	    Arnaud Charlet  <charlet@adacore.com>
      
      	* Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run
      	time, use the default s-interr body that provides interrupt support
      	based on signals.
      	(LIBGNAT_TARGET_PAIRS for x86-linux): Use specialized versions of
      	a-exetim.ad{s,b}, a-extiti.ad{s,b}, a-rttiev.ad{s,b}, s-osinte.ad{s,b},
      	g-soccon.ads, and s-taprop.adb for the marte run time.
      	(EXTRA_GNATRTL_TASKING_OBJS for x86-linux): Execution time clocks and
      	timers are supported on marte.
      	(EH_MECHANISM for marte): Do not use ZCX.
      	(THREADSLIB for marte): Use -lmarte.
      	Add mlib-tgt-vms.o to the list of objects for gnatmake for VMS
      	Add mlib-tgt-specific.o to gnatmake objects
      	mlib-tgt-<platforms>.adb is now the body of MLib.Tgt.Specific, no
      	longer of MLib.Tgt.
      	(LIBGNAT_TARGET_PAIRS for vxworks): When building a run time for VxWorks
      	6, either kernel or rtp, use a specialized version of s-osinte.ads.
      
      From-SVN: r125433
      Jose Ruiz committed
    • lib-writ.adb: Handle Convention_CIL in addition to Convention_Java, since both are separated. · d3cc6a32
      2007-04-20  Arnaud Charlet  <charlet@adacore.com>
      	    Vincent Celier  <celier@adacore.com>
      
      	* lib-writ.adb: Handle Convention_CIL in addition to Convention_Java,
      	since both are separated.
      	Add support for imported CIL packages.
      	Add further special handling of "value_type" for CIL.
      	Add special handling of pragma Import for CIL.
      
      	* make.ads, make.adb: When switch -eS is used, direct all outputs to
      	standard output instead of standard error, except errors.
      	(Absolute_Path): Use untouched casing for the parent directory.
      	(Add_Library_Search_Dir): Use the untouched directory name.
      	(Add_Source_Search_Dir): Idem.
      	(Change_To_Object_Directory): Update output to use proper casing.
      	(Create_Binder_Mapping_File): Use the untouched filename to set
      	ALI_Name.
      	(Gnatmake): Use untouched library and executable directory names.
      	(Insert_Project_Sources): Use untouched filename for spec and body.
      	(Is_In_Object_Directory): Use untouched object directory.
      	(Mark_Directory): Idem.
      	(Collect_Arguments_And_Compile): Ensure that Full_Source_File always
      	contains the non-canonical filename in all cases.
      	(Change_To_Object_Directory): In verbose mode, display the name of the
      	object directory we're changing to.
      	(Compile_Sources): Make sure, when a project file is used, to compile
      	the body of the unit, when there is one, even when only the spec is
      	recorded in an ALI file.
      	(Gcc_Switches, Binder_Switches, Linker_Switches): Tables moved from the
      	spec to the body.
      	(Report_Compilation_Failed): New procedure
      	(Bind, Display_Commands, Compile_Sources, Initialize, Scan_Make_Arg):
      	procedures moved from the spec to the body.
      	(Extract_Failure): Removed, not used
      	Replace explicit raises of exception Bind_Failed and Link_Failed with
      	calls to Make_Failed with the proper message.
      	Replace explicit raises of exception Compilation_Failed with calls to
      	procedure Report_Compilation_Failed.
      	(Initialize): Create mapping files unconditionally when using project
      	files.
      
      	* sem_mech.adb: (Name_CIL, Name_CIL_Constructor, Convention_CIL,
      	Pragma_CIL_Constructor): New names.
      
      	* targparm.ads, targparm.adb
      	(Compiler_System_Version): Removed, no longer used.
      	(Get_Target_Parameters): Relax checks on system.ads validity. Add
      	handling of two new system flags: JVM and CLI.
      
      From-SVN: r125432
      Arnaud Charlet committed
    • sem_ch12.adb (Analyze_Associations): Diagnose use of an others association in an instance. · 437bae3f
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      
      	* sem_ch12.adb (Analyze_Associations): Diagnose use of an others
      	association in an instance.
      	(Copy_Generic_Node): If the node is a string literal, no need to copy
      	its descendants.
      	(Is_Generic_Formal): For a formal subprogram, the declaration is the
      	grandparent of the entity.
      	(Analyze_Formal_Interface_Type): Transform into a full type declaration,
      	to simplify handling of formal interfaces that derive from other formal
      	interfaces.
      	(Instantiate_Subprogram_Body): The defining unit name of the body of
      	the instance should be a defining identifier.
      	(Install_Formal_Packages): make global to the package, for use in
      	instantiations of child units.
      	(Analyze_Package_Instantiation): Do not attempt to set information on an
      	enclosing master of an entry when expansion is disabled.
      	(Instantiate_Type): If the actual is a tagged synchronized type and the
      	generic ancestor is an interface, create a generic actual for the
      	corresponding record.
      	(Analyze_Formal_Derived_Interface_Type): Rewrite as a derived type
      	declaration, to ensure that the interface list is processed correctly.
      	(Inline_Instance_Body): If enclosing scope is an instance body, remove
      	its entities from visibiility as well.
      	(Pre_Analyze_Actuals): if the actual is an allocator with  constraints
      	given with a named association, analyze the expression only, not the
      	discriminant association itself.
      	(Reset_Entity): If the analysis of a selected component is transformed
      	into an expanded name in the prefix of a call with parameters, do not
      	transform the original node into an expanded name, to prevent visibility
      	errors in the case of nested generics.
      	(Check_Private_View): For an array type, check whether the index types
      	may need exchanging.
      
      From-SVN: r125431
      Ed Schonberg committed
    • layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package spec from body · f35b24e9
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      
      	* layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package
      	spec from body
      	(Layout_Type): Fix recomputation of size from alignment.
      
      From-SVN: r125430
      Robert Dewar committed
    • initialize.c (__gnat_initialize for vxworks): Update documentation on the ZCX support... · 27f92b16
      2007-04-20  Olivier Hainque  <hainque@adacore.com>
      
      	* initialize.c (__gnat_initialize for vxworks):  Update documentation
      	on the ZCX support, using different sets of crtstuff objects than with
      	GCC 3.4.
      
      From-SVN: r125429
      Olivier Hainque committed
    • init.c: Do not adjust IP of an imported VMS exception of ia64. · dc642211
      2007-04-20  Tristan Gingold  <gingold@adacore.com>
      	    Olivier Hainque  <hainque@adacore.com>
      
      	* init.c: Do not adjust IP of an imported VMS exception of ia64.
      	LIB$STOP is called to raise an exception and the IP of the exception
      	is the instruction right after the call.
      	(__gnat_adjust_context_for_raise, AIX): Implement.
      	(__gnat_error_handler, AIX): Accept SIGINFO related arguments and call
      	 adjust_context_for_raise before Raise_From_Signal_Hanler.
      	(__gnat_install_handler, AIX): Add SA_SIGINFO to the sa_flags, to ensure
      	siginfo is passed to the handler, necessary to let the zcx propagation
      	engine unwind past it.
      
      From-SVN: r125428
      Tristan Gingold committed
    • a-clrefi.adb, [...]: New files · 10e77af2
      2007-04-20  Vincent Celier  <celier@adacore.com>
      	    Arnaud Charlet  <charlet@adacore.com>
      
      	* a-clrefi.adb, a-clrefi.ads: New files
      
      	* impunit.adb: Add s-os_lib in the list of user visible units.
      	(Non_Imp_File_Names_95): Add a-clrefi to this list
      	Remove obsolete run-time entries.
      	(Non_Imp_File_Names_05): Add Ada 2005 entries for:
      	 "a-exetim" -- Ada.Execution_Time
      	 "a-extiti" -- Ada.Execution_Time.Timers
      
      	* mlib-prj.ads, mlib-prj.adb
      	(Build_Library): Use untouched object dir and library dir. At the
      	same time makes sure that the checks are done using the canonical
      	form. Removes hard-coded directory separator and use the proper host
      	one instead.
      	(Process_Project): Do not look in object directory to check if libgnarl
      	is needed for a library, if there is no object directory.
      	(Build_Library): Scan the ALI files to decide if libgnarl is needed for
      	linking.
      	(Build_Library): When invoking gnatbind, use a response file if the
      	total size of the arguments is too large.
      
      	* Makefile.rtl: (g-sttsne): New object file.
      	Add entry for a-clrefi, s-utf_32, System.Exceptions
      
      	* Make-lang.in: Remove bogus dependency of s-memory.o on memtrack.o.
      	(GNAT_ADA_OBJS, GNATBIND_OBJS): Add s-except.o.
      	(GNATBIND_OBJS): Add new objects a-clrefi.o and a-comlin.o
      	Change g-string to s-string, g-os_lib to s-os_lib
      	Change all g-utf_32 references to s-utf_32
      
      From-SVN: r125427
      Vincent Celier committed
    • hostparm.ads (Normalized_CWD): Use the host directory separator instead of the… · 26fa2a35
      hostparm.ads (Normalized_CWD): Use the host directory separator instead of the hardcoded forward slash which...
      
      2007-04-20  Pascal Obry  <obry@adacore.com>
      
      	* hostparm.ads (Normalized_CWD): Use the host directory separator
      	instead of the hardcoded forward slash which is not the proper
      	character on Windows for example.
      	(Java_VM): Removed.
      
      From-SVN: r125426
      Pascal Obry committed
    • g-trasym.ads, [...]: Update list of supported targets Add note about symbolic traceback · 45fdc755
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      
      	* g-trasym.ads, g-traceb.ads: Update list of supported targets
      	Add note about symbolic traceback
      
      From-SVN: r125425
      Robert Dewar committed
    • g-soccon.ads: Add new constant Thread_Blocking_IO... · 9aeef76b
      2007-04-20  Thomas Quinot  <quinot@adacore.com>
      
      	* g-soccon.ads: Add new constant Thread_Blocking_IO, always True by
      	default, set False on a per-runtime basis.
      	(Need_Netdb_Buffer): New constant.
      
      	* g-socket.ads, g-socket.adb: Import new package
      	GNAT.Sockets.Thin.Task_Safe_NetDB.
      	(Raise_Host_Error): Use Host_Error_Message from platform-specific thin
      	binding to obtain proper message.
      	(Close_Selector): Use GNAT.Sockets.Thin.Signalling_Fds.Close.
      	Replace various occurrences of Arry (Arry'First)'Address with the
      	equivalent Arry'Address (GNAT always follows implementation advice from
      	13.3(14)).
      	(Get_Host_By_Address, Get_Host_By_Name,
      	Get_Service_By_Name, Get_Service_By_Port): Do not use GNAT.Task_Lock;
      	instead, rely on platform-specific task safe netdb operations provided
      	by g-socthi.
      
      	* g-socthi.ads, g-socthi.adb (Initialize): Remove obsolete formal
      	parameter Process_Blocking_IO.
      	(Host_Error_Messages): Add stub body.
      	(GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
      	(Safe_Gethostbyname, Safe_Gethostbyaddr, Safe_Getservbyname,
      	Safe_Getservbyport): Move functions into new child package
      	Task_Safe_NetDB.
      	(Nonreentrant_Gethostbyname, Nonreentrant_Gethostbyaddr,
      	Nonreentrant_Getservbyname, Nonreentrant_Getservbyport): New routines.
      	(In_Addr): Add alignment clause.
      
      From-SVN: r125424
      Thomas Quinot committed
    • g-regpat.adb (Quote): Fix improper quoting of '.' · 96338f19
      2007-04-20  Emmanuel Briot  <briot@adacore.com>
      
      	* g-regpat.adb (Quote): Fix improper quoting of '.'
      
      From-SVN: r125423
      Emmanuel Briot committed
    • g-pehage.adb (Produce): Open output files in Binary mode... · bdfc3830
      2007-04-20  Thomas Quinot  <quinot@adacore.com>
      
      	* g-pehage.adb (Produce): Open output files in Binary mode, so that
      	they have UNIX line endings (LF only) even on Windows, and thus pass
      	all GNAT style checks.
      
      From-SVN: r125422
      Thomas Quinot committed
    • g-os_lib.ads, [...] (Normalize_Pathname.Get_Directory): Correct obvious bug… · 690792a2
      g-os_lib.ads, [...] (Normalize_Pathname.Get_Directory): Correct obvious bug (return Dir; instead of return Directory;).
      
      2007-04-20  Vincent Celier  <celier@adacore.com>
      
      	* g-os_lib.ads, g-os_lib.adb (Normalize_Pathname.Get_Directory):
      	Correct obvious bug (return Dir; instead of return Directory;).
      	(Normalize_Pathname): Use Reference_Dir'Length, not Reference_Dir'Last
      
      From-SVN: r125421
      Vincent Celier committed
    • gnatsym.adb: Update Copyright notice · 751089b2
      2007-04-20  Vincent Celier  <celier@adacore.com>
      
      	* gnatsym.adb: Update Copyright notice
      	(Parse_Cmd_Line): Accept new switch -D
      	(Gnatsym): In Direct policy (switch -D) copy reference file to symbol
      	 file.
      
      	* prj.ads (Policy): New policy Direct
      	(Yes_No_Unknown): New enumeration type
      	(Project_Data): New component Libgnarl_Needed
      
      	* prj-nmsc.adb (Check_For_Source): When recording a source file make
      	use the untouched pathname casing.
      	(Get_Directories): Ensure that the Display_Exec_Directory is using the
      	proper casing on non case-sensitive platforms like Windows.
      	(Get_Unit): Accept file names x__... and x~... (where x = a, g, i or s)
      	on all platforms, as it is not possible to know which one is allowed
      	before processing the project files.
      	(Check_Stand_Alone_Library): Check that Library_Reference_Symbol_File is
      	specified when symbol policy is Direct. Check that when there is a
      	symbol file defined (either by default or with attribute
      	Library_Symbol_File) it is not the same as the reference symbol file.
      	(Check_Stand_Alone_Library): Recognize new symbol policy Direct.
      	(Look_For_Sources): Allow Locally_Removed_Files to be declare in non
      	extending projects.
      	(Record_Ada_Source): Record a source that has been locally removed in an
      	imported project.
      
      	* symbols.ads (Policy): New policy Direct
      
      	* symbols-vms.adb (Initialize): Take new policy Direct in case
      	statement
      
      From-SVN: r125420
      Vincent Celier committed
    • gmem.c: Add support for timestamps on memory operations. · 8cc39ff2
      2007-04-20  Vasiliy Fofanov  <fofanov@adacore.com>
      
      	* gmem.c: Add support for timestamps on memory operations.
      
      	* memtrack.adb, gnatmem.adb: Add support for timestamps on memory
      	operations (not used currently, just foundation for future
      	enhancements). Add possibility to perform full dump of gmem.out file.
      	(Print_Back_Traces): Declare accesses to root arrays constants since
      	they aren't modified.
      	(Print_Back_Traces): allocate root arrays on the heap rather than stack.
      
      From-SVN: r125419
      Vasiliy Fofanov committed
    • gnatls.adb: Add 3 spaces before the default project directory when... · 9fd79385
      2007-04-20  Vincent Celier  <celier@adacore.com>
      
      	* gnatls.adb: 
      	Add 3 spaces before the default project directory when displaying
      	the project search path.
      	Add new command line switch '-l' to display license information.
      
      From-SVN: r125418
      Vincent Celier committed
    • gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK= has been… · 37ed3e06
      gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK= has been specified Correct error...
      
      2007-04-20  Vincent Celier  <celier@adacore.com>
      
      	* gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
      	has been specified
      	Correct error message when invocation of the linker fails
      	Add explicit size clause for the C imported variables
      	Object_List_File_Supported and Using_GNU_Linker to emphasize that
      	we expect char size.
      	Read target parameters earlier, since this is needed to set
      	Target_VM properly. Also do not use -static/shared-libgcc for non GCC
      	targets.
      
      From-SVN: r125417
      Vincent Celier committed
    • gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept switch -P · 53a0bb66
      2007-04-20  Vincent Celier  <celier@adacore.com>
      
      	* gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept
      	switch -P
      	(ASIS_Main): New global variable
      	(Get_Closure): New procedure
      	(GNATCmd): Set ASIS_Main when -P and -U with a main is used for gnat
      	check, metric or pretty. Call Get_Closure in this case.
      	(Check_Files): For GNAT LIST, check all sources of all projects when
      	All_Projects is True.
      	(GNATCmd): Accept -U for GNAT LIST
      
      From-SVN: r125416
      Vincent Celier committed
    • g-debpoo.ads, [...] (Free_Physically.Free_Blocks): Use the absolute value of… · f38df0e1
      g-debpoo.ads, [...] (Free_Physically.Free_Blocks): Use the absolute value of Header.Block_Size when...
      
      2007-04-20  Vincent Celier  <celier@adacore.com>
      	    Emmanuel Briot  <briot@adacore.com>
      	    Olivier Hainque  <hainque@adacore.com>
      
      	* g-debpoo.ads, g-debpoo.adb (Free_Physically.Free_Blocks): Use the
      	absolute value of Header.Block_Size when displaying the freed physical
      	memory in traces.
      	(Allocate): Compute Storage_Address using Integer_Address, not
      	Storage_Offset, because the range of Storage_Offset may not be large
      	enough.
      	(Configure): New parameter Low_Level_Traces
      	(Allocate, Deallocation, Free_Physically): Added low-level traces
      	(Configure): new parameter Errors_To_Stdout.
      	(Output_File): new subprogram
      	(Deallocate, Dereference): Send error messages to the proper stream
      	(Print_Pool, Print_Info_Stdout): Make sure the output goes to stdout, as
      	documented. Previous code would send it to the current output file
      	defined in GNAT.IO, which might not be stdout
      	(Is_Valid): Adjust comment to mention that a positive reply means that
      	Header_Of may be used to retrieve the allocation header associated with
      	the subprogram Storage address argument. Return False early if this
      	address argument is misaligned.
      
      From-SVN: r125415
      Vincent Celier committed
    • g-comlin.ads, [...]: Add new warning for renaming of function return objects · fbe627af
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      
      	* g-comlin.ads, g-comlin.adb: 
      	Add new warning for renaming of function return objects
      
      	* opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
      	(Tree_Read): Use size of object instead of type'object_size, since the
      	latter is incorrect for packed array types.
      	(Tree_Write): Same fix
      
      	* opt.ads: Add new warning for renaming of function return objects
      	(Generating_Code): New boolean variable used to indicate that the
      	frontend as finished its work and has called the backend to process
      	the tree and generate the object file.
      	(GCC_Version): Is now private
      	(Static_Dispatch_Tables): New constant declaration.
      	(Overflow_Checks_Unsuppressed): New flag.
      	(Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
      	(List_Closure): New flag for gnatbind (-R)
      	Zero_Formatting: New flag for gnatbind (-Z)
      	(Special_Exception_Package_Used): New flag.
      	(Warn_On_Unrepped_Components): New flag.
      
      	* sem_ch8.adb (Check_Library_Unit_Renaming): Check that the renamed
      	unit is a compilation unit, rather than relying on its scope, so that
      	Standard can be renamed.
      	(Analyze_Object_Renaming): Add new warning for renaming of function
      	return objects.
      	Also reject attempt to rename function return object in Ada 83 mode.
      	(Attribute_Renaming): In case of tagged types, add the body of the
      	generated function to the freezing actions of the type.
      	(Find_Type): A protected type is visible right after the reserved word
      	"is" is encountered in its type declaration. Set the entity and type
      	rather than emitting an error message.
      	(New_Scope): Properly propagate Discard_Names to inner scopes
      	(Check_Nested_Access): New procedure.
      	(Has_Nested_Access, Set_Has_Nested_Access): New procedures.
      	(Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
      
      	* sem_warn.ads, sem_warn.adb: Improvements to infinite loop warning
      	Add new warning for renaming of function return objects
      	(Check_References): Suppress warnings for objects whose type or
      	base type has Warnings suppressed.
      	(Set_Dot_Warning_Switch): Add processing for -gnatw.c/C
      	(Set_Warning_Switch): Include new -gnatwc in -gnatwa
      
      From-SVN: r125414
      Robert Dewar committed
    • g-catiio.ads, [...] (Image): Check for null picture string · f24f72e8
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      
      	* g-catiio.ads, g-catiio.adb (Image): Check for null picture string
      
      From-SVN: r125413
      Robert Dewar committed
    • g-hesorg.ads, [...]: Update documentation GNAT.Heap/Bubble_Sort_G is now pure · a2fd0ecb
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      
      	* g-hesorg.ads, g-heasor.ads,
      	g-busorg.ads, g-bubsor.ads: Update documentation
      	GNAT.Heap/Bubble_Sort_G is now pure
      
      From-SVN: r125412
      Robert Dewar committed
    • frontend.adb (Frontend): Return immediately if the main source could not be parsed... · 804f7040
      2007-04-20  Vincent Celier  <celier@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      
      	* frontend.adb (Frontend): Return immediately if the main source could
      	not be parsed, because of preprocessing errors.
      
      	* gnat1drv.adb (gnat1drv): Handle RE_Not_Available gracefully.
      	(Gnat1drv): Exit with errors if the main source could not be parsed,
      	because of preprocessing errors.
      	(Check_Rep_Info): New procedure
      
      From-SVN: r125411
      Vincent Celier committed
    • exp_util.ads, [...] (Expand_Subtype_From_Expr): In Ada2005... · 0712790c
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_util.ads, exp_util.adb (Expand_Subtype_From_Expr): In Ada2005, an
      	object of a limited type can be initialized with a call to a function
      	that returns in place. If the limited type has unknown discriminants,
      	and the underlying type is a constrained composite type, build an actual
      	subtype from the function call, as is done for private types.
      	(Side_Effect_Free): An expression that is the renaming of an object or
      	whose prefix is the renaming of a object, is not side-effect free
      	because it may be assigned through the renaming and its value must be
      	captured in a temporary.
      	(Has_Controlled_Coextensions): New routine.
      	(Expand_Subtype_From_Expr): Do nothing if type is a limited interface,
      	as is done for other limited types.
      	(Non_Limited_Designated_Type): new predicate.
      	(Make_CW_Equivalent_Type): Modified to handle class-wide interface
      	objects.
      	Remove all handling of with_type clauses.
      
              * par-ch10.adb: Remove all handling of with_type clauses.
      
      	* lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
      	checksum if the main source could not be parsed.
      	(Loat_Unit): When processing a child unit, determine properly whether
      	the parent unit is a renaming when the parent is itself a child unit.
      	Remove handling of with_type clauses.
      
      	* sinfo.ads, sinfo.adb (Is_Static_Coextension): New function.
      	(Set_Is_Static_Coextension): New procedure.
      	(Has_Local_Raise): New function
      	(Set_Has_Local_Raise): New procedure
      	(Renaming_Exception): New field
      	(Has_Init_Expression): New flag
      	(Delay_Finalize_Attach): Remove because flag is obsolete.
      	(Set_Delay_Finalize_Attach): Remove because flag is obsolete.
      	Remove all handling of with_type clauses.
      	(Exception_Junk): Can now be set in N_Block_Statement
      
      From-SVN: r125410
      Ed Schonberg committed
    • exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that are interface type. · 2ed216d0
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      
      	* exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that
      	are interface type.
      	(Build_Elementary_Input_Call): For floating-point use right type in the
      	absence of strange size or stream size clauses.
      	(Build_Elementary_Write_Call): Same fix
      	(Has_Stream_Standard_Rep): Returns False if Stream_Size attribute
      	set to value that does not match base type size.
      
      From-SVN: r125409
      Robert Dewar committed
    • exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a default… · 2fa9443e
      exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a default initialization on an imported object...
      
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Arnaud Charlet  <charlet@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      
      	* exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a
      	default initialization on an imported object, when there is no
      	initialization call generated for it.
      	(Expand_Pragma_Assert): Add handling of No_Exception_Propagation
      	restriction
      
      	* snames.h, snames.ads, snames.adb, par-prag.adb: New pragma
      	Static_Elaboration_Desired.
      	Remove pragma Thread_Body.
      	Implement a new pragma No_Body
      	Removes the Explicit_Overriding pragma
      	Remove Optional_Overriding pragma
      	(Prag): Deal with Universal_Aliasing.
      	(Name_CIL, Name_CIL_Constructor, Convention_CIL,
      	Pragma_CIL_Constructor): New names.
      
      	* sem_cat.adb (Validate_Object_Declaration): An initialization that
      	uses the equivalent aggregate of a type must be treated as an implicit
      	initialization.
      	(Get_Categorization): Check a unit for pragma Preelaborate only if it
      	has none of the other categories.
      	(Process_Import_Or_Interface_Pragma): Report an error for an attempt
      	to apply Import to an object renaming declaration.
      
      	* sem_prag.adb (Process_Import_Or_Interface): Warn that a type imported
      	from a C++ class should be declared as limited and that it will be
      	considererd limited.
      	(Analyze_Pragma): Warn that a type specified with pragma CPP_Class
      	should be declared as limited and that it will be considererd limited.
      	(Ada_2005_Pragma): New procedure, used to deal with Ada 2005 pragmas
      	(Analyze_Pragma, case Export): Diagnose export of enumeration literal
      	(Analyze_Pragma): Deal with Universal_Aliasing.
      	(Sig_Flags): Likewise.
      	(Set_Encoded_Interface_Name): Suppress encoding when compiling for AAMP.
      	(Overflow_Checks_Unsuppressed): New flag.
      	(Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
      	(Analyze_Pragma [case Pack]): Ignore pragma Pack and post warning in
      	case of JVM or .NET targets, and compiling user code.
      	Add debugging convenience routine rv
      
      From-SVN: r125408
      Ed Schonberg committed
    • exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to compute masking constant... · 7d8b9c99
      2007-04-20  Robert Dewar  <dewar@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to
      	compute masking constant, since we now set Esize properly to the
      	underlying size.
      	(Create_Packed_Array_Type): Set proper Esize value adjusted as required
      	to match the alignment.
      	(Create_Packed_Array_Type): Use Short_Short_Unsigned as base type for
      	packed arrays of 8 bits or less.
      
      	* freeze.adb (Freeze_Entity): When freezing the formals of a
      	subprogram, freeze the designated type of a parameter of an access type
      	only if it is an access parameter.
      	Increase size of C convention enumeration object
      	(Freeze_Entity, array type case): Make sure Esize value is properly
      	adjusted for the alignment if it is known.
      	(Freeze_Entity, array type case): When checking bit packed arrays for
      	the size being incorrect, check RM_Size, not Esize.
      	(Freeze_Record_Type): Check for bad discriminated record convention
      	(In_Exp_Body): Return true if the body is generated for a subprogram
      	renaming, either an attribute renaming or a renaming as body.
      	(Check_Itype): If the designated type of an anonymous access component
      	is a non-protected subprogram type, indicate that it is frozen, to
      	prevent out-of-scope freeze node at some subsequent call.
      	(Freeze_Subprogram): On OpenVMS, reject descriptor passing mechanism
      	only if the subprogram is neither imported nor exported, as well as the
      	NCA descriptor class if the subprogram is exported.
      
      From-SVN: r125407
      Robert Dewar committed
    • exp_intr.adb (Expand_Unc_Deallocation): Add missing support for deallocation of… · b545a0f6
      exp_intr.adb (Expand_Unc_Deallocation): Add missing support for deallocation of class-wide interface objects.
      
      2007-04-20  Javier Miranda  <miranda@adacore.com>
      
      	* exp_intr.adb (Expand_Unc_Deallocation): Add missing support for
      	deallocation of class-wide interface objects.
      	(Expand_Dispatching_Constructor_Call): Take into account that if the
      	result of the dispatching constructor is an interface type, the
      	function returns a class-wide interface type; otherwise the returned
      	object would be actual. The frontend previously accepted returning
      	interface types because Expand_Interface_Actuals silently performed
      	the management of the returned type "as if" it were a class-wide
      	interface type.
      	(Expand_Dispatching_Constructor_Call): Replace call to
      	Make_DT_Access_Action by direct call to Make_Function_Call.
      
      From-SVN: r125406
      Javier Miranda committed
    • exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this attribute… · cde4a4b1
      exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this attribute compiling package Ada.Tags under...
      
      2007-04-20  Javier Miranda  <miranda@adacore.com>
      
      	* exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this
      	attribute compiling package Ada.Tags under No_Run_Time_Mode.
      
      From-SVN: r125405
      Javier Miranda committed
    • exp_fixd.adb (Integer_Literal): Add optional argument to construct a negative literal · 1091ce14
      2007-04-20  Geert Bosch  <bosch@adacore.com>
      
      	* exp_fixd.adb (Integer_Literal): Add optional argument to construct a
      	negative literal
      	(Do_Divide_Fixed_Fixed): Add comments to indicate Frac is always
      	positive
      	(Do_Divide_Fixed_Universal): Handle case of negative Frac.
      	(Do_Multiply_Fixed_Fixed): Add coments to indicate Frac is always
      	positive
      	(Do_Multiply_Fixed_Universal): Handle case of negative Frac.
      
      From-SVN: r125404
      Geert Bosch committed
    • exp_dist.ads, [...] (Make_Transportable_Check): New subprogram… · c3d593c9
      exp_dist.ads, [...] (Make_Transportable_Check): New subprogram (GARLIC_Support.Build_Subprogram_Receiving_Stubs...
      
      2007-04-20  Thomas Quinot  <quinot@adacore.com>
      
      	* exp_dist.ads, exp_dist.adb (Make_Transportable_Check): New subprogram
      	(GARLIC_Support.Build_Subprogram_Receiving_Stubs,
      	PolyORB_Support.Build_Subprogram_Receiving_Stubs):
      	For a remote call to a function with a classwide return type, apply an
      	E.4(18) check to the returned value.
      	(Add_RACW_Primitive_Declarations_And_Bodies): Do not generate stubs for
      	stream attributes of the designated type of an RACW, as they are not
      	dispatching primitive operations.
      
      From-SVN: r125403
      Thomas Quinot committed
    • exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its functionality when... · 7853d934
      2007-04-20  Javier Miranda  <miranda@adacore.com>
      	    Nicolas Setton  <setton@adacore.com>
      
      	* exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its
      	functionality when the backend is generating code.
      	Otherwise any serious error
      	reported by the backend calling the frontend routine Error_Msg
      	changes the Compilation_Mode to Check_Semantics, disables the
      	functionality of this routine and causes the generation of
      	spureous additional errors.
      
      	* exp_dbug.ads (Pointers to Unconstrained Arrays): Document the
      	debugging information now generated by the compiler for fat-pointer
      	types.
      	Document the contents of DW_AT_producer in the GNAT Vendor extensions to
      	DWARF2/3.
      	Document GNAT Vendor extensions to DWARF 2/3 and the "-gdwarf+" switch.
      
      From-SVN: r125402
      Javier Miranda committed
    • exp_ch9.ads, [...] (Build_Protected_Entry): Set sloc of generated exception… · 3e038221
      exp_ch9.ads, [...] (Build_Protected_Entry): Set sloc of generated exception handler appropriately when debugging generated code.
      
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      	    Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry): Set sloc of
      	generated exception handler appropriately when debugging generated code.
      	Deal properly with No_Exception_Propagation restriction mode.
      	(Expand_N_Abort_Statement): Add an unchecked type conversion from
      	System.Address to System.Tasking.Task_Id when processing the result of
      	the predefined primitive _disp_get_task_id.
      	(Expand_N_Asynchronous_Select): Clarify comment.
      	(Expand_N_Protected_Type_Declaration): Minor code cleanup.
      	(Find_Parameter_Type): New routine inside Type_Conformant_Parameters.
      	(Type_Conformant_Parameters): New parameter Prim_Op_Typ. Code cleanup.
      	(Add_Private_Declarations, Build_Protected_Body): Use proper slocs for
      	privals and for generated call to Complete_Entry_Body, for better gdb
      	behavior.
      	(Copy_Result_Type): Utility to construct a parameter and result profile
      	for protected functions whose return type is an anonymous access to
      	subprogram.
      	(Build_Protected_Sub_Spec and Expand_Access_Protected_Subprogram_Type):
      	call the above.
      	(Build_Task_Activation_Call): Insert Activate_Tasks call at proper
      	point when the local-raise-to-goto transformation has taken place.
      
      From-SVN: r125401
      Ed Schonberg committed
    • exp_ch7.ads, [...] (Expand_Cleanup_Actions): Set Sloc of inserted cleanup code… · dbe13a37
      exp_ch7.ads, [...] (Expand_Cleanup_Actions): Set Sloc of inserted cleanup code appropriately for GDB use.
      
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Thomas Quinot  <quinot@adacore.com>
      
      	* exp_ch7.ads, exp_ch7.adb (Expand_Cleanup_Actions): Set Sloc of
      	inserted cleanup code appropriately for GDB use.
      	(Make_Deep_Proc): Use Make_Handler_For_Ctrl_Operation to create
      	exception handler for Deep_Adjust or Deep_Finalize.
      	(Make_Handler_For_Ctrl_Operation): New subprogram. When runtime entity
      	Raise_From_Controlled_Operation is available, use a call to that
      	subprogram instead of a plain "raise Program_Error" node to raise
      	Program_Error if an exception is propagated from an Adjust or Finalize
      	operation.
      	(Insert_Actions_In_Scope_Around): If the statement to be wrapped
      	appears in the optional statement list of a triggering alternative, the
      	scope actions can be inserted directly there, and not in the list that
      	includes the asynchronous select itself.
      
      From-SVN: r125400
      Ed Schonberg committed
    • exp_ch6.ads, [...] (Expand_Call): When adding an extra accessibility actual... · 7888a6ae
      2007-04-20  Gary Dismukes  <dismukes@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
      	accessibility actual, check for the case of an aliased object that has
      	been rewritten as an Access attribute, and assign Prev to Prev_Orig so
      	we fall into processing for the attribute rather than the name of the
      	object.
      	(Expand_Inline_Call): If an actual is a literal, and the corresponding
      	formal has its address taken in the body, create a temporary to capture
      	value.  If the return type is a limited interface, do not treat the
      	return value as Controlled.
      	(Is_In_Place_Function):  If the return type is a limited interface,
      	treat as returning in place. The actual returned object may not always
      	be limited, but the caller has to assume that it is returned in place.
      	(Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
      	context of an allocator, use the correct finalization chain (that is,
      	the chain belonging to the access type, rather than the chain belonging
      	to the current scope).
      	(Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
      	result type rather than a controlling result as a precondition for
      	adding an allocation form actual to a build-in-place call.
      	(Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
      	(Freeze_Subprogram): Code cleanup. Remove all the code that register the
      	primitive in the dispatch tables. This work is now done by Make_DT when
      	the type is frozen.
      	(Register_Predefined_DT_Entry): Removed.
      	(Add_Return): If end label is not present, use sloc of last statement
      	for generated return statement in procedure, for better gdb behavior
      	on expanded code.
      	(Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
      	object address nodes to ensure proper processing by routines like
      	Insert_After*.
      	(Expand_Call): Fix generation of validity check for parameter
      	(Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
      	the allocation form parameter if the result subtype is constrained,
      	except when the function has a controlling result.
      	(Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
      	rather than Is_Controlled and Has_Controlled_Component, since we want to
      	include class-wide result types in this treatment. Also test for a
      	controlling result, since that also requires passing a finalization
      	list.
      	(Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
      	even when the result subtype is constrained, to handle calls involving
      	controlling results.
      	(Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
      	is now called even when the result subtype is constrained, to handle
      	calls involving controlling results.
      	(Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
      	on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
      	now performs the test).
      	(Make_Build_In_Place_Call_In_Object_Declaration):
      	Add_Alloc_Form_Actual_* is now called even when the result subtype is
      	constrained, to handle calls involving controlling results.
      	(Add_Return): Accomodate rewritten pattern from local raise to goto
      	transformation, so that we still recognize an transfer statement
      	and do the right thing here in that case.
      	(Expand_N_Subprogram_Body): Add dummy Push/Pop_xxx_Label nodes at start
      	and end of subprogram code.
      	(Register_Interface_DT_Entry, Register_Predefined_DT_Entry): Add missing
      	support for primitives that are functions (without formals) with a
      	controlling result.
      	(Inherited_From_Formal): If the actual subtype has not generic parent
      	type, it is not an actual for a formal derived type, and there is no
      	operation to inherit from the formal.
      
      From-SVN: r125399
      Gary Dismukes committed
    • exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a controlled type... · a79ec8c5
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      
      	* exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a
      	controlled type, use Make_Handler_For_Ctrl_Operation to construct the
      	required exception handler.
      	(Expand_Simple_Function_Return, Expand_N_Return_Statement): Handle
      	properly the case of a function whose return type is a limited
      	class-wide interface type. Modify the code of the accessibility
      	check to handle class-wide interface objects. In this case we need to
      	displace "this" to reference the primary dispatch table to get access
      	to the TSD of the object (to evaluate its accessibility level).
      	(Expand_N_Extended_Return_Statement): Test for a tagged result type
      	rather than a controlling result as one of the conditions for
      	generating tests of the implicit BIP_Alloc_Form formal. The
      	initialization assignment is also handled according to whether the
      	result is tagged instead of controlling.
      	In the case where the init assignment is inserted in the "then" part of
      	the allocation conditional, rewrite the target to be a dereference of
      	the implicit BIP_Object_Access formal.
      	If the returned value is unconstrained and created on the secondary
      	stack, mark the enclosing block and function so that the secondary
      	stack is not reclaimed on return.
      	Treat returns from functions with controlling results similarly to
      	returns from functions with unconstrained result subtypes.
      	If the object returned is unconstrained, and an allocator must be
      	created for it, analyze the allocator once the block for the extended
      	return is installed, to ensure that finalizable components
      	of the expression use the proper finalization list. Guard the call to
      	Move_Final_List with a check that there is something to finalize.
      	(Make_Tag_Ctrl_Assignment): Use "old" handling
      	of controlled type assignment for virtual machines, since new code uses
      	unsupported features (such as direct access to bytes in memory).
      
      From-SVN: r125398
      Ed Schonberg committed
    • exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to handle the… · 26bff3d9
      exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to handle the creation of finalization lists and calls for nested...
      
      2007-04-20  Javier Miranda  <miranda@adacore.com>
      	    Hristian Kirtchev  <kirtchev@adacore.com>
      	    Bob Duff  <duff@adacore.com>
      
      	* exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to
      	handle the creation of finalization lists and calls for nested
      	coextensions when the root of the chains is part of a return statement.
      	(Inside_A_Return_Statement): New function inside Complete_Coextension_
      	Finalization.
      	(Expand_Record_Equality): Skip components that are interface types.
      	(Displace_Allocator_Pointer): Add missing support for interface subtypes
      	(Expand_N_Allocator): Replace invocation of Is_Local_Access_Discriminant
      	with Rewrite_Coextension. Change the condition for detecting coextension
      	root nodes.
      	(Is_Local_Access_Discriminant): Removed.
      	(Rewrite_Coextension): New routine which rewrites a static coextension
      	as a temporary and uses its unrestricted access in the construction of
      	the outer object.
      	(Complete_Coextension_Finalization): New routine. Generate finalization
      	attachment calls to all delayed coextensions.
      	(Expand_N_Allocator): Call Complete_Coextension_Finalization whenever
      	the allocator is not a coextension itself and has delayed coextensions.
      	If the current allocator is controlled, but also a coextension, delay
      	the generation of the finalization attachment call.
      	Rename local variable "Node" to "Nod" in order to avoid confusion with
      	"Elists.Node".
      	(Expand_Allocator_Expression): Call Adjust for initialized allocators of
      	limited types that are not inherently limited. Such an allocator is
      	illegal, but is generated by the expander for a return statement, to
      	copy the result onto the secondary stack. This is the only case where a
      	limited object can be copied. Generate code to displace the pointer
      	to the object if the qualified expression is a class-wide interface
      	object. Such displacement was missing and hence the copy of the object
      	was wrong.
      	(Apply_Accessibility_Check): Handle allocated objects initialized in
      	place.
      	(Displace_Allocator_Pointer): Subsidiary procedure to Expand_N_Allocator
      	and Expand_Allocator_Expression. Allocating class-wide interface objects
      	this routine displaces the pointer to the allocated object to reference
      	the component referencing the corresponding secondary dispatch table.
      	Expand_Allocator_Expression): Add missing support to allocate class-wide
      	interface objects initialized with a qualified expression.
      	(Get_Allocator_Final_List): Test for an anonymous access type that is a
      	function result type, and use the finalization list associated with the
      	function scope in that case (such an anonymous type should not be
      	treated like an access parameter's type).
      
      From-SVN: r125397
      Javier Miranda committed
    • exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a wrapper… · 47cc8d6b
      exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a wrapper when the full view of the controlling type of an...
      
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      
      	* exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a
      	wrapper when the full view of the controlling type of an inherited
      	function that dispatches on result implements interfaces.
      	(Expand_N_Object_Declaration): In cases where the type of the
      	declaration is anonymous access, create finalization list for it.
      	(Expand_N_Object_Declaration): Generate a persistent_bss directive only
      	if the object has no explicit initialization, to match description of
      	functionality of pragam Persistent_BSS.
      	(Build_Equivalent_Array_Aggregate, Build_Equivalent_Record_Aggregate):
      	new function to build static aggregates, to replace initialization call
      	when static initialization is desired.
      	(Freeze_Type): Generate a list controller for an access type whenever
      	its designated type has controlled anonymous access discriminants.
      	(Build_Equivalent_Aggregate): New procedure to compute a static
      	aggregate to be used as default initialization for composite types,
      	instead of a generating a call to the initialization procedure for the
      	type.
      	(Build_Initialization_Call): When available, replace a call to the
      	initialization procedure with a copy of the equivalent static aggregate
      	for the type.
      	(Expand_N_Object_Declaration):  Use New_Occurrence_Of in generated
      	declarations for objects of a class-wide interface type, rather than
      	just identifiers, to prevent visibility problems.
      	(Expand_N_Object_Declaration): When expanding the declaration for an
      	object of a class-wide interface type, preserve the homonym chain of
      	the original entity before exchanging it with that of the generated
      	renaming declaration.
      	(Freeze_Enumeration_Type): Don't raise CE if No_Exception_Propagation
      	active, because there is no way to handle the exception.
      	(Freeze_Record_Type): In case of CPP_Class types add a call to Make_DT
      	to do a minimum decoration of the Access_Disp_Table list.
      	(Expand_Record_Controller): Avoid the addition of the controller between
      	the component containing the tag of a secondary dispatch table and its
      	adjacent component that stores the offset to the base of the object.
      	This latter component is only generated when the parent type has
      	discriminants ---documented in Add_Interface_Tag_Components).
      	(Apply_Array_Size_Check): Removed, no longer needed.
      	(Expand_N_Full_Type_Declaration): If the type has anonymous access
      	components, create a Master_Entity for it only if it contains tasks.
      	(Build_Init_Procedure): Suppress the tag assignment compiling under
      	no run-time mode.
      	(Freeze_Record_Type): Remove code associated with creation of dispatch
      	table.
      	(Init_Secondary_Tags): Update type of actuals when generating calls to
      	Ada.Tags.Set_Offset_To_Top
      	(Stream_Operation_OK): Disable use of streams compiling under no
      	run-time mode
      	(Expand_N_Object_Declaration): Don't do Initialize_Scalars initalization
      	if Has_Init_Expression set.
      	(Build_Init_Procedure): Replace call to Fill_DT_Entry by call to
      	Register_Primitive, which provides the same functionality.
      	(Requires_Init_Proc): Return false in case of interface types.
      	(Add_Secondary_Tables): Use the new attribute Related_Interface to
      	cleanup the code.
      	(Predefined_Primitive_Freeze): Do not assume that an internal entity
      	is always associated with a predefined primitive because the internal
      	entities associated with interface types are not predefined primitives.
      	Therefore, the call to Is_Internal is replaced by a call to the
      	function Is_Predefined_Dispatching_Operation.
      	(Make_Eq_If): When generating the list of comparisons for the
      	components of a given variant, omit the controller component that is
      	present if the variant has controlled components.
      
      From-SVN: r125396
      Ed Schonberg committed
    • exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames. · 822033eb
      2007-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      
      	* exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames.
      	Add "with" and "use" clauses for Sem_Attr.
      	(Expand_Current_Value): Do not replace occurences of attribute
      	references where the prefix must be a simple name.
      
      	* sem_attr.ads, sem_attr.adb: Remove "with" and "use" clauses for
      	Namet. Add new arrays Attribute_Name_Modifies_Prefix and
      	Attribute_Requires_Simple_Name_Prefix.
      	(Name_Modifies_Prefix): Body of new function.
      	(Requires_Simple_Name_Prefix): Body of new function.
      	(Resolve_Attribute, case Access): Improve error message for case of
      	mismatched conventions.
      	(Analyze_Attribute, case 'Tag): The prefix the attribute cannot be of an
      	incomplete type.
      	(Analyze_Attribute, case 'Access): If the type of the prefix is a
      	constrained subtype for a nominal unconstrained type, use its base type
      	to check for conformance with the context.
      	(Resolve_Attribute): Remove test of the access type being associated
      	with a return statement from condition for performing accessibility
      	checks on access attributes, since this case is now captured by
      	Is_Local_Anonymous_Access.
      	(Analyze_Access_Attribute): Set Address_Taken on entity
      	(Analyze_Attribute, case Address): Set Address_Taken on entity
      	(OK_Self_Reference): Traverse tree to locate enclosing aggregate when
      	validating an access attribute whose prefix is a current instance.
      	(Resolve_Attribute): In case of attributes 'Code_Address and 'Address
      	applied to dispatching operations, if freezing is required then we set
      	the attribute Has_Delayed_Freeze in the prefix's entity.
      	(Check_Local_Access): Set flag Suppress_Value_Tracking_On_Call in
      	current scope if access of local subprogram taken
      	(Analyze_Access_Attribute): Check legality of self-reference even if the
      	expression comes from source, as when a single component association in
      	an aggregate has a box association.
      	(Resolve_Attribute, case 'Access): Do not apply accessibility checks to
      	the prefix if it is a protected operation and the attribute is
      	Unrestricted_Access.
      	(Resolve_Attribute, case 'Access): Set the Etype of the attribute
      	reference to the base type of the context, to force a constraint check
      	when the context is an access subtype with an explicit constraint.
      	(Analyze_Attribute, case 'Class): If the prefix is an interface and the
      	node is rewritten as an interface conversion. leave unanalyzed after
      	resolution, to ensure that type checking against the context will take
      	place.
      
      From-SVN: r125395
      Hristian Kirtchev committed
    • exp_ch13.adb (Expand_N_Attribute_Definition_Clause, [...]): If the… · 33160237
      exp_ch13.adb (Expand_N_Attribute_Definition_Clause, [...]): If the initialization is the equivalent aggregate of the initialization...
      
      2007-04-20  Ed Schonberg  <schonberg@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      
      	* exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
      	If the initialization is the equivalent aggregate of the initialization
      	procedure of the type, do not remove it.
      	(Expand_N_Attribute_Definition_Clause): Exclude access variables
      	initialized to null from having their expression reset to empty and
      	note this exception in the comment.
      
      From-SVN: r125394
      Ed Schonberg committed