2007-04-20 Thomas Quinot <quinot@adacore.com>
* a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
C imported variable.
(Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
on entry.
From-SVN: r125380
2007-04-20 Javier Miranda <miranda@adacore.com>
* 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.
From-SVN: r125379
2007-04-20 Thomas Quinot <quinot@adacore.com>
* a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
presence of this categorization pragma is mandated by the language.
(Limited_Controlled): Add missing pragma Preelaborable_Initialization
for this type.
From-SVN: r125376
2007-04-20 Thomas Quinot <quinot@adacore.com>
Olivier Hainque <hainque@adacore.com>
Robert Dewar <dewar@adacore.com>
* a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
check.
(Raise_Current_Excep): Call Debug_Raise_Exception just before
propagation starts, to let debuggers know about the event in a reliable
fashion.
(Local_Raise): Moved to System.Exceptions
More convenient to have this as a separate unit
* s-except.adb, s-except.ads: New files.
* a-exextr.adb (Unhandled_Exception): Delete - replaced by
Debug_Unhandled_Exception in System.Exceptions where it belongs
together with a couple of other debug helpers.
(Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
the former Unhandled_Exception.
* exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
(Warn_No_Exception_Propagation): New procedure
(Warn_If_No_Propagation): Rewritten for new warning generation
(Expand_Exception_Handlers): New warning generation
(Expand_N_Raise_xxx_Error): Rewritten for new warnings
(Add_Exception_Label): Use Special_Exception_Package_Used for test
instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
(Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
even if restriction is set (makes life easier in Check_Returns)
(Expand_Local_Exception_Handlers): Follow renamed entity chain when
checking exception identities.
(Expand_Local_Exception_Handlers): Do not optimize when all others case
(Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
block for handler (used by Check_Returns)
(Expand_Local_Exception_Handlers): Local_Raise now takes an address
(Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
remove all exception handlers when optimizing local raise statements.
(Find_Local_Handler): Use Get_Renamed_Entity
(Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
marked analyzed after expanding exception handlers, do not generate
redundant cleanup actions, because they have been constructed already.
From-SVN: r125375
2007-04-20 Robert Dewar <dewar@adacore.com>
* comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
for Errout
* errout.adb: New Finalize/Compilation_Errors/Output_Messages
implementation
* errout.ads (Finalize): Changed interface
(Output_Messages): New procedure
(Compilation_Errors): New Interface
* prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
Finalize/Output_Messages interface for Errout
(Prepare_To_Preprocess): New Finalize/Output_Messages interface for
Errout.
From-SVN: r125374
2007-04-20 Jose Ruiz <ruiz@adacore.com>
* s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
Rename to Abort_Task_Interrupt to be able to keep the same interface
as the rest of the targets.
* s-osinte-vxworks.ads s-osinte-vxworks.adb
(To_VxWorks_Priority): Remove explicit "in" mode indicator
* s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
New files.
From-SVN: r125372
2007-04-20 Gary Dismukes <dismukes@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
Tristan Gingold <gingold@adacore.com>
Olivier Hainque <hainque@adacore.com>
* gigi.h, trans.c (Identifier_to_gnu): Change test for deferred
constant by adding guard that the entity is an E_Constant before
testing presence of Full_view (and remove now-unnecessary test that
entity is not a type).
For a CONST_DECL used by reference, manually retrieve
the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
(struct language_function): Move from utils.c to here.
(struct parm_attr): New structure.
(parm_attr, parm_attr vector, parm_attr GC vector): New types.
(f_parm_attr_cache): New macro.
(Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
expressions for the 'First, 'Last and 'Length attributes of the
unconstrained array IN parameters.
(Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
Allocate the information structure for the function earlier, as well
as the language-specific part.
If the parameter attributes cache has been populated, evaluate the
cached expressions on entry.
(takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
N_Procedure_Call_Statement and N_Indexed_Component.
(Pragma_to_gnu): Translate inspection_point to an asm statement
containaing a comment and a reference to the object (either its address
for BLKmode or its value).
(Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
to go to DECL_INITIAL. Together with the size constraint relaxation
in create_var_decl, enlarges the set of situations in which an
identifier may be used as an initializer without implying elaboration
code.
(Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
node.
(maybe_stabilize_reference): Remove lvalues_only parameter.
(gnat_stabilize_reference): Adjust for above change.
(gnat_to_gnu): Do not set location information on the result
if it is a reference.
(add_cleanup): Add gnat_node parameter and set the location of the
cleanup to it.
(Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
(Exception_Handler_to_gnu_zcx): Likewise.
(gigi): Remove the cgraph node if the elaboration procedure is empty.
(Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
the former right after the latter.
(start_stmt_group): Make global.
(end_stmt_group): Likewise.
(gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
vars.
(gnu_program_error_label_stack): Likewise.
(gigi): Initialize them.
(call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
(gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
New cases.
(push_exception_label_stack): New function.
(takes_address): New function.
* utils.c (struct language_function): Move to trans.c from here.
(unchecked_convert): Do not wrap up integer constants in
VIEW_CONVERT_EXPRs.
(create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
the latter for aggregate types, unexpected by later passes, and relax an
arbitrary size constraint on the former.
(create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
to compare the sizes.
(convert_vms_descriptor): When converting to a fat pointer type, be
prepared for a S descriptor at runtime in spite of a SB specification.
(shift_unc_components_for_thin_pointers): New function.
(write_record_type_debug_info): For variable-sized fields, cap the
alignment of the pointer to the computed alignment.
(finish_record_type): Change HAS_REP parameter into REP_LEVEL.
If REP_LEVEL is 2, do not compute the sizes.
(build_vms_descriptor): Adjust for new prototype of finish_record_type.
(build_unc_object_type): Likewise.
(declare_debug_type): New function.
* ada-tree.def: USE_STMT: removed (not emitted anymore).
* misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
no statement is expandable anymore.
(gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
(gnat_handle_option): Only allow flag_eliminate_debug_types to be set
when the user requested it explicitely.
(gnat_post_options): By default, set flag_eliminate_unused_debug_types
to 0 for Ada.
(get_alias_set): Return alias set 0 for a type if
TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
* ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
(DECL_FUNCTION_STUB): New accessor macro.
(SET_DECL_FUNCTION_STUB): New setter macro.
* lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
* fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
declarations.
From-SVN: r125371
2007-04-20 Eric Botcazou <ebotcazou@adacore.com>
Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Olivier Hainque <hainque@adacore.com>
* decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
renamed expression of a full renaming at toplevel.
(gnat_to_gnu_entity, case object): If not defining, do not look inside
the values the constant is initialized to if it is an N_Allocator.
(gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
TYPE_SIZE_UNIT of inner types after the stride is elaborated.
(make_aligning_type): Accept an extra ROOM argument for storage to be
made available before the aligned field, and an extra BASE_ALIGN
argument for callers to pass the alignment guaranteed to be honored for
the whole aligning object. Avoid call to finish_record_type, which only
interferes with the sizes we want to set.
(gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
make_aligning_type for super-aligned objects on stack.
(components_to_record): Pass the adjusted size of the type when creating
fields in the qualified union for the variant part.
(gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
(gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
packed array type.
(maybe_pad_type): Set TYPE_USER_ALIGN.
(make_aligning_type): Likewise.
ALIGN argument is unsigned int.
(gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
(gnat_to_gnu_param): Likewise, for parameters.
(gnat_to_gnu_entity) <object>: Always instantiate the renaming object
if it is constant and stems from a function call.
(gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
of the record is specified. Adjust accordingly.
(adjust_packed): New static function.
(gnat_to_gnu_field): Use it to adjust the packedness setting.
(components_to_record): Likewise.
(gnat_to_gnu_entity) <object>: Do not test the renamed expression for
side-effects if the object is deemed constant.
(gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
type instead of merely finalizing it. Tidy.
<E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
<E_Access_Type>: Likewise.
(defer_debug_incomplete_list): Rename to defer_finalize_list.
(defer_debug_level): Delete.
(gnat_to_gnu_entity) <debug_deferred>: Likewise
<E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
type.
<E_Record_Type>: Do not explicitly defer finalizing the type.
Adjust for write_record_type_debug_info renaming.
<E_Subprogram_Type>: Likewise.
Finalize deferred types right after deferred incomplete types are
expanded.
(rest_of_type_decl_compilation): New global function.
(components_to_record): Rename defer_debug parameter to do_not_finalize.
(components_to_record): Propagate the packedness to the fields of the
qualified union type if there is a variant part.
(gnat_to_gnu_entity) <E_Array_Type>: Use new function
instead of inline code to adjust the XUT field offsets.
(gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
<E_Record_Subtype>: Do not let finish_record_type compute the sizes
and write the debug info if the type derives from a discriminated one.
(gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
<E_Array_Subtype>: Likewise.
<E_String_Literal_Subtype>: Likewise.
(gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
an alignment clause.
(maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
before giving warning.
(prepend_one_attribute_to): New function, helper to prepend an attribute
to an attribute list.
(gnat_to_gnu_entity) <E_Procedure>: Use it.
(prepend_attributes): Likewise.
(gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
<E_Array_Type>: Declare the padding type for the element type, if any.
<E_Array_Subtype>: Likewise.
(defer_limited_with): New variable.
(Gigi_Equivalent_Type): New function.
(gnat_to_gnu_entity): Use it at start and use result throughout.
(gnat_to_gnu_entity, case E_Access_Type): Rework to use
Gigi_Equivalent_Type, support Limited_With, allow two levels of
indirection, precompute if unconstrained array to simplify logic, and
use defer_limited_with to defer elaboration of some types from limited
with.
(finalize_from_with_types): New function.
From-SVN: r125370
2007-04-20 Arnaud Charlet <charlet@adacore.com>
* s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
its C counterpart.
Remove references to Unchecked_Conversion, and use Ada.xxx instead.
Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
From-SVN: r125368
2007-04-20 Matthew Gingell <gingell@adacore.com>
* s-osinte-aix.adb: map Ada priorities to target
priorities appropriately for different scheduling policies.
From-SVN: r125367
2007-04-20 Vincent Celier <celier@adacore.com>
* mlib-tgt-specific.adb, mlib-tgt-specific.ads,
mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
* mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
MLib.Tgt, containing the default versions
of the exported subprograms. For each platforms, create a specific
version of the body of new child package MLib.Tgt.Specific that contains
only the bodies of subprograms that are different from the default.
(Archive_Builder_Append_Options): New function
From-SVN: r125366
2007-04-20 Arnaud Charlet <charlet@adacore.com>
* system-vxworks-sparcv9.ads, system-solaris-x86.ads,
system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
system-vxworks-mips.ads, system-vxworks-alpha.ads,
system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
system-solaris-sparcv9.ads, system-vms.ads, system.ads,
system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
system-linux-ia64.ads: Document mapping between Ada and OS priorities.
This patch changes the largest non-binary modulus from 2**31-1 to
2**32-1.
(Compiler_System_Version): Removed, no longer used.
Clean up system files by removing flags only used on a single target.
Also remove obsolete flags, only used during bootstrap from system.ads
(Address): Add a pragma Preelaborable_Initialization.
* system-aix.ads: Ditto.
(GCC_ZCX_Support): Set to true.
Update priority range on AIX and map Ada priorities to target
priorities appropriately for different scheduling policies.
* ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
From-SVN: r125365
2007-04-20 Arnaud Charlet <charlet@adacore.com>
* s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
time when entering this routine to detect a backward clock setting
(manual setting or DST adjustment), to avoid waiting for a longer delay
than needed.
(Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
Remove handling of deferred priority change, and replace by setting the
task priority directly, as required by AI-188.
Update comments.
(Max_Task_Image_Length): New constant.
Replace Warnings (Off) by Unreferenced pragma, cleaner.
(Dynamic_Priority_Support): Removed, no longer needed.
(Poll_Base_Priority_Change): Ditto.
(Set_Ceiling): Add this procedure to change the ceiling priority
associated to a lock. This is a dummy implementation because dynamic
priority ceilings are not supported by the underlying system.
* a-dynpri.adb (Set_Priority): Take into account case where Target is
accepting a RV with its priority boosted.
Remove handling of deferred priority change, and replace by setting the
task priority directly, as required by AI-188.
* s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
Succeeded = True.
Remove handling of deferred priority change, and replace by setting the
task priority directly, as required by AI-188.
(Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
of Self_Id earlier.
* s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
(Poll_Base_Priority_Change): Removed.
Code clean up: use SSL.Current_Target_Exception.
* s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
to run as this is a potentially dispatching point.
(Call_Synchronous): Use Local_Defer_Abort.
(Callable): Relax assertion.
(Selective_Wait): Relax assertion in case abort is not allowed.
Remove handling of deferred priority change, and replace by setting the
task priority directly, as required by AI-188.
* s-tasuti.adb (Make_Passive): Adjust assertions.
Remove handling of deferred priority change, and replace by setting the
task priority directly, as required by AI-188.
From-SVN: r125364
* a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
(Time, Time)): Use To_Relative_Time rather than manual calculation to
express the bounds of Duration as Time. Raise Time_Error when the
result is greater or equal to the higher bound of Duration (on the
margin case).
("+" (Time, Duration)): Reorder code. Remove the declaration of constant
Ada_High_And_Leaps.
("-" (Time, Duration)): Reorder code. Remove the declaration of constant
Ada_High_And_Leaps.
("-" (Time, Time)): Reorder code.
(All_Leap_Seconds): Removed.
(Arithmetic_Operations.Add): Remove sign related kludge.
(Arithmetic_Operations.Difference): Control the leaps seconds processing
with flag Leap_Support.
(Arithmetic_Operations.Subtract): Remove sign related kludge.
(Check_Within_Time_Bounds): New procedure.
(Clock): Control the leap seconds processing with flag Leap_Support.
(Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
(Formatting_Operations.Split): Control the leap seconds processing with
flag Leap_Support.
(Formatting_Operations.Time_Of): Control the leaps seconds processing
with flag Leap_Support. Adjust the year, month and day (if applicable)
when the value of day seconds designates a new day.
(Split): Use parameter associations for better readability. Integrate
flag Is_Ada_05.
(Time_Of): Use parameter associations for better readability. Integrate
flag Is_Ada_05.
* a-calfor.adb (Split): Use parameter associations for better
readability. Integrate flag Is_Ada_05.
(Time_Of): Remove flag Leap_Checks. Use parameter associations for
better readability. Integrate flag Is_Ada_05.
From-SVN: r125363
2007-04-20 Thomas Quinot <quinot@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* a-intnam-aix.ads:
Adjust comment to account for SIGADAABORT change (SIGEMT is now used
instead of SIGTERM on AIX).
* s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
(Time_Slice_Supported): Set to True.
use SIGEMT instead of SIGTERM as SIGADAABORT.
From-SVN: r125362
2007-04-20 Bob Duff <duff@adacore.com>
* g-expect-vms.adb:
(Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
* g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
(Send_Signal, Close): Raise Invalid_Process if the process id is
invalid.
(Pattern_Matcher_Access): Is now a general access type to be able to
use aliased string.
From-SVN: r125361
2007-04-20 Thomas Quinot <quinot@adacore.com>
Bob Duff <duff@adacore.com>
* g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
constant Thread_Blocking_IO, always True by default, set False
on a per-runtime basis.
(Need_Netdb_Buffer): New constant.
* g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
files.
* g-socthi-vxworks.ads, g-socthi-vxworks.adb,
g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
child package Task_Safe_NetDB
(Host_Error_Messages): Add stub body.
(GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
* g-soccon-mingw.ads: Add Windows-specific constants.
(Need_Netdb_Buffer): New constant.
(GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
wrapper and import inet_addr(3) from the standard sockets library
directly instead.
(In_Addr): Add alignment clause.
(GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
From-SVN: r125358
* config/i386/i386.c (enum pta_flags): Move out of struct scope...
(struct pta): ...from here. Change flags to unsigned to avoid excessive
casting (as it is used as a bit mask).
(override_options): Add casts according to the coding convenventions.
(x86_64_elf_unique_section): Likewise.
(examine_argument): Avoid using C++ keywords as variable names.
(construct_container): Likewise.
(legitimize_pic_address): Likewise.
(get_dllimport_decl): Cast according to the coding conventions. Use
type safe memory macros.
(legitimize_address): Cast according to the coding conventions.
(emit_i387_cw_initialization): Corrected the type of slot to enum
ix86_stack_slot.
(ix86_init_machine_status): Use type safe memory macros.
(bdesc_pcmpestr): Use UNKNOWN instead of integer 0.
(bdesc_pcmpistr): Likewise.
(bdesc_crc32): Likewise.
(bdesc_sse_3arg): Likewise.
(bdesc_2arg): Likewise.
(bdesc_1arg): Likewise.
(ix86_expand_sse_pcmpestr): Cast according to the coding conventions.
(ix86_expand_sse_pcmpistr): Likewise.
(ix86_expand_vec_set_builtin): Use EXPAND_NORMAL instead of integer 0.
(ix86_builtin_vectorized_function): Change the type of fn to unsigned
int to match the langhook definition.
(ix86_builtin_conversion): Change the type of code to unsigned init to
match the langhook definition.
(ix86_preferred_reload_class): Avoid using C++ keywords as variable
names.
(ix86_preferred_output_reload_class): Likewise.
(ix86_cannot_change_mode_class): Likewise.
(ix86_memory_move_cost): Likewise.
(ix86_rtx_costs): Cast the outer_code parameter to enum rtx_code to
avoid excessive casting later on.
(x86_output_mi_thunk): Avoid using C++ keywords as variable names.
From-SVN: r125357
* config/i386/sse.md (sse4_2_pcmpestr_cconly): Prefer pcmpestrm
as flags setting insn.
(sse4_2_pcmpistr_cconly): Prefer pcmpistrm as flags setting insn.
* config/i386/i386.md (UNSPEC_ROUNDP, UNSPEC_ROUNDS): Remove.
(UNSPEC_ROUND): New.
("sse4_1_round<mode>2"): New insn pattern.
("rint<mode>2"): Expand using "sse4_1_round<mode>2" pattern for
SSE4.1 targets.
("floor<mode>2"): Rename from floordf2 and floorsf2. Macroize
expander using SSEMODEF mode macro. Expand using
"sse4_1_round<mode>2" pattern for SSE4.1 targets.
("ceil<mode>2"): Rename from ceildf2 and ceilsf2. Macroize
expander using SSEMODEF mode macro. Expand using
"sse4_1_round<mode>2" pattern for SSE4.1 targets.
("btrunc<mode>2"): Rename from btruncdf2 and btruncsf2. Macroize
expander using SSEMODEF mode macro. Expand using
"sse4_1_round<mode>2" pattern for SSE4.1 targets.
* config/i386/sse.md ("sse4_1_roundpd", "sse4_1_roundps"): Use
UNSPEC_ROUND instead of UNSPEC_ROUNDP.
("sse4_1_roundsd", "sse4_1_roundss"): Use UNSPEC_ROUND instead of
UNSPEC_ROUNDS.
From-SVN: r125356
* lambda.h (build_linear_expr): New.
* lambda-code.c (lbv_to_gcc_expression, lle_to_gcc_expression):
Use build_linear_expr, call fold and force_gimple_operand.
(lambda_loopnest_to_gcc_loopnest): Check that there is
something to insert.
* testsuite/gcc.dg/tree-ssa/ltrans-6.c: New.
Co-Authored-By: Sebastian Pop <sebpop@gmail.com>
From-SVN: r125355
2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR testsuite/32057
* gfortran.dg/secnds.f: Update test to avoid roundoff errors and
midnight issues.
From-SVN: r125352
2007-06-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR testsuite/25241
testsuite/
* gcc.dg/invalid-call-1.c: Use dg-warning to match the warning and
dg-message to match de note.
* gcc.dg/pr26570.c: Use dg-message for a note.
* gcc.dg/pr29254.c: Use dg-message for generic output and use
dg-error instead of dg-warning because of -Werror.
* gcc.dg/glibc-uclibc-1.c: Use dg-message for output that is
neither an error, nor a warning.
* gcc.dg/glibc-uclibc-2.c: Likewise
* gcc.dg/cpp/19940712-1.c: Likewise.
From-SVN: r125347
PR tree-optimization/32215
* tree-vectorizer.c (supportable_widening_operation): Return false
for unsupported FIX_TRUNC_EXPR tree code.
(supportable_narrowing_operation): Ditto for FLOAT_EXPR tree code.
From-SVN: r125343
2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/18923
* parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
for ST_FUNCTION since it is called in reject_statement.
(parse_contained): If error, loop back after reject_statement and try
again. Free the namespace if an error occured.
From-SVN: r125342
* config/rs6000/rs6000.h (FIXED_SCRATCH): Use r0 as a scratch
register on SPE targets. Change documentation to reflect
reality.
* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
Change FIXED_SCRATCH to 14 and document why we're keeping r14
out of the register allocation pool.
(rs6000_reg_live_or_pic_offset_p): New function.
(rs6000_emit_prologue): Move the actual saving of LR up to free
r0 for holding r11. Split saving of SPE 64-bit registers into
its own case. Ensure that offsets will always be in-range for
'evstdd' by using r11 as a scratch register to point at the start
of the SPE save area. Save r11 if necessary, as it is the static
chain register.
(rs6000_emit_epilogue): Split restoring of SPE 64-bit registers
into its own case. Ensure that offsets will always be in-range
for 'evldd' by using r11 as a scratch register to point at the
start of the SPE save area. Also adjust r11 when restoring
the stack pointer to compensate for pre-loading r11.
From-SVN: r125340
./: * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a
PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p.
(extract_range_from_assert): Set TREE_NO_WARNING when creating an
expression.
(test_for_singularity): Likewise.
testsuite/:
* gcc.dg/Wstrict-overflow-19.c: New test.
From-SVN: r125334
* config/i386/predicates/md (reg_not_xmm0_operand): New predicate.
(nonimm_not_xmm0_operand): Ditto.
* config/i386/sse.md ("sse4_1_blendvpd"): Use "reg_not_xmm0_operand"
as operand[0] and operand[1] predicate. Use "nonimm_not_xmm0_operand"
as operand[2] predicate. Require "z" class XMM register for
operand[3]. Adjust asm template.
("sse4_1_blendvpd"): Ditto.
("sse4_1_pblendvb"): Ditto.
* config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Do not
force op2 into xmm0 register for variable blend instructions.
From-SVN: r125327
./: * tree-vrp.c (adjust_range_with_scev): When loop is not expected
to overflow, reduce overflow infinity to regular infinity.
(vrp_var_may_overflow): New static function.
(vrp_visit_phi_node): Check vrp_var_may_overflow.
testsuite/:
* gcc.dg/Wstrict-overflow-18.c: New test.
From-SVN: r125319
2007-06-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR testsuite/25241
testsuite/
* gcc.dg/cpp/mi1.c: Use dg-message for output that is not an error.
* gcc.dg/cpp/mi5.c: Likewise.
* gcc.dg/cpp/mi7.c: Likewise.
From-SVN: r125317
2007-06-04 Lee Millward <lee.millward@codesourcery.com>
* trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
to operate on a stack allocated array for the intrinsic arguments
instead of creating a TREE_LIST. Add two new parameters for the
array and the number of elements. Update all callers to allocate
an array of the correct length to pass in. Update comment.
(gfc_intrinsic_argument_list_length): New function.
(gfc_conv_intrinsic_mnimax): Call it.
(gfc_conv_intrinsic_merge): Likewise.
(gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
constructors.
(gfc_conv_intrinsic_cmplx): Likewise.
(gfc_conv_intrinsic_ctime): Likewise.
(gfc_covn_intrinsic_fdate): Likewise.
(gfc_conv_intrinsic_ttynam): Likewise.
(gfc_conv_intrinsic_ishftc): Likewise.
(gfc_conv_intrinsic_index): Likewise.
(gfc_conv_intrinsic_scan): Likewise.
(gfc_conv_intrinsic_verify): Likewise.
(gfc_conv_intrinsic_trim): Likewise.
(gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
(gfc_conv_intrinsic_exponent): Likewise.
(gfc_conv_intrinsic_bound): Likewise.
(gfc_conv_intrinsic_abs): Likewise.
(gfc_conv_intrinsic_mod): Likewise.
(gfc_conv_intrinsic_sign): Likewise.
(gfc_conv_intrinsic_len): Likewise.
(gfc_conv_intrinsic_adjust): Likewise.
(gfc_conv_intrinsic_si_kind): Likewise.
From-SVN: r125316