Refactored check_bounds.
Added index_expression to backend. Using backend interface for array_index.
Implemented string_index_expression using backend interface.
Return an error while indexing if the start index isn't an integer.
Really fix issues with bounds checking with non-integer bounds. Still an unsure hack.
s/index_expression/array_index_expression for backend.
Minor fixes for lines > 80 characters.
https://codereview.appspot.com/72130045/#msg3
runtime: Fix GC bug caused by Entersyscall modifying reg.

This patch fixes a rare but serious bug.  The Go garbage
collector only examines Go stacks.  When Go code calls a
function that is not written in Go, it first calls
syscall.Entersyscall.  Entersyscall records the position of
the Go stack pointer and saves a copy of all the registers.
If the garbage collector runs while the thread is executing
the non-Go code, the garbage collector fetches the stack
pointer and registers from the saved location.

Entersyscall saves the registers using the getcontext
function.  Unfortunately I didn't consider the possibility
that Entersyscall might itself change a register before
calling getcontext.  This only matters for callee-saved
registers, as caller-saved registers would be visible on the
saved stack.  And it only matters if Entersyscall is compiled
to save and modify a callee-saved register before it calls
getcontext.  And it only matters if a garbage collection
occurs while the non-Go code is executing.  And it only
matters if the only copy of a valid Go pointer happens to be
in the callee-saved register when Entersyscall is called.
When all those conditions are true, the Go pointer might get
collected incorrectly, leading to memory corruption.

This patch tries to avoid the problem by splitting
Entersyscall into two functions.  The first is a simple
function that just calls getcontext and then calls the rest of
Entersyscall.  This should fix the problem, provided the
simple Entersyscall function does not itself modify any
callee-saved registers before calling getcontext.  That seems
to be true on the systems I checked.  But since the argument
to getcontext is an offset from a TLS variable, it won't be
true on a system which needs to save callee-saved registers in
order to get the address of a TLS variable.  I don't know why
any system would work that way, but I don't know how to rule
it out.  I think that on any such system this will have to be
implemented in assembler.  I can't put the ucontext_t
structure on the stack, because this function can not split
stacks, and the ucontext_t structure is large enough that it
could cause a stack overflow.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208390 138bc75d-0d04-0410-961f-82ee72b054a4
	* sort.c: New file.
	* stest.c: New file.
	* internal.h (backtrace_qsort): Declare.
	* dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
	(read_line_info, read_function_entry): Likewise.
	(read_function_info, build_dwarf_data): Likewise.
	* elf.c (elf_initialize_syminfo): Likewise.
	* Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
	(stest_SOURCES, stest_LDADD): Define.
	(check_PROGRAMS): Add stest.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208392 138bc75d-0d04-0410-961f-82ee72b054a4
Merge branch 'master' of https://github.com/mirrors/gcc
The error_mark_node is not an OpenMP mappable type.

	gcc/
	* langhooks.c (lhd_omp_mappable_type): The error_mark_node is not
	an OpenMP mappable type.
	gcc/c/
	* c-decl.c (c_decl_attributes): Use
	lang_hooks.types.omp_mappable_type.
	* c-typeck.c (c_finish_omp_clauses): Likewise.
	gcc/testsuite/
	* c-c++-common/gomp/map-1.c: Extend.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208394 138bc75d-0d04-0410-961f-82ee72b054a4
2014-03-07  Paulo Matos  <paulo@matos-sorge.com>

	* common.opt (fira-loop-pressure): Mark as optimization.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208395 138bc75d-0d04-0410-961f-82ee72b054a4
Disable local dynamic TLS model on Solaris/x86 if as/ld cannot handle it

	* configure.ac (TLS_SECTION_ASM_FLAG): Save as tls_section_flag.
	(LIB_TLS_SPEC): Save as ld_tls_libs.
	(HAVE_AS_IX86_TLSLDMPLT): Define as 1/0.
	(HAVE_AS_IX86_TLSLDM): New test.
	* configure, config.in: Regenerate.
	* config/i386/i386.c (legitimize_tls_address): Fall back to
	TLS_MODEL_GLOBAL_DYNAMIC on 32-bit Solaris/x86 if tool chain
	cannot support TLS_MODEL_LOCAL_DYNAMIC.
	* config/i386/i386.md (*tls_local_dynamic_base_32_gnu): Use if
	instead of #ifdef in HAVE_AS_IX86_TLSLDMPLT test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208398 138bc75d-0d04-0410-961f-82ee72b054a4
Improve @tlsldmplt test on Solaris 11/x86

	* configure.ac (HAVE_AS_IX86_TLSLDMPLT): Improve test for Solaris
	11/x86 ld.
	* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208399 138bc75d-0d04-0410-961f-82ee72b054a4
	PR bootstrap/58572
	* Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Use -isystem instead of
	-I for libstdc++-v3 includes if $(LEAN).
	* Makefile.in: Regenerated.


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

	* libbacktrace/Makefile.am (libsanitizer_libbacktrace_la_SOURCES):
	Add ../../libbacktrace/sort.c.
	* libbacktrace/Makefile.in: Regenerate.
	* libbacktrace/backtrace-rename.h (backtrace_qsort): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208401 138bc75d-0d04-0410-961f-82ee72b054a4
2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (check_initializer): Remove dead code.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208402 138bc75d-0d04-0410-961f-82ee72b054a4
Merge branch 'master' of https://github.com/mirrors/gcc
	* sort.c (backtrace_qsort): Use middle element as pivot.


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