gcc/
	PR middle-end/53698
	* expr.c (expand_expr_addr_expr_1): Convert to tmode before
	performing an addition.

gcc/testsuite/
	PR middle-end/53698
	* gcc.target/i386/pr53698.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188725 138bc75d-0d04-0410-961f-82ee72b054a4
Implement support for int iterators.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188726 138bc75d-0d04-0410-961f-82ee72b054a4
2012-06-18  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_gimplify_va_arg): Revert change from
	r187965.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188727 138bc75d-0d04-0410-961f-82ee72b054a4
2012-06-18  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (extract_range_from_assert): Split out range
	intersecting code.
	(intersect_ranges): New function.
	(vrp_intersect_ranges): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188728 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* config/vax/vax.h (VMS_TARGET): Remove.

cp/
	* decl.c (finish_function): Remove code conditional on VMS_TARGET.



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

2012-06-18  Bill Schmidt  <wschmidt@linux.ibm.com>

	PR tree-optimization/53703
	* tree-ssa-phiopt.c (hoist_adjacent_loads): Skip virtual phis;
	correctly set bb_for_def[12].

gcc/testsuite:

2012-06-18  Bill Schmidt  <wschmidt@linux.ibm.com>

	PR tree-optimization/53703
	* gcc.dg/torture/pr53703.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188731 138bc75d-0d04-0410-961f-82ee72b054a4
2012-06-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/53693
	* tree-vect-patterns.c (vect_operation_fits_smaller_type):
	Reject operands with more than one use.

	* g++.dg/torture/pr53693.C: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188733 138bc75d-0d04-0410-961f-82ee72b054a4
This patch updates ldm_stm_operation_p to check for loads that if SP is in
the register list, then the base register is SP. It guarantees that SP is
reset correctly when an LDM instruction is interrupted. Otherwise, we might
end up with a corrupt stack. 

gcc/

2012-06-18  Greta Yorsh  <greta.yorsh@arm.com>

	* config/arm/arm.c (ldm_stm_operation_p): Require SP
        as base register for loads if SP is in the register list.




git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188738 138bc75d-0d04-0410-961f-82ee72b054a4
This patch adds new define_insn patterns for epilogue with integer
registers.

The patterns can handle pop multiple with writeback and return (loading into
PC directly).
To handle return, the patterns use a new special predicate
pop_multiple_return, that uses ldm_stm_operation_p function from a previous
patch. To output assembly, the patterns use a new function
arm_output_multireg_pop.

This patch also adds a new function arm_emit_multi_reg_pop
that emits RTL that matches the new pop patterns for integer registers.
This is a helper function for epilogue expansion. It is used by a later
patch.

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm.md (load_multiple_with_writeback) New define_insn.
        (load_multiple, pop_multiple_with_writeback_and_return) Likewise.
        (pop_multiple_with_return, ldr_with_return) Likewise.
        * config/arm/predicates.md (pop_multiple_return) New special predicate.
        * config/arm/arm-protos.h (arm_output_multireg_pop) New declaration.
        * config/arm/arm.c (arm_output_multireg_pop) New function.
        (arm_emit_multi_reg_pop): New function.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188739 138bc75d-0d04-0410-961f-82ee72b054a4
New define insn pattern for epilogue with floating point registers (DFmode)
and a new function that emits RTL for this pattern. This function is a
helper for epilogue extension. It is used by a later patch.

gcc/

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm.md (vfp_pop_multiple_with_writeback) New
	define_insn.
        * config/arm/predicates.md (pop_multiple_fp) New special predicate.
        * config/arm/arm.c (arm_emit_vfp_multi_reg_pop): New function.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188740 138bc75d-0d04-0410-961f-82ee72b054a4
Helper function for epilogue expansion. Emit RTL for APCS frame epilogue
(when -mapcs-frame command line option is specified). 
This function is used by a later patch.

gcc/

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm.c (arm_expand_epilogue_apcs_frame): New function.
        * config/arm/arm.md (arm_addsi3) Add an alternative.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188741 138bc75d-0d04-0410-961f-82ee72b054a4
The main function for epilogue RTL generation, used by expand epilogue
patterns.

gcc/

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm-protos.h (arm_expand_epilogue): New declaration.
        * config/arm/arm.c (arm_expand_epilogue): New function.
        * config/arm/arm.md (epilogue): Update condition and code.
        (sibcall_epilogue): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188742 138bc75d-0d04-0410-961f-82ee72b054a4
Add a new parameter to the function output_return_instruction to handle
simple cases of return when no epilogue needs to be printed out.

gcc/ 

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm-protos.h (output_return_instruction): New parameter and
	int to bool change of parameter types.
        * config/arm/arm.c (output_return_instruction): Likewise.
        * config/arm/arm.md (arm_simple_return): New pattern.
        (arm_return, cond_return, cond_return_inverted): Add new arguments.
        * config/arm/thumb2.md (thumb2_return): Update condition and code.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188743 138bc75d-0d04-0410-961f-82ee72b054a4
Generate RTL for return in Thumb2 mode. Used by expand of return insn.

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm-protos.h (thumb2_expand_return): New declaration.
        * config/arm/arm.c (thumb2_expand_return): New function.
        * config/arm/arm.md (return): Update condition and code.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188744 138bc75d-0d04-0410-961f-82ee72b054a4
As a result of the previous changes, epilogue_insns pattern can only be
generated in Thumb1. After removing other cases in define_insn for
epilogue_insns, the function arm_output_epilogue becomes dead code and can
be eliminated, along with all its helper functions.

gcc/

2012-06-18  Ian Bolton  <ian.bolton@arm.com>
            Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <greta.yorsh@arm.com>

        * config/arm/arm-protos.h (arm_output_epilogue): Remove.
        * config/arm/arm.c (print_multi_reg): Remove.
        (vfp_output_fldmd): Likewise.
        (arm_output_epilogue): Likewise.
        * config/arm/arm.md (epilogue_insns): Update condition and code.



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

2012-06-18  Joey Ye <Joey.Ye@arm.com>
            Greta Yorsh  <Greta.Yorsh@arm.com>

        * gcc.target/arm/epilog-1.c: New test.



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

        PR fortran/53526
        * check.c (gfc_check_move_alloc): Reject coindexed actual
        * arguments
        and those with different corank.

2012-06-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/53526
        * gfortran.dg/coarray_27.f90: New.



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

        PR fortran/53526
        * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
        * coarrays.

2012-06-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/53526
        * gfortran.dg/coarray_lib_move_alloc_1.f90: New.



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

        PR fortran/53692
        * trans-array.c (set_loop_bounds): Don't scalarize via absent
        optional arrays.
        * resolve.c (resolve_elemental_actual): Don't stop resolving
        after printing a warning.

2012-06-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/53692
        * gfortran.dg/elemental_optional_args_6.f90: New.



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

        * intrinsic.h (gfc_resolve_rank): New prototype.
        * intrinsic.c (add_functions): Use gfc_resolve_rank.
        * iresolve.c (add_functions): New function.
        * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
        (gfc_conv_intrinsic_function): Call it.



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