2012-10-16  François Dumont  <fdumont@gcc.gnu.org>

	* include/debug/formatter.h (_Debug_msg_id): Add
	__msg_bucket_index_oob.
	* include/debug/macros.h (__glibcxx_check_bucket_index): New.
	* include/debug/unordered_set (unordered_set<>::begin(size_type)):
	Add check on bucket index.
	(unordered_set<>::begin(size_type) const): Likewise.
	(unordered_set<>::cbegin(size_type) const): Likewise.
	(unordered_set<>::end(size_type)): Likewise.
	(unordered_set<>::end(size_type) const): Likewise.
	(unordered_set<>::cend(size_type) const): Likewise.
	(unordered_set<>::bucket_size(size_type)): Likewise.
	(unordered_multiset<>::begin(size_type)): Likewise.
	(unordered_multiset<>::begin(size_type) const): Likewise.
	(unordered_multiset<>::cbegin(size_type) const): Likewise.
	(unordered_multiset<>::end(size_type)): Likewise.
	(unordered_multiset<>::end(size_type) const): Likewise.
	(unordered_multiset<>::cend(size_type) const): Likewise.
	(unordered_multiset<>::bucket_size(size_type)): Likewise.
	* include/debug/unordered_map (unordered_map<>::begin(size_type)):
	Likewise.
	(unordered_map<>::begin(size_type) const): Likewise.
	(unordered_map<>::cbegin(size_type) const): Likewise.
	(unordered_map<>::end(size_type)): Likewise.
	(unordered_map<>::end(size_type) const): Likewise.
	(unordered_map<>::cend(size_type) const): Likewise.
	(unordered_map<>::bucket_size(size_type)): Likewise.
	(unordered_multimap<>::begin(size_type)): Likewise.
	(unordered_multimap<>::begin(size_type) const): Likewise.
	(unordered_multimap<>::cbegin(size_type) const): Likewise.
	(unordered_multimap<>::end(size_type)): Likewise.
	(unordered_multimap<>::end(size_type) const): Likewise.
	(unordered_multimap<>::cend(size_type) const): Likewise.
	(unordered_multimap<>::bucket_size(size_type)): Likewise.
	* testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_map/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/cend_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_set/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/cend_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/cend_neg.cc: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192512 138bc75d-0d04-0410-961f-82ee72b054a4
2012-10-16  Tom de Vries  <tom@codesourcery.com>

	* expr.c (move_by_pieces, move_by_pieces_ninsns, can_store_by_pieces)
	(store_by_pieces_1): Don't enter loop when no more data is left.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192514 138bc75d-0d04-0410-961f-82ee72b054a4
	* rtl.h (get_call_rtx_from): New prototype.
	* rtlanal.c (get_call_rtx_from): New function.
	* calls.c (emit_call_1): Use it.
	* dse.c (scan_insn): Likewise
	* dwarf2out.c (dwarf2out_var_location): Likewise.
	* sched-deps.c (call_may_noreturn_p): Likewise.
	* var-tracking.c (prepare_call_arguments): Likewise.
	* config/sh/sh.c (sh_adjust_cost): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192516 138bc75d-0d04-0410-961f-82ee72b054a4
	PR rtl-optimization/54870
	* tree.h (TREE_ADDRESSABLE): Document special usage on SSA_NAME.
	* cfgexpand.c (update_alias_info_with_stack_vars ): Set it on the
	SSA_NAME pointer that points to a partition if there is at least
	one variable with it set in the partition.
	* dse.c (local_variable_can_escape): New predicate.
	(can_escape): Call it.
	* gimplify.c (mark_addressable): If this is a partitioned decl, also
	mark the SSA_NAME pointer that points to a partition.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192517 138bc75d-0d04-0410-961f-82ee72b054a4
Remove debug code accidentially checked in with last commit.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192519 138bc75d-0d04-0410-961f-82ee72b054a4
Merge branch 'master' of git://gcc.gnu.org/git/gcc