2011-12-07 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/51386
* include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt):
Fix computation of _M_prev_resize so that hashtable do not keep on
being rehashed when _M_max_load_factor is lower than 1.
From-SVN: r182085
2011-12-07 Andrew Pinski <apinski@cavium.com>
PR middle-end/45416
* expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for
SSA-expand.
2011-12-07 Andrew Pinski <apinski@cavium.com>
PR middle-end/45416
* gcc.dg/pr45416.c: New testcase.
From-SVN: r182084
2011-12-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50823
* ipa-inline.c (edge_badness): Do not account for the number of
remaining calls.
* gcc.dg/torture/pr50823.c: New testcase.
From-SVN: r182077
2011-12-07 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/50744
* ipa-cp.c (good_cloning_opportunity_p): Assert size_cost is positive,
compute evaluation in HOST_WIDEST_INT.
(safe_add): New function
(propagate_effects): Use safe_add to accumulate effects.
* testsuite/gcc.dg/ipa/pr50744.c: New test.
From-SVN: r182076
2011-12-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* config/rs6000/rtems.h: Switch to using global_options_set
in SUBSUBTARGET_OVERRIDE_OPTIONS.
From-SVN: r182068
2011-12-06 Andrew Pinski <apinski@cavium.com>
* crtstuff.c (__do_global_dtors_aux_fini_array_entry): Align to the
size of func_ptr.
(__frame_dummy_init_array_entry): Likewise.
From-SVN: r182066
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
Correctly detect cygwin, which no longer has the '32' suffix, and use
appropriate implementations of the sockets and memory packages.
* sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
setmode/_setmode for MinGW and Cygwin, respectively.
(__gnat_set_binary_mode [windows targets]): Use the above, and enable
the windows version for Cygwin as well as MinGW.
(__gnat_set_text_mode [windows targets]): Likewise.
(__gnat_ttyname [windows targets]): Provide a Cygwin implementation
in addition to the MinGW version.
(__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
(__gnat_get_stack_bounds): Likewise.
From-SVN: r182065
* config/avr/avr-mcus.def (avr_mcu_types): ATtiny4313 and
AT86RF401 have a 16-bit SP (their manual is bogus).
Forward-port from gcc-4_6-branch r181936 2011-12-02.
From-SVN: r182053
libgcc/
Forward-port from gcc-4_6-branch r181936 2011-12-02.
PR target/51345
PR target/51002
* config/avr/lib1funcs.S (__prologue_saves__,
__epilogue_restores__, __divdi3_moddi3): Enclose parts using
__SP_H__ in !defined (__AVR_HAVE_8BIT_SP__). Add FIXME comments.
gcc/
Forward-port from gcc-4_6-branch r181936 2011-12-02.
PR target/51002
* config/avr/avr.md (movhi_sp_r): Set insn condition to
!AVR_HAVE_8BIT_SP.
* config/avr/avr.c (output_movhi): Use "clr%B0" instead of "in
%B0,__SP_H__" if AVR_HAVE_8BIT_SP.
(avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
From-SVN: r182052
2011-12-06 Richard Guenther <rguenther@suse.de>
PR middle-end/51436
* gimple-fold.c (gimplify_and_update_call_from_tree): Guard
vdef check for the fact we do not have virtual operands when
not optimizing.
* g++.dg/torture/pr51436.C: New testcase.
From-SVN: r182045
2011-12-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51245
* tree-ssa-sccvn.c (vn_reference_lookup_or_insert_constant_for_pieces):
New function.
(vn_reference_lookup_3): Use it. Properly valueize all refs
we create.
* gcc.dg/torture/pr51245.c: New testcase.
From-SVN: r182044
PR target/50906
* config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
Do not mark r11 setup as frame-related. Pass correct offset to
rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related
arguments. Correct sp_offset. Remove "offset" fudge from
in-line rs6000_frame_related call. Rename misleading variable.
Fix comments and whitespace. Tidy some expressions.
(rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
to r11 in out-of-line case. Correct sp_offset. Pass correct
offset to rs6000_emit_savres_rtx. Rename misleading variable.
Fix comments and whitespace. Tidy some expressions.
(rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
adjustment when !saving_GPRs_inline. Correct register mode
used in address calcs.
(rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
!restoring_GPRs_inline.
From-SVN: r182039
2011-12-05 Paolo Carlini <paolo.carlini@oracle.com>
* libsupc++/initializer_list: Do not declare anything if
__GXX_EXPERIMENTAL_CXX0X__ is not defined.
From-SVN: r182031
PR tree-optimization/51396
* tree-ssa-math-opts.c (convert_mult_to_fma): Don't optimize
if MUL_RESULT has zero uses.
* g++.dg/opt/pr51396.C: New test.
From-SVN: r182028
PR debug/51410
* c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
for debug info if scope is file_scope.
* gcc.dg/debug/dwarf2/pr51410.c: New test.
From-SVN: r182027
2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/51338
* dependency.c (are_identical_variables): Handle case where
end fields of substring references are NULL.
2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/51338
* gfortran.dg/assumed_charlen_substring_1.f90: New test.
From-SVN: r182024
/cp
2011-12-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51414
* semantics.c (finish_underlying_type): Use %qT, not %qE for the
error message.
/testsuite
2011-12-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51414
* g++.dg/ext/underlying_type11.C: New.
From-SVN: r182017