* fold-const.c (fold_strip_sign_ops): New function to simplify a
floating point expression ignoring the sign of the result.
(fold) <ABS_EXPR>: Use it to simplify fabs(x).
(fold) <MULT_EXPR>: Use it to simplify x*x.
* tree.h (fold_strip_sign_ops): Prototype here.
* builtins.c (fold_builtin_copysign): Take an additional FNDECL
argument. Use fold_strip_sign_ops to simplify the first argument.
(fold_builtin_pow): Use fold_strip_sign_ops to simplify the
first argument when the second argument is an even integer
constant, but only with -funsafe_math_optimizations.
(fold_builtin_1): Update call to fold_builtin_copysign.
* gcc.dg/builtins-48.c: New test case.
* gcc.dg/builtins-49.c: New test case.
* gcc.dg/builtins-50.c: New test case.
* gcc.dg/builtins-51.c: New test case.
From-SVN: r94779
* allchblk.c (GC_allochblk_nth): Dont overlook available space if
GC disabled, correctly convert GC_finalizer_mem_freed to byte,
total_size to words.
* dyn_load.c (win32 GC_register_dynamic_libraries): Consider only
MEM_IMAGE regions.
* mach_dep.c (GC_with_callee_saves_pushed): separate into new function,
and indent appropriately.
* mark_rts.c (GC_approx_sp): Access stack.
* pthread_stop_world.c: (GC_suspend_handler): Explicitly push
callee-saves registers when appropriate.
(GC_stop_world): Handle EINTR from sem_wait (sync with Mono GC).
From-SVN: r94776
2005-02-09 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc/haifa-sched.c (schedule_block): Make queued sched group
insns return to ready list in the next turn.
From-SVN: r94775
2005-02-09 Richard Guenther <rguenth@gcc.gnu.org>
* fold-const.c (try_move_mult_to_index): Remove redundant
type argument. Create ADDR_EXPR with correct type.
(fold): Update callers of try_move_mult_to_index. Convert
result to the appropriate type.
* g++.dg/tree-ssa/tmmti.C: New testcase.
From-SVN: r94767
* java/net/URI.java (AUTHORITY_REGEXP): Handle case where user
name or port is missing.
(AUTHORITY_USERINFO_GROUP, AUTHORITY_HOST_GROUP,
AUTHORITY_PORT_GROUP): Updated.
From-SVN: r94760
PR c++/19733
* class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
(check_bases): Give warnings about a base class with a
non-virtual destructor, even if it is implicit.
(finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
(maybe_warn_about_overly_private_class): Don't use
TYPE_HAS_DESTRUCTOR.
(finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
(check_for_override): Give it external linkage.
(add_implicitly_declared_members): Generate destructors lazily.
(check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
TYPE_HAS_DESTRUCTOR.
(check_bases_and_members): Call check_methods before
check_field_decls.
(check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
TYPE_HAS_DESTRUCTOR.
(finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
* cp-tree.def (PSEUDO_DTOR_EXPR): Document.
* cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
(lang_type_class): Add lazy_destructor.
(CLASSTYPE_LAZY_DESTRUCTOR): New macro.
(CLASSTYPE_DESTRUCTORS): Robustify.
(TYPE_HAS_DESTRUCTOR): Remove.
(check_for_override): Declare.
(build_vbase_delete): Remove.
* cvt.c (convert_to_void): Issue errors about pseudo-destructor
expressions.
* decl.c (cxx_maybe_build_cleanup): Remove dead code.
* except.c (dtor_nothrow): Lazily create destructors if necessary.
(build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
* init.c (build_delete): Lazily create destructors, if necessary.
(build_vbase_delete): Remove.
* method.c (locate_dtor): Simplify.
(implicitly_declare_fn): Add support for destructors.
* parser.c (cp_parser_lookup_name): Lazily create destructors, if
necessary.
* pt.c (check_explicit_specialization): Don't use
TYPE_HAS_DESTRUCTOR.
(instantiate_class_template): Likewise.
* ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
* rtti.c (emit_support_tinfos): Robustify.
* search.c (lookup_fnfields_1): Lazily create destructors.
* typeck.c (build_class_member_access_expr): Remove
PSEUDO_DTOR_EXPR handling.
(lookup_destructor): Likewise.
PR c++/19733
* g++.dg/parse/crash23.C: New test.
* g++.dg/warn/Weff1.C: New test.
From-SVN: r94759
* files.c (pchf_adder): Remove.
(struct pchf_adder_info): Likewise.
(_cpp_save_file_entries): Write out all files so that #import works.
From-SVN: r94755
2005-02-08 Marcin Dalecki <martin@dalecki.de>
* expr.c (add_type_assertion): Use the proper enumeration type,
since this is what htab_find_slot() is expecting.
From-SVN: r94743
PR target/19806
* config/cris/cris.c (in_code): New variable.
(cris_output_addr_const): Now a static function, a wrapper for
output_addr_const.
(cris_asm_output_symbol_ref): New function, broken out SYMBOL_REF
case from old cris_output_addr_const.
(cris_asm_output_label_ref): Similar for LABEL_REF.
(cris_output_addr_const_extra): Similar for UNSPEC.
* config/cris/cris.h (OUTPUT_ADDR_CONST_EXTRA)
(ASM_OUTPUT_SYMBOL_REF, ASM_OUTPUT_LABEL_REF): Define.
* config/cris/cris-protos.h (cris_output_addr_const): Remove
declaration.
(cris_asm_output_symbol_ref, cris_output_addr_const_extra)
(cris_asm_output_label_ref): Declare.
From-SVN: r94738
2005-02-08 Paolo Bonzini <bonzini@gnu.org>
PR preprocessor/19801
* doc/cppinternals.texi (Conventions, Lexer, Files): Adjust
filenames that changed when libcpp was moved to the toplevel.
From-SVN: r94737
fortran/
* expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
EXPR_SUBSTRING.
(gfc_is_constant_expr): Check 'ref' to determine if substring
reference is constant.
(gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
(check_init_expr, check_restricted): Check 'ref' instead of 'op1'
and 'op2'.
* module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
testsuite/
* gfortran.dg/substr_1.f90: New test.
From-SVN: r94735
* simplify-rtx.c (simplify_relational_operation_1): Avoid creating
zero extensions of BImode operands. Call lowpart_subreg instead
of gen_lowpart_common and gen_lowpart_SUBREG.
From-SVN: r94730
* testsuite/27_io/basic_istream/getline/wchar_t/5.cc: Make buf static.
* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc: Make ref and
src static.
From-SVN: r94719
2005-02-07 Mark Wielaard <mark@klomp.org>
Reported by Timo Lindfors <timo.lindfors@iki.fi>
java/util/regex/Matcher.java (lookingAt): Set position when match
found.
(matches): Implemented through lookingAt().
2005-02-07 Mark Wielaard <mark@klomp.org>
Fix suggested by Timo Lindfors <timo.lindfors@iki.fi>
* java/util/regex/Pattern.java (split(CharSequence,int)):
Fix while empties > 0 loops.
From-SVN: r94713
2005-02-07 Jonathan Wakely <redi@gcc.gnu.org>
* doc/extend.texi: Document deprecated extensions allowing
static floating-point members to have initializers and allowing
floating-point literals in integral constant expressions.
From-SVN: r94706
2005-02-07 Richard Guenther <rguenth@gcc.gnu.org>
PR middle-end/19775
* builtins.c (fold_builtin_sqrt): Transform
sqrt(pow(x,y)) to pow(fabs(x),y*0.5), not
pow(x,y*0.5).
* gcc.dg/torture/builtin-power-1.c: Disable test for
invalid transformation.
* gcc.dg/builtins-10.c: Likewise. Disable one test we
no longer optimize.
* gcc.dg/builtins-47.c: New testcase.
From-SVN: r94701
PR bootstrap/19796
Revert:
2005-01-26 Richard Sandiford <rsandifo@redhat.com>
* config/mips/iris6.h (ENDFILE_SPEC): Don't link in irix-csr.o if
either -ffast-math or -funsafe-math-optimizations is in use.
2005-01-24 Richard Sandiford <rsandifo@redhat.com>
* config/mips/irix-csr.c: New file.
* config/mips/t-iris6 (irix-csr.o): New rule to build it.
(EXTRA_MULTILIB_PARTS): Add irix-csr.o.
* config/mips/iris6.h (ENDFILE_SPEC): Include it in n32 and n64
executables.
From-SVN: r94696