* c-cppbuiltin.c (c_cpp_builtins): Do not define __GXX_WEAK__ to 1
if !flag_weak.
* doc/cpp.texi (__DEPRECATED): Document.
(__EXCEPTIONS): Likewise.
(__GXX_WEAK__): Likewise.
* g++.dg/cpp/weak.C: New test.
From-SVN: r99080
* function.c (INVOKE__main): Do not define.
(expand_main_function): Check HAS_INIT_SECTION when determining
whether or not to call __main.
From-SVN: r99076
* doc/install.texi (Specific): Omit dots in the @anchors names
for i?86-*-sco3.2v5*, i?86-*-solaris2.10, and sparc-sun-solaris2.7.
Omit underscores for x86_64-*-* and the "all ELF targets" entry.
From-SVN: r99067
PR tree-optimization/18316
PR tree-optimization/19126
* tree.c (build_int_cst_type): Avoid shift by size of type.
* tree-scalar-evolution.c (simple_iv): Add allow_nonconstant_step
argument.
* tree-scalar-evolution.h (simple_iv): Declaration changed.
* tree-ssa-loop-ivopts.c (struct iv_cand): Add depends_on
field.
(dump_cand): Dump depends_on information.
(determine_biv_step): Add argument to simple_iv call.
(contains_abnormal_ssa_name_p): Handle case expr == NULL.
(find_bivs, find_givs_in_stmt_scev): Do not require step to be a
constant.
(add_candidate_1): Record depends_on for candidates.
(tree_int_cst_sign_bit, constant_multiple_of): New functions.
(get_computation_at, get_computation_cost_at, may_eliminate_iv):
Handle ivs with nonconstant step.
(iv_ca_set_remove_invariants, iv_ca_set_add_invariants): New functions.
(iv_ca_set_no_cp, iv_ca_set_cp): Handle cand->depends_on.
(create_new_iv): Unshare the step before passing it to create_iv.
(free_loop_data): Free cand->depends_on.
(build_addr_strip_iref): New function.
(find_interesting_uses_address): Use build_addr_strip_iref.
(strip_offset_1): Split the recursive part from strip_offset.
Strip constant offset component_refs and array_refs.
(strip_offset): Split the recursive part to strip_offset_1.
(add_address_candidates): Removed.
(add_derived_ivs_candidates): Do not use add_address_candidates.
(add_iv_value_candidates): Add candidates with stripped constant
offset. Consider all candidates with initial value 0 important.
(struct affine_tree_combination): New.
(aff_combination_const, aff_combination_elt, aff_combination_scale,
aff_combination_add_elt, aff_combination_add,
tree_to_aff_combination, add_elt_to_tree, aff_combination_to_tree,
fold_affine_sum): New functions.
(get_computation_at): Use fold_affine_sum.
* tree-ssa-loop-manip.c (create_iv): Handle ivs with nonconstant step.
* tree-ssa-loop-niter.c (number_of_iterations_exit): Add argument
to simple_iv call.
* gcc.dg/tree-ssa/loop-8.c: New test.
From-SVN: r99059
2005-04-30 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18958
libgfortran.h: Change typedef of index_type from size_t
to ssize_t.
2005-04-30 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18958
* gfortran.dg/eoshift.f90: New test case.
From-SVN: r99047
2005-04-30 Paul Brook <paul@codesourcery.com>
* config/arm/bpabi.h (RENAME_LIBRARY_SET): Always use .thumb_set in
thumb mode.
* config/arm/ieee754-df.S: Use __INTERWORKING_STUBS__.
* config/arm/ieee754-sf.S: Ditto.
* config/arm/lib1funcs.asm: Define and use __INTERWORKING_STUBS__.
(FUNC_ALIAS): Use .thumb_set for thumb routines.
From-SVN: r99043
2005-04-29 Paolo Carlini <pcarlini@suse.de>
Nathan Myers <ncm@cantrip.org>
PR libstdc++/21286
* include/bits/fstream.tcc (basic_filebuf<>::xsgetn):
Loop on short reads; remove the work-around for
libstdc++/20806, not needed anymore.
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r99033
2005-04-27 Andrew Haley <aph@redhat.com>
PR java/19285
* prims.cc (_Jv_ResolvePoolEntry): New function.
* include/jvm.h (_Jv_Linker::find_field): New arg: found_class.
* link.cc (_Jv_Linker::find_field): New arg: found_class.
(resolve_pool_entry): Initialize the class in which a field is
found.
(link_symbol_table): Pass new arg to found_class.
From-SVN: r99006
gcc/
PR tree-optimization/21030
* tree-vrp.c (adjust_range_with_scev): Do not create invalid
ranges where VR->MAX is smaller than VR->MIN.
testsuite/
PR tree-optimization/21030
* gcc.dg/tree-ssa/pr21030.c: New.
From-SVN: r98999
2005-04-29 Jakub Jelinek <jakub@redhat.com>
PR fortran/13082
PR fortran/18824
* trans-expr.c (gfc_conv_variable): Handle return values in functions
with alternate entry points.
* resolve.c (resolve_entries): Remove unnecessary string termination
after snprintf. Set result of entry master.
If all entries have the same type, set entry master's type
to that common type, otherwise set mixed_entry_master attribute.
* trans-types.c (gfc_get_mixed_entry_union): New function.
(gfc_get_function_type): Use it for mixed_entry_master functions.
* gfortran.h (symbol_attribute): Add mixed_entry_master bit.
* decl.c (gfc_match_entry): Set entry->result properly for
function ENTRY.
* trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
__entry argument.
(build_entry_thunks): Handle return values in entry thunks.
Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
shared between multiple contexts.
(gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
current_function_decl instead of sym->backend_decl. Skip over
entry master's entry id argument. For mixed_entry_master entries or
their results, return a COMPONENT_REF of the fake result.
(gfc_trans_deferred_vars): Don't warn about missing return value if
at least one entry point uses RESULT.
(gfc_generate_function_code): For entry master returning
CHARACTER, copy ts.cl->backend_decl to all entry result syms.
* trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
values optional just because they are in entry master.
* gfortran.dg/entry_4.f90: New test.
* gfortran.fortran-torture/execute/entry_1.f90: New test.
* gfortran.fortran-torture/execute/entry_2.f90: New test.
* gfortran.fortran-torture/execute/entry_3.f90: New test.
* gfortran.fortran-torture/execute/entry_4.f90: New test.
* gfortran.fortran-torture/execute/entry_5.f90: New test.
* gfortran.fortran-torture/execute/entry_6.f90: New test.
* gfortran.fortran-torture/execute/entry_7.f90: New test.
2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.fortran-torture/execute/entry_8.f90: New test.
From-SVN: r98993
* configure.ac: Check for ftruncate and chsize.
* io/unix.c (fd_truncate): Provide chsize as alternative to
ftruncate.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r98989
* config/arm/arm.h (ARM_EABI_CTORS_SECTION_OP): Do not define if a
definition has already been provided.
(ARM_EABI_DTORS_SECTION_OP): Likewise.
* config/arm/symbian.h (ARM_EABI_CTORS_SECTION_OP): Define.
(ARM_EABI_DTORS_SECTION_OP): Likewise.
From-SVN: r98988
* crtstuff.c: Handle targets that use .init_array.
* function.c (HAS_INIT_SECTION): Do not define. Instead, make sure
that INVOKE__main is set correctly.
(expand_main_function): Test INVOKE__main.
* libgcc2.c: Do not define __main when using .init_array.
* config/arm/arm.c (arm_elf_asm_constructor): New function.
* config/arm/arm.h (CTORS_SECTION_ASM_OP): Define, with specialized
libgcc version.
(DTORS_SECTION_ASM_OP): Likewise.
(CTOR_LIST_BEGIN): Define specially when in libgcc.
(CTOR_LIST_END): Likewise.
(DTOR_LIST_BEGIN): Likewise.
(DTOR_LIST_END): Likewise.
* config/arm/bpapi.h (INIT_SECTION_ASM_OP): Do not define it.
(FINI_SECTION_ASM_OP): Likewise.
(INIT_ARRAY_SECTION_ASM_OP): Define.
(FINI_ARRAY_SECTION_ASM_OP): Likewise.
* config/arm/elf.h (TARGET_ASM_CONSTRUCTOR): Define.
(SUPPORTS_INIT_PRIORITY): Evaluate to false for EABI based targets.
* doc/tm.texi (INIT_ARRAY_SECTION_ASM_OP): Document.
(FINI_ARRAY_SECTION_ASM_OP): Likewise.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r98986