* config/i386/i386-builtin-types.def: Add USHORT_FTYPE_VOID.
	Remove VOID_FTYPE_PUSHORT.
	* config/i386/i386.c (bdesc_special_args) <__builtin_ia32_fnstsw>:
	Change code to USHORT_FTYPE_VOID.
	(ix86_expand_special_args_builtin): Handle USHORT_FTYPE_VOID.
	(ix86_expand_builtin): Remove IX86_BUILTIN_FNSTSW handling.
	(ix86_atomic_assign_expand_fenv): Update for
	__builtin_ia32_fnstsw changes.
	* config/i386/i386.md (x86_fnstsw_1): Set length unconditionally to 2.
	(fnstsw): Change operand 0 to nonimmediate operand.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212478 138bc75d-0d04-0410-961f-82ee72b054a4
	* lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
	timevar
	(materialize_cgraph): Do not push GIMPLE_IN timevar.

	* timevar.def (TV_IPA_LTO_DECL_INIT_IO): Remove.
	(TV_IPA_LTO_CTORS_IN, TV_IPA_LTO_CTORS_OUT): New timevar.
	* cgraph.c (cgraph_get_body): Push GIMPLE_IN timevar.
	(varpool_get_constructor): Push CTORS_IN timevar.
	* lto-streamer-out.c (lto_output): Push TV_IPA_LTO_CTORS_OUT
	timevar.


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

	* Minor ChangeLog adjustment.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212480 138bc75d-0d04-0410-961f-82ee72b054a4
	* tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIC
	on builtin types.
	* ipa-devirt.c: Include stor-layout.h and intl.h
	(odr_subtypes_equivalent_p): New function.
	(warn_odr): New function.
	(warn_type_mismatch): New function.
	(odr_types_equivalent_p): New function.
	(add_type_duplicate): Use it.
	* common.opt (Wodr): New flag.
	* doc/invoke.texi (Wodr): Document new warning.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212481 138bc75d-0d04-0410-961f-82ee72b054a4
	PR c++/22434
	PR c++/61288
	* call.c (build_conditional_expr_1): Avoid reading freed memory.

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

        * check.c (gfc_check_atomic): Update for STAT=.
        (gfc_check_atomic_def, gfc_check_atomic_ref): Update call.
        (gfc_check_atomic_op, gfc_check_atomic_cas,
        gfc_check_atomic_fetch_op): New.
        * gfortran.h (gfc_isym_id): GFC_ISYM_ATOMIC_CAS,
        * GFC_ISYM_ATOMIC_ADD,
        GFC_ISYM_ATOMIC_AND, GFC_ISYM_ATOMIC_OR, GFC_ISYM_ATOMIC_XOR,
        GFC_ISYM_ATOMIC_FETCH_ADD, GFC_ISYM_ATOMIC_FETCH_AND,
        GFC_ISYM_ATOMIC_FETCH_OR and GFC_ISYM_ATOMIC_FETCH_XOR.
        * intrinsic.c (add_subroutines): Handle them.
        * intrinsic.texi: Add documentation for them.
        (ATOMIC_REF, ATOMIC_DEFINE): Add STAT=.
        (ISO_FORTRAN_ENV): Add STAT_FAILED_IMAGE.
        * intrinsic.h (gfc_check_atomic_op, gfc_check_atomic_cas,
        gfc_check_atomic_fetch_op): New
        prototypes.
        * libgfortran.h (libgfortran_stat_codes): Add
        * GFC_STAT_FAILED_IMAGE.
        * iso-fortran-env.def: Add it.
        * trans-intrinsic.c (conv_intrinsic_atomic_op): Renamed from
        conv_intrinsic_atomic_ref; handle more atomics.
        (conv_intrinsic_atomic_def): Handle STAT=.
        (conv_intrinsic_atomic_cas): New.
        (gfc_conv_intrinsic_subroutine): Handle new atomics.

gcc/testsuite/
2014-07-12  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/coarray_atomic_1.f90: Update dg-error.
        * gfortran.dg/coarray_atomic_2.f90: New.
        * gfortran.dg/coarray_atomic_3.f90: New.
        * gfortran.dg/coarray_atomic_4.f90: New.
        * gfortran.dg/coarray/atomic_2.f90: New.



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

gcc/fortran/
        * libgfortran.h (libcaf_atomic_codes): Add.
        * trans-decl.c (gfor_fndecl_caf_atomic_def,
        gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
        gfor_fndecl_caf_atomic_op): New variables.
        (gfc_build_builtin_function_decls): Initialize them.
        * trans.h (gfor_fndecl_caf_atomic_def,
        gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
        gfor_fndecl_caf_atomic_op): New variables.
        * trans-intrinsic.c (conv_intrinsic_atomic_op,
        conv_intrinsic_atomic_ref, conv_intrinsic_atomic_cas):
        Add library calls with -fcoarray=lib.

libgfortran/
        * caf/libcaf.h (_gfortran_caf_atomic_define,
        _gfortran_caf_atomic_ref, _gfortran_caf_atomic_op,
        _gfortran_caf_atomic_cas): New prototypes.
        * caf/single.c (_gfortran_caf_atomic_define,
        _gfortran_caf_atomic_ref, _gfortran_caf_atomic_op,
        _gfortran_caf_atomic_cas): New functions.



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

        PR fortran/61628
        * trans-types.c (gfc_init_types): Fix data-type bug
        with gfc_max_array_element_size.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212485 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/61780
	* dependency.c (gfc_dep_resolver): Index the 'reverse' array so
	that elements are skipped. This then correctly aligns 'reverse'
	with the scalarizer loops.

2014-07-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/61780
	* gfortran.dg/dependency_44.f90 : New test


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