Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213229 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR libstdc++/60037 - SIGFPE in std::generate_canonical<unsigned int...>
	* include/bits/random.h (_Adaptor): static_assert for non floating-point
	result type.
	* include/bits/random.tcc (generate_canonical): Ditto.
	* include/ext/random.tcc (hypergeometric_distribution::operator()):
	Use double as a rng result type.
	* testsuite/26_numerics/random/pr60037-neg.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/pr60037.cc: New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213231 138bc75d-0d04-0410-961f-82ee72b054a4
Introduce xmallocarray, an overflow checking version of xmalloc (CVE-2014-5044)

2014-07-31  Janne Blomqvist  <jb@gcc.gnu.org>

	Backport from mainline
	CVE-2014-5044
        * libgfortran.h (xmallocarray): New prototype.
        * runtime/memory.c (xmallocarray): New function.
        (xcalloc): Check for nonzero separately instead of multiplying.
        * generated/*.c: Regenerated.
        * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
        xmalloc.
        * intrinsics/eoshift0.c (eoshift0): Likewise.
        * intrinsics/eoshift2.c (eoshift2): Likewise.
        * intrinsics/pack_generic.c (pack_internal): Likewise.
        (pack_s_internal): Likewise.
        * intrinsics/reshape_generic.c (reshape_internal): Likewise.
        * intrinsics/spread_generic.c (spread_internal): Likewise.
        (spread_internal_scalar): Likewise.
        * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
        (string_minmax): Likewise.
        * intrinsics/transpose_generic.c (transpose_internal): Likewise.
        * intrinsics/unpack_generic.c (unpack_internal): Likewise.
        * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
        * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
        xmalloc.
        * io/unit.c (get_internal_unit): Likewise.
        (filename_from_unit): Don't cast xmalloc return value.
        * io/write.c (nml_write_obj): Likewise, formatting.
        * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
        instead of xmalloc.
        (besse_yn_r'rtype_kind`): Likewise.
        * m4/cshift1.m4 (cshift1): Likewise.
        * m4/eoshift1.m4 (eoshift1): Likewise.
        * m4/eoshift3.m4 (eoshift3): Likewise.
        * m4/iforeach.m4: Likewise.
        * m4/ifunction.m4: Likewise.
        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
        Likewise.
        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
        * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
        * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
        * m4/pack.m4 (pack_'rtype_code`): Likewise.
        * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
        * m4/shape.m4 (shape_'rtype_kind`): Likewise.
        * m4/spread.m4 (spread_'rtype_code`): Likewise.
        (spread_scalar_'rtype_code`): Likewise.
        * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
        * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
        (unpack1_'rtype_code`): Likewise.
        * runtime/convert_char.c (convert_char1_to_char4): Likewise.
        (convert_char4_to_char1): Simplify.
        * runtime/environ.c (init_unformatted): Call xmallocarray instead
        of xmalloc.
        * runtime/in_pack_generic.c (internal_pack): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213312 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213315 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	Backport from mainline
	2014-07-31  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/61844
	* config/sh/sh.c (sh_legitimate_address_p,
	sh_legitimize_reload_address): Handle reg+reg address modes when
	ALLOW_INDEXED_ADDRESS is false.
	* config/sh/predicates.md (general_movsrc_operand,
	general_movdst_operand): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213384 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213390 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/61964
	* tree-ssa-tail-merge.c (gimple_equal_p): Handle non-SSA LHS solely
        by structural equality.

	* gcc.dg/torture/pr61964.c: New testcase.
	* gcc.dg/pr51879-18.c: XFAIL.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213404 138bc75d-0d04-0410-961f-82ee72b054a4
	* libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
	(struct gomp_taskwait): New type.
	(struct gomp_task): Add taskwait and parent_depends_on, remove
	in_taskwait and taskwait_sem fields.
	(gomp_finish_task): Don't destroy taskwait_sem.
	* task.c (gomp_init_task): Don't init in_taskwait, instead init
	taskwait and parent_depends_on.
	(GOMP_task): For if (0) tasks with depend clause that depend on
	earlier tasks don't defer them, instead call
	gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
	Initialize redundant_out field, for redundant out entries just
	move them at the end of linked list instead of removing them
	completely, and set redundant_out flag instead of redundant.
	(gomp_task_run_pre): Update last_parent_depends_on if scheduling
	that task.
	(gomp_task_run_post_handle_dependers): If parent is in
	gomp_task_maybe_wait_for_dependencies and newly runnable task
	is not parent_depends_on, queue it in parent->children linked
	list after all runnable tasks with parent_depends_on set.
	Adjust for addition of taskwait indirection.
	(gomp_task_run_post_remove_parent): If parent is in
	gomp_task_maybe_wait_for_dependencies and task to be removed
	is parent_depends_on, decrement n_depend and if needed awake
	parent.  Adjust for addition of taskwait indirection.
	(GOMP_taskwait): Adjust for addition of taskwait indirection.
	(gomp_task_maybe_wait_for_dependencies): New function.
	* testsuite/libgomp.c/depend-5.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213409 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Backport from mainline
    2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/61375
    * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
      symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
    (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.

    gcc/testsuite/
    PR tree-optimization/61375
    * gcc.c-torture/execute/pr61375-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213436 138bc75d-0d04-0410-961f-82ee72b054a4
	PR middle-end/61455

gcc/c-family/
	* array-notation-common.c (extract_array_notation_exprs): Handling
	of DECL_EXPR added.

gcc/c/
	* c-array-notation.c (expand_array_notations): Handling
	of DECL_EXPR added.

gcc/cp/
	* cp-array-notation.c (expand_array_notation_exprs): Handling of
	DECL_EXPR improved. Changed handling for INIT_EXPR.

gcc/testsuite/
	* c-c++-common/cilk-plus/AN/pr61455.c: New test.
	* c-c++-common/cilk-plus/AN/pr61455-2.c: Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213492 138bc75d-0d04-0410-961f-82ee72b054a4
	PR other/61963

gcc/cp/
	* parser.c (cp_parser_array_notation): Added check for array_type.

gcc/testsuite/
	* c-c++-common/cilk-plus/AN/pr61963.c: New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213493 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/
	* cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
	in error output.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213496 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-01  Vladimir Makarov  <vmakarov@redhat.com>

	* lra-constraints.c (remove_inheritance_pseudos): Process
	destination pseudo too.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213497 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213509 138bc75d-0d04-0410-961f-82ee72b054a4
	PR other/61895

runtime: Ignore small argv[0] file for backtrace.

Reportedly in some cases Docker starts processes with argv[0]
pointing to an empty file.  That would cause libgo to pass
that empty file to libbacktrace, which would then fail to do
any backtraces.  Everything should work fine if libbacktrace
falls back to /proc/self/exe.

This patch to libgo works around the problem by ignoring
argv[0] if it is a small file, or if stat fails.  This is not
a perfect fix but it's an unusual problem.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213512 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213522 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213528 138bc75d-0d04-0410-961f-82ee72b054a4
	* task.c (GOMP_taskgroup_end): If taskgroup->num_children
	is not zero, but taskgroup->children is NULL and there are
	any task->children, schedule those instead of waiting.
	* testsuite/libgomp.c/depend-6.c: New test.
	* testsuite/libgomp.c/depend-7.c: New test.
	* testsuite/libgomp.c/depend-8.c: New test.
	* testsuite/libgomp.c/depend-9.c: New test.
	* testsuite/libgomp.c/depend-10.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213594 138bc75d-0d04-0410-961f-82ee72b054a4
	PR target/60102

[libgcc]
2014-08-04  Rohit  <rohitarulraj@freescale.com>
	* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Update
	  based on change in SPE high register numbers and 3 HTM registers.

[gcc]
2014-08-04  Rohit  <rohitarulraj@freescale.com>
	* config/rs6000/rs6000.c
	  (rs6000_reg_names) : Add SPE high register names.
	  (alt_reg_names) : Likewise.
	  (rs6000_dwarf_register_span) : For SPE high registers, replace
	  dwarf register numbers with GCC hard register numbers.
	  (rs6000_init_dwarf_reg_sizes_extra) : Likewise.
	  (rs6000_dbx_register_number): For SPE high registers, return dwarf
	  register number for the corresponding GCC hard register number.

	* config/rs6000/rs6000.h
	  (FIRST_PSEUDO_REGISTER) : Update based on 32 newly added GCC hard
	  register numbers for SPE high registers.
	  (DWARF_FRAME_REGISTERS) :  Likewise.
	  (DWARF_REG_TO_UNWIND_COLUMN) : Likewise.
	  (DWARF_FRAME_REGNUM) : Likewise.
	  (FIXED_REGISTERS) : Likewise.
	  (CALL_USED_REGISTERS) : Likewise.
	  (CALL_REALLY_USED_REGISTERS) : Likewise.
	  (REG_ALLOC_ORDER) : Likewise.
	  (enum reg_class) : Likewise.
	  (REG_CLASS_NAMES) : Likewise.
	  (REG_CLASS_CONTENTS) : Likewise.
	  (SPE_HIGH_REGNO_P) : New macro to identify SPE high registers.	

[gcc/testsuite]
2014-08-04  Rohit  <rohitarulraj@freescale.com>
	* gcc.target/powerpc/pr60102.c: New testcase.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213597 138bc75d-0d04-0410-961f-82ee72b054a4
Backported from mainline
2014-04-15  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add
	const to constexpr member functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213600 138bc75d-0d04-0410-961f-82ee72b054a4