2014-06-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/61325
	* lra-constraints.c (valid_address_p): Add forward declaration.
	(simplify_operand_subreg): Check address validity before and after
	alter_reg of memory subreg.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211715 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
2014-06-17  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/arm/arm.c (arm_atomic_assign_expand_fenv): call
	default_atomic_assign_expand_fenv for !TARGET_HARD_FLOAT.
	(arm_init_builtins) : Initialize builtins __builtins_arm_set_fpscr and
	__builtins_arm_get_fpscr only when TARGET_HARD_FLOAT.
	* config/arm/vfp.md (set_fpscr): Make pattern conditional on
	TARGET_HARD_FLOAT.
	(get_fpscr) : Likewise.



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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211720 138bc75d-0d04-0410-961f-82ee72b054a4
Introduce xmallocarray, an overflow checking variant of xmalloc.

2014-06-17  Janne Blomqvist  <jb@gcc.gnu.org>

	* 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/trunk@211721 138bc75d-0d04-0410-961f-82ee72b054a4
Rotate ChangeLog for 2013.


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

	* tree-ssa-loop-im.c (determine_max_movement): Adjust cost
	of PHI node moving.

	* gcc.dg/tree-ssa/ssa-lim-12.c: New testcase.


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

	* tree-ssa-propagate.c: Include domwalk.h.
	(substitute_and_fold): Outline main worker into a domwalker ...
	(substitute_and_fold_dom_walker::before_dom_children): ... here.
	Schedule stmts we can fully propagate for removal.  Remove
	poor-mans DCE.
	(substitute_and_fold): Apply a dominator walk to perform
	substitution.  Process stmts scheduled for removal here.

	* gcc.dg/tree-ssa/20041122-1.c: Adjust.
	* gcc.dg/tree-ssa/forwprop-21.c: Likewise.
	* gcc.dg/tree-ssa/vrp35.c: Revert previous adjustments.
	* gcc.dg/tree-ssa/vrp36.c: Likewise.
	* gcc.dg/vect/nodump-forwprop-22.c: Adjust.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211725 138bc75d-0d04-0410-961f-82ee72b054a4
[PR middle-end/61508] fold-const.c:14863:55: error: cannot convert 'const char*' to 'const_tree

	gcc/
	* fold-const.c (fold_checksum_tree) <TS_DECL_WITH_VIS>: Remove
	check for section name.

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

	PR lto/61012
	* gcc.dg/lto/pr61526_0.c: New testcase.
	* gcc.dg/lto/pr61526_1.c: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211728 138bc75d-0d04-0410-961f-82ee72b054a4
	* config/msp430/msp430.md (mulhisi3): Add a NOP after the DINT.
	(umulhi3, mulsidi3, umulsidi3): Likewise.


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

	PR target/61483
	* config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
	variable 'size'; calculate 'size' right in the front; use
	'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
	pcum->aapcs_stack_words.

gcc/testsuite/

	PR target/61483
	* gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
	* gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
	* gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
	* gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211733 138bc75d-0d04-0410-961f-82ee72b054a4
	* gfortran.dg/pr61335.f90 (cp_unit_create): Initialize
	unit_id and kind_id to zero.



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

	* tree-switch-conversion.c (collect_switch_conv_info): Simplify
	and allow all blocks to be forwarders.


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

	* passes.def (pass_all_early_optimizations): Remove copy-prop pass.
	(pass_all_optimizations): Move 3rd copy-prop pass from after
	fre to before ifcombine/phiopt.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211736 138bc75d-0d04-0410-961f-82ee72b054a4
Clean up ST_REGS handling in the MIPS backend.

gcc/

	* config/mips/mips-protos.h (mips_expand_fcc_reload): Remove.
	* config/mips/mips.c (mips_expand_fcc_reload): Remove.
	(mips_move_to_gpr_cost): Remove ST_REGS case.
	(mips_move_from_gpr_cost): Likewise.
	(mips_register_move_cost): Likewise.
	(mips_secondary_reload_class): Likewise.


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

	* genopinit.c (main): Use vec<>::qsort method.
	* tree-ssa-loop-niter.c (discover_iteration_bound_by_body_walk):
	Likewise.
	* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211738 138bc75d-0d04-0410-961f-82ee72b054a4
Compile gcc.target/i386/fuse-caller-save.c with -fomit-frame-pointer (PR target/61533)

	PR target/61533
	* gcc.target/i386/fuse-caller-save.c: Add -fomit-frame-pointer to
	dg-options.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211740 138bc75d-0d04-0410-961f-82ee72b054a4
Fix dot dump bug

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211746 138bc75d-0d04-0410-961f-82ee72b054a4
	* Makefile.am (libatomic_la_LDFLAGS): Add lt_host_flags.
	* configure.ac (ACX_LT_HOST_FLAGS): New.
	(target_thread_file): New.
	* configure.tgt (mingw): Add mingw support.
	* config/mingw/host-config.h: New file.
	* config/mingw/lock.c: Likewise.
	* Makefile.in: Regenerated.
	* configure: Likewise.
	* aclocal.m4: Likewise.
	* testsuite/Makefile.in: Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211747 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/
2014-06-17  Tobias Burnus  <burnus@net-b.de>

        * check.c (gfc_check_atomic, gfc_check_atomic_def):
        Use argument for GFC_ISYM_CAF_GET.
        * resolve.c (resolve_variable): Enable CAF_GET insertion.
        (resolve_lock_unlock): Remove GFC_ISYM_CAF_GET.
        (resolve_ordinary_assign): Enable CAF_SEND insertion.
        * trans-const.c (gfc_build_string_const,
        gfc_build_wide_string_const): Set TYPE_STRING_FLAG.
        * trans-decl.c (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
        gfor_fndecl_caf_sendget): New global variables.
        (gfc_build_builtin_function_decls): Initialize them;
        update co_min/max/sum initialization.
        * trans-expr.c (gfc_get_tree_for_caf_expr): Renamed from
        get_tree_for_caf_expr and removed static.
        (gfc_conv_procedure_call): Update call.
        * trans-intrinsic.c (caf_get_image_index,
        conv_caf_vector_subscript_elem, conv_caf_vector_subscript,
        get_caf_token_offset, gfc_conv_intrinsic_caf_get,
        conv_caf_send): New.
        (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine,
        gfc_walk_intrinsic_function): Handle CAF_GET and CAF_SEND.
        (conv_co_minmaxsum): Update call for remove unused vector
        subscript.
        (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref):
        Skip a CAF_GET of the argument.
        * trans-types.c (gfc_get_caf_vector_type): New.
        * trans-types.h (gfc_get_caf_vector_type): New.
        * trans.h (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
        gfor_fndecl_caf_sendget): New global variables.
        (gfc_get_tree_for_caf_expr): New prototypes.

libgfortran/
2014-06-17  Tobias Burnus  <burnus@net-b.de>

        * caf/libcaf.h (gfc_descriptor_t): New typedef.
        (caf_vector_t): Update.
        (_gfortran_caf_co_sum, _gfortran_caf_co_max, _gfortran_caf_co_min):
        Remove vector-subscript argument.
        (_gfortran_caf_co_send, _gfortran_caf_co_get,
        _gfortran_caf_co_sendget): New.
        * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
        _gfortran_caf_co_min): Remove vector-subscript argument.
        (_gfortran_caf_co_send, _gfortran_caf_co_get,
        _gfortran_caf_co_sendget): New.

gcc/testsuite/
2014-06-17  Tobias Burnus  <burnus@net-b.de>
            Alessandro Fanfarillo <alessandro.fanfarillo@gmail.com>

        * gfortran.dg/coarray/send_array.f90: New.
        * gfortran.dg/coarray/get_array.f90: New.
        * gfortran.dg/coarray/sendget_array.f90: New.
        * gfortran.dg/coarray/collectives_1.f90: Correct subroutine
        names.
        * gfortran.dg/coarray/collectives_2.f90: New.




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