PR rtl-optimization/14782
* pa.c (emit_move_sequence): Use SFmode for 4-byte modes when doing
the address checks for secondary reloads for loads from and stores
to floating-point registers.
* pa.h (EXTRA_CONSTRAINT, case T): Use SFmode for 4-byte modes
in the address check. Move work around for ELF32 targets to
GO_IF_LEGITIMATE_ADDRESS.
(GO_IF_LEGITIMATE_ADDRESS): Require constant offsets to be
correctly aligned for DImode loads and stores. Don't allow long
SFmode displacements on ELF32.
From-SVN: r83464
PR rtl-opt/16114
* cse.c (merge_equiv_classes): Also rehash in response to
delete_reg_equiv changes.
(rehash_using_reg): Don't exclude REGs from rehashing.
From-SVN: r83463
* gfortran.fortran-torture/execute/select_1.f90: Rename function
to fix type error.
* gfortran.fortran-torture/execute/intrinsic_associated.f90:
Remove trailing spaces.
From-SVN: r83459
2004-06-21 Daniel Berlin <dberlin@dberlin.org>
Fix PR optimization/15982
* tree-ssa-pre.c: Update a few comments and todos to
reflect constants change.
(get_value_handle): Constants now value number to themselves.
(lookup): Constants lookup to themselves.
(add_to_value): Adjust to always be on.
(set_contains_value): Adjust for constants change.
(find_leader): Ditto.
(phi_translate): 'r' nodes are never ANTIC right now.
(valid_in_set): Ditto.
(get_expr_set): New function.
(find_or_generate_expression): New function, broken out from
insert_aux.
(create_expression_by_pieces): Ditto, plus additional
machinery to handle complex values.
(compute_avail): Remove dead RETURN_EXPR handling.
From-SVN: r83453
* resolve.c (resolve_symbol): Add comment in function body.
(check_data_variable): Change type of mark to ar_type, adapt code
accordingly.
From-SVN: r83443
2004-06-21 Andrew Haley <aph@redhat.com>
* java/io/ObjectOutputStream.java: Add DEBUG statements
everywhere.
(dumpElementln): New method.
(depth): New field.
* java/io/ObjectInputStream.java
(currentClassLoader): Make native.
(callersClassLoader): New field.
(depth): New field.
(readObject): ENDBLOCKDATA is generated if the class has a write
method, not if it has a read method.
(readObject): Save and restore this.currentObject and
this.currentObjectStreamClass around calls to callReadMethod().
* java/io/natObjectInputStream.cc (getCallersClassLoader): New
method.
From-SVN: r83440
* fold-const.c (operand_equal_p): Pass flags in recursive calls for
binary and relational operations. Add support for TRUTH_ANDIF_EXPR,
TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR.
* tree.c (commutative_tree_code): Also list UNORDERED_EXPR,
ORDERED_EXPR, UNEQ_EXPR, LTGT_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR
and TRUTH_XOR_EXPR.
From-SVN: r83433
2004-06-21 Paolo Bonzini <bonzini@gnu.org>
* fold-const.c (fold_cond_expr_with_comparison):
New function, extracted from fold.
(fold): Extract code to fold A op B ? A : C, use
it to fold A op B ? C : A. Really optimize
A & N ? N : 0 where N is a power of two. Avoid
relying on canonicalization and recursion for
foldings of COND_EXPR to happen.
From-SVN: r83428
2004-06-20 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/16089
* builtins.c (entry_of_function): Move to ...
* cfgrtl.c (entry_of_function): Here and make non-static.
* integrate.c (emit_initial_value_sets): Use entry_of_function.
* rtl.h (entry_of_function): Prototype.
From-SVN: r83415
* config/i386/i386.c (pentium4_cost): Increase "lea" cost from 1 to 3.
(ix86_rtx_costs) <ASHIFT, PLUS>: Consider ix86_cost->lea even when
TARGET_DECOMPOSE_LEA.
From-SVN: r83413
* decl.c (elaborate_expression, elaborate_expression_1): Arguments
now bool instead of int.
(gnat_to_gnu_entity, elaborate_expression_1): New arg to COMPONENT_REF.
* trans.c (gnu_switch_label_stack): New function.
(gnat_to_gnu, N_Object_Renaming_Declaration): Result is what the
elaboration of renamed entity returns.
(gnat_to_gnu, case N_Case_Statement): Add branches to end label.
(add_decl_stmt): Don't add TYPE_DECL for UNCONSTRAINED_ARRAY_TYPE.
(gnat_gimplify_stmt): Use alloc_stmt_list, not build_empty_stmt.
(gnat_gimplify_stmt, case DECL_STMT): gimplify DECL_SIZE and
DECL_SIZE_UNIT and simplify variable-sized case.
(gnat_gimplify_type_sizes, gnat_gimplify_one_sizepos): Deleted.
Callers changes to call gimplify_type_sizes and gimplify_one_sizepos.
(gnat_stabilize_reference): Add arg to COMPONENT_REF.
(build_unit_elab): Disable for now.
* utils.c (mark_visited): New function.
(pushdecl): Walk tree to call it for global decl.
(update_pointer_to): Update all variants of pointer and ref types.
Add arg to COMPONENT_REF.
(convert): Likewise.
Move check for converting between variants lower down.
* utils2.c (build_simple_component_ref): Add arg to COMPONENT_REF.
(build_allocator): Don't force type of MODIFY_EXPR.
(gnat_mark_addressable, case VAR_DECL): Unconditionally call
put_var_into_stack.
From-SVN: r83410
2004-06-20 Andreas Tobler <a.tobler@schweiz.ch>
* Makefile.am: Add rule for .S files to fix bootstrap on
solaris and alpha.
* Makefile.in: Regenerate.
From-SVN: r83406
* c-common.h (has_c_linkage): New interface.
* c-cppbuiltin.c: Include target.h.
(c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and
__PRAGMA_EXTERN_PREFIX when appropriate.
* c-pragma.c: Include target.h.
Document clarified semantics of symbol-renaming #pragmas.
(handle_pragma_redefine_extname, handle_pragma_extern_prefix)
(maybe_apply_renaming_pragma): Rewrite according to clarified
semantics. Always recognize, but do not necessarily execute.
(init_pragma): Unconditionally register symbol-renaming pragmas.
* system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME
and HANDLE_PRAGMA_EXTERN_PREFIX.
* target.h (struct gcc_target): Add handle_pragma_redefine_extname
and handle_pragma_extern_prefix flags.
* target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME
and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX.
* Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies.
* config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME,
not HANDLE_PRAGMA_REDEFINE_EXTNAME.
(TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME.
(TRANSFER_FROM_TRAMPOLINE): Prototype mprotect.
* config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX,
not HANDLE_PRAGMA_EXTERN_PREFIX.
(TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX.
* doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine
into one section "Symbol-Renaming Pragmas"; clarify; document
adjusted semantics.
* builtins.c (expand_builtin): Do not issue error for a builtin
with no special case code and no DECL_ASSEMBLER_NAME; just do the
library call.
* c-decl.c (builtin_function): Don't call make_decl_rtl.
* c-objc-common.c (has_c_linkage): Stub implementation.
* cgraphunit.c (cgraph_expand_function)
(cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS.
cp:
* cp-lang.c (has_c_linkage): Implement.
* cp-tree.h (set_mangled_name_for_decl): Don't prototype.
* decl.c (duplicate_decls): Use COPY_DECL_RTL.
(builtin_function_1): Don't call make_decl_rtl.
(build_cp_library_fn): Don't call set_mangled_name_for_decl.
(grokvardecl): Don't call mangle_decl.
* except.c (nothrow_libfn_p): Look at DECL_NAME, not
DECL_ASSEMBLER_NAME.
* method.c (set_mangled_name_for_decl): Delete.
* name-lookup.c (pushdecl): When a local extern shadows a
file-scope declaration of the same object, give both DECLs the
same DECL_UID.
* typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
on DECL_ASSEMBLER_NAME.
testsuite:
* g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with
extern "C".
* g++.dg/other/pragma-re-1.C: Add comments.
From-SVN: r83405
* builtins.c (fold_builtin_unordered_cmp): Take an EXP argument
instead of both an ARGLIST and a result TYPE. Handle these C99
comparison functions as "polymorphic" builtins. Also handle
lowering of BUILT_IN_ISUNORDERED to an UNORDERED_EXPR tree node.
(fold_builtin_1): Update calls to fold_builtin_unordered_cmp.
Move handling of BUILT_IN_ISUNORDERED from here to there.
From-SVN: r83404
PR target/15941
* function.c (assign_parms): If not padding upward or intentionally
forcing upward padding, take offset_rtx into account when determining
the alignment for stack_parm.
From-SVN: r83396