* stmt.c (force_label_rtx): New function, based on logic
formerly found in expand_expr.
* expr.h: Prototype it.
* expr.c (expand_expr <LABEL_DECL>): Use force_label_rtx if
appropriate.
* varasm.c (decode_addr_const <LABEL_DECL>): Use force_label_rtx.
* print-tree.c (debug_tree): Free the table after we're done
with it. Use putc.
treelang:
* Make-lang.in: Set -Wno-error for treelang/lex.o.
From-SVN: r66579
2003-05-07 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_fstream.h (_M_is_indeterminate): Remove.
* src/fstream.cc
(basic_filebuf<char/wchar_t>::_M_underflow): Simplify: either
there is no buffer or __testget == !__testinit.
* src/fstream.cc
(basic_filebuf<char/wchar_t>::_M_underflow): _M_set_determinate()
automatically sets, if appropriate, _M_out_cur == _M_in_cur.
* include/std/std_fstream.h (_M_destroy_pback): Don't set
unnecessarily _M_pback_cur_save and _M_pback_end_save.
* include/std/std_fstream.h (_M_set_determinate): Minor tweak.
* include/std/std_sstream.h (_M_sync): Minor tweak.
* include/bits/fstream.tcc (close): No need to call
_M_destroy_pback, setting _M_pback_init to false suffices
to clean up.
From-SVN: r66557
* unwind-dw2.c (uw_update_context_1): Only set cfa as sp if
previous frame didn't save sp. Clear sp for next frame.
(uw_install_context_1): Honor saved sp from frame.
From-SVN: r66526
* config/mips/mips-protos.h (mips_subword, mips_output_move): Declare.
(mips_move_1word, mips_move_2words): Remove declaration.
(mips_split_64bit_move_p, mips_split_64bit_move): Declare.
(mips_restore_gp): Remove insn argument.
* config/mips/mips.h (FP_REG_RTX_P): New macro.
* config/mips/mips.c (volatile_buffer): Remove.
(mips_subword, mips_split_64bit_move_p, mips_split_64bit_move): New.
(mips_move_1word, mips_move_2words): Remove, replacing with...
(mips_output_move): ...this new function.
(mips_restore_gp): Remove insn argument. Adjust for above changes.
(print_operand): Make '%h' print %hi(op) for HIGH operands. Remove
handling of floating-point constants. Handle zero CONST_DOUBLE
arguments.
(mips_annotate_frame_insn): Replace with...
(mips_set_frame_expr): ...this, which just takes one argument.
(mips_frame_set): Change the register argument to an rtx.
(mips_emit_frame_related_store): Use mips_split_64bit_move_p to
check whether moves should be split. Use mips_split_64bit_move
to split them. Use mips_subword to generate the high and low
parts of a paired FPR. Adjust calls to frame_set and
mips_set_frame_expr.
(mips_expand_prologue): Simplify due to above changes.
* config/mips/mips.md: Add splitters for 64-bit moves on 32-bit
targets, replacing xisting register-only versions.
(UNSPEC_STORE_DF_HIGH): New unspec.
(UNSPEC_LOAD_DF_LOW, UNSPEC_LOAD_DF_HIGH): New unspecs.
(mulsi3_r4000, muldi3_internal2): Avoid use of mips_move_1word.
(*paradoxical_extendhidi2): Remove.
(movdi_internal, movdi_internal2): Use mips_output_move.
(*movdi_internal2_mips16, movsi_internal, movcc): Likewise.
(movsf_internal1, movsf_internal2): Likewise.
(movdf_internal1a): Likewise. Fix length and type of f <- G case.
(movdf_internal1b): Use mips_output_move. Fix type of f <- G case.
(movdf_internal2): Use mips_output_move. Fix lengths of FPR moves.
Add m <- G alternative.
(load_df_low, load_df_high, store_df_low): New patterns.
(movhi_internal): Use @ template instead of calling a function.
Remove unnecessary 'z' alternatives.
(movqi_internal): Likewise.
(exception_receiver): Update call to mips_restore_gp.
From-SVN: r66521
* real.c (real_powi): New function to calculate the value of
a real raised to an integer power, i.e. pow(x,n) for int n.
(real_sqrt): Convert to using the faster do_add, do_multiply
and do_divide API for consistency with the rest of real.c.
* real.h (real_powi): Prototype here.
* builtins.c (fold_builtin): Avoid local variable mode when
evaluating sqrt at compile time. Attempt to evaluate pow at
compile-time, by checking for an integral exponent.
* gcc.dg/builtins-14.c: New test case.
From-SVN: r66515
2003-05-05 Janis Johnson <janis187@us.ibm.com>
* gcc.dg/compat/struct-by-value-1_main.c: New test file.
* gcc.dg/compat/struct-by-value-1_x.c: New test file.
* gcc.dg/compat/struct-by-value-1_y.c: New test file.
* gcc.dg/compat/struct-by-value-2_main.c: New test file.
* gcc.dg/compat/struct-by-value-2_x.c: New test file.
* gcc.dg/compat/struct-by-value-2_y.c: New test file.
* gcc.dg/compat/struct-by-value-3_main.c: New test file.
* gcc.dg/compat/struct-by-value-3_x.c: New test file.
* gcc.dg/compat/struct-by-value-3_y.c: New test file.
* gcc.dg/compat/struct-by-value-4_main.c: New test file.
* gcc.dg/compat/struct-by-value-4_x.c: New test file.
* gcc.dg/compat/struct-by-value-4_y.c: New test file.
* gcc.dg/compat/struct-by-value-5_main.c: New test file.
* gcc.dg/compat/struct-by-value-5_x.c: New test file.
* gcc.dg/compat/struct-by-value-5_y.c: New test file.
From-SVN: r66509
2003-05-05 David O'Brien <obrien@FreeBSD.org>
* config/rs6000/sysv4.h (CPP_OS_FREEBSD_SPEC): Add __ELF__ to mirror
other FreeBSD ports.
(LINK_OS_FREEBSD_SPEC): Mirror conventions on other FreeBSD ports.
From-SVN: r66508
* include/bits/stl_threads.h (_Atomic_swap): Kill it...
(_Swap_lock_struct<>): ...and the horse it rode in on.
* src/globals.cc (_Swap_lock_struct<>): Likewise.
* include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): New
member to support...
* include/ext/ropeimpl.h (rope<>::c_str): Follow *all* memory
visibility rules related to POSIX threads.
* testsuite/thread/pthread7-rope.cc: New test.
From-SVN: r66507
2003-05-05 Janis Johnson <janis187@us.ibm.com>
* Makefile.in: (site.exp): Add ALT_CC_UNDER_TEST, add quotes around
expanded variables.
* doc/sourcebuild.texi (C tests): Describe gcc.dg/compat tests.
testsuite:
* lib/compat.exp (compat-execute): New argument.
* g++.dg/compat/compat.exp: Pass new argument to compat-execute.
* gcc.dg/compat: New test directory.
* gcc.dg/compat/compat.exp: New expect script.
* gcc.dg/compat/scalar-by-value-1_main.c: New test file.
* gcc.dg/compat/scalar-by-value-1_x.c: New test file.
* gcc.dg/compat/scalar-by-value-1_y.c: New test file.
* gcc.dg/compat/scalar-by-value-2_main.c: New test file.
* gcc.dg/compat/scalar-by-value-2_x.c: New test file.
* gcc.dg/compat/scalar-by-value-2_y.c: New test file.
From-SVN: r66506
* rtl.h (STRING_POOL_ADDRESS_P): Rename to DEFERRED_CONSTANT_P.
* varasm.c (struct varasm_status): Add deferred_constants field.
(n_deferred_strings): Delete variable.
(n_deferred_constants): New #define.
(struct constant_descriptor_tree): Kill next and label fields.
(const_hash_table, MAX_HASH_TABLE): Delete.
(const_desc_htab): New static variable.
(const_hash): Rename const_desc_hash, and make it fit the
hashtab.h interface.
(const_desc_eq): New.
(const_hash_1, compare_constant): Const-ify arguments.
(build_constant_desc): Set DEFERRED_CONSTANT_P on all new
SYMBOL_REFs. Clarify comments. Don't set desc->label.
(output_constant_def): Do the lookup/insert using the
hashtab.h interface. Don't muck with n_deferred_constants or
DEFERRED_CONSTANT_P here.
Always call maybe_output_constant_def_contents.
(maybe_output_constant_def_contents): Take a pointer to the
descriptor, not the EXP and RTL separately. Return
immediately if this constant is not deferred. Defer output of
everything, except writable string constants. Update
n_deferred_constants here.
(output_constant_def_contents): Now takes just one argument,
an rtx. Clear DEFERRED_CONSTANT_P here.
(mark_constant_pool): Update for rename of n_deferred_strings.
(mark_constant): Don't clear DEFERRED_CONSTANT_P here.
(init_varasm_status): Clear p->deferred_constants.
(init_varasm_once): Call htab_create_ggc for const_desc_htab.
* gcc.dg/const-elim-1.c, gcc.dg/const-elim-2.c: New testcases.
From-SVN: r66505
PR c++/9537
* call.c (conditional_conversion): Build an RVALUE_CONV if
we're just changing the cv-quals.
(build_conditional_expr): Don't call convert to change
cv-quals.
From-SVN: r66502