runtime: fix 32-bit malloc for pointers >= 0x80000000

The spans array is allocated in runtime_mallocinit.  On a
32-bit system the number of entries in the spans array is
MaxArena32 / PageSize, which (2U << 30) / (1 << 12) == (1 << 19).
So we are allocating an array that can hold 19 bits for an
index that can hold 20 bits.  According to the comment in the
function, this is intentional: we only allocate enough spans
(and bitmaps) for a 2G arena, because allocating more would
probably be wasteful.

But since the span index is simply the upper 20 bits of the
memory address, this scheme only works if memory addresses are
limited to the low 2G of memory.  That would be OK if we were
careful to enforce it, but we're not.  What we are careful to
enforce, in functions like runtime_MHeap_SysAlloc, is that we
always return addresses between the heap's arena_start and
arena_start + MaxArena32.

We generally get away with it because we start allocating just
after the program end, so we only run into trouble with
programs that allocate a lot of memory, enough to get past
address 0x80000000.

This changes the code that computes a span index to subtract
arena_start on 32-bit systems just as we currently do on
64-bit systems.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206501 138bc75d-0d04-0410-961f-82ee72b054a4
compiler: Add flattening pass


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206502 138bc75d-0d04-0410-961f-82ee72b054a4
	PR middle-end/59670
	* tree-vect-data-refs.c (vect_analyze_data_refs): Check
	is_gimple_call before calling gimple_call_internal_p.

	* gcc.dg/pr59670.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206503 138bc75d-0d04-0410-961f-82ee72b054a4
	PR libstdc++/59680
	* src/c++11/thread.cc (__sleep_for): Fix call to ::sleep.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206504 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206507 138bc75d-0d04-0410-961f-82ee72b054a4
compiler: Use backend interface for slice info.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206509 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
2014-01-10  Huacai Chen  <chenhc@lemote.com>

	* config/mips/driver-native.c (host_detect_local_cpu): Handle new
	kernel strings for Loongson-2E/2F/3A.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206512 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-10  Max Ostapenko  <m.ostapenko@partner.samsung.com>

	* c-c++-common/asan/no-asan-stack.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206515 138bc75d-0d04-0410-961f-82ee72b054a4

	PR ipa/58252
	PR ipa/59226
	* ipa-devirt.c record_target_from_binfo): Take as argument
	stack of binfos and lookup matching one for virtual inheritance.
	(possible_polymorphic_call_targets_1): Update.

	* g++.dg/ipa/devirt-20.C: New testcase.	
	* g++.dg/torture/pr58252.C: Likewise.
	* g++.dg/torture/pr59226.C: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206516 138bc75d-0d04-0410-961f-82ee72b054a4
Note that pass_pre destroys PROP_no_crit_edges

2014-01-09  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-pre.c (pass_data_pre): Add comment about PROP_no_crit_edges
	in properties_required.  Add PROP_no_crit_edges to properties_destroyed.
	* tree-ssa-sink.c (pass_data_sink_code): Remove PROP_no_crit_edges
	from properties_required.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206517 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.c (arm_init_iwmmxt_builtins): Skip
	non-iwmmxt builtins.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206518 138bc75d-0d04-0410-961f-82ee72b054a4
[gcc/testsuite/]
2014-01-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* lib/target-supports.exp
	(check_effective_target_arm_crypto_ok_nocache): New.
	(check_effective_target_arm_crypto_ok): Use above procedure.
	(add_options_for_arm_crypto): Use et_arm_crypto_flags.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206519 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm-cores.def (cortex-a53): Specify FL_CRC32.
	(cortex-a57): Likewise.
	(cortex-a57.cortex-a53): Likewise. Remove redundant flags.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206520 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.c (arm_new_rtx_costs): Use destination mode
	when handling a SET rtx.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206521 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/59374
	* tree-vect-slp.c (vect_slp_analyze_bb_1): Move dependence
	checking after SLP discovery.  Mark stmts not participating
	in any SLP instance properly.

	* gcc.dg/torture/pr59374-3.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206523 138bc75d-0d04-0410-961f-82ee72b054a4