PR tree-optimization/50133
* tree-vect-stmts.c (vect_finish_stmt_generation): Copy location
from stmt instead of some statement around gsi.
* gcc.dg/pr50133.c: New test.
From-SVN: r177958
PR middle-end/50141
* expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if
innerdecl is a VAR_DECL.
* c-c++-common/cxxbitfields-6.c: New test.
From-SVN: r177957
2011-08-22 Richard Guenther <rguenther@suse.de>
PR testsuite/50145
* gcc.dg/torture/pr50067-1.c: Run on little-endian systems only.
* gcc.dg/torture/pr50067-2.c: Likewise.
From-SVN: r177952
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47659
* expr.c (gfc_check_assign): Check for type conversions when the
right-hand side is a constant REAL/COMPLEX contstant the left-hand
side is also REAL/COMPLEX. Don't warn when a narrowing conversion
for REAL does not change the value of the constant.
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47659
* gfortran.dg/warn_conversion_2.f90: Also warn about conversion
of a constant resulting from simplification.
* gfortran.dg/warn_conversion_3.f90: New test.
From-SVN: r177942
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50130
* resolve.c (resolve_array_ref): Don't calculate upper bound
if the stride is zero.
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50130
* gfortran.dg/zero_stride_1.f90: New test.
From-SVN: r177940
2011-08-20 Vladimir Makarov <vmakarov@redhat.com>
* ira-lives.c (mark_pseudo_regno_subword_live): Use allocno class
for ira_reg_class_max_nregs. Increase pressure by 1.
(mark_pseudo_regno_subword_dead): Use allocno class
for ira_reg_class_max_nregs.
From-SVN: r177939
gcc/
* config/mips/mips.c (mips_class_max_nregs): Check that the mode is
OK for ST_REGS and FP_REGS before taking those classes into account.
From-SVN: r177931
PR tree-optimization/48739
* tree-ssa.c: Include cfgloop.h.
(execute_update_addresses_taken): When updating ssa, if in
loop closed SSA form, call rewrite_into_loop_closed_ssa instead of
update_ssa.
* Makefile.in (tree-ssa.o): Depend on $(CFGLOOP_H).
* gcc.dg/pr48739-1.c: New test.
* gcc.dg/pr48739-2.c: New test.
From-SVN: r177924
2011-08-19 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/49936
* ira.c (ira_init_register_move_cost): Ignore too small subclasses
for calculation of max register move costs.
From-SVN: r177916
gcc/
2011-08-19 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/49721
* explow.c (convert_memory_address_addr_space): Also permute the
conversion and addition of constant for zero-extend.
gcc/testsuite/
2011-08-19 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/49721
* gfortran.dg/pr49721-1.f: New.
* gfortran.fortran-torture/compile/pr49721-1.f: Likewise.
From-SVN: r177914
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* tree-ssa-math-opts.c (is_widening_mult_rhs_p): Handle constants
beyond conversions.
(convert_mult_to_widen): Convert constant inputs to the right type.
(convert_plusminus_to_widen): Don't automatically reject inputs that
are not an SSA_NAME.
Convert constant inputs to the right type.
gcc/testsuite/
* gcc.target/arm/wmul-11.c: New file.
* gcc.target/arm/wmul-12.c: New file.
* gcc.target/arm/wmul-13.c: New file.
From-SVN: r177910
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* tree-ssa-math-opts.c (is_widening_mult_rhs_p): Add new argument
'type'.
Use 'type' from caller, not inferred from 'rhs'.
Don't reject non-conversion statements. Do return lhs in this case.
(is_widening_mult_p): Add new argument 'type'.
Use 'type' from caller, not inferred from 'stmt'.
Pass type to is_widening_mult_rhs_p.
(convert_mult_to_widen): Pass type to is_widening_mult_p.
(convert_plusminus_to_widen): Likewise.
gcc/testsuite/
* gcc.target/arm/wmul-8.c: New file.
From-SVN: r177907
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* tree-ssa-math-opts.c (is_widening_mult_p): Remove FIXME.
Ensure the the larger type is the first operand.
gcc/testsuite/
* gcc.target/arm/wmul-7.c: New file.
From-SVN: r177906
2011-08-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50067
* tree-data-ref.c (dr_analyze_indices): Simplify, strip MEM_REF
offset only if we accounted for it.
From-SVN: r177903
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/arm/arm.md (maddhidi4): Remove '*' from name.
* expr.c (expand_expr_real_2): Use find_widening_optab_handler.
* optabs.c (find_widening_optab_handler_and_mode): New function.
(expand_widen_pattern_expr): Use find_widening_optab_handler.
(expand_binop_directly): Likewise.
(expand_binop): Likewise.
* optabs.h (find_widening_optab_handler): New macro define.
(find_widening_optab_handler_and_mode): New prototype.
* tree-cfg.c (verify_gimple_assign_binary): Adjust WIDEN_MULT_EXPR
type precision rules.
(verify_gimple_assign_ternary): Likewise for WIDEN_MULT_PLUS_EXPR.
* tree-ssa-math-opts.c (build_and_insert_cast): New function.
(is_widening_mult_rhs_p): Allow widening by more than one mode.
Explicitly disallow mis-matched input types.
(convert_mult_to_widen): Use find_widening_optab_handler, and cast
input types to fit the new handler.
(convert_plusminus_to_widen): Likewise.
gcc/testsuite/
* gcc.target/arm/wmul-bitfield-1.c: New file.
From-SVN: r177902
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* expr.c (expand_expr_real_2): Use widening_optab_handler.
* genopinit.c (optabs): Use set_widening_optab_handler for $N.
(gen_insn): $N now means $a must be wider than $b, not consecutive.
* optabs.c (widened_mode): New function.
(expand_widen_pattern_expr): Use widening_optab_handler.
(expand_binop_directly): Likewise.
(expand_binop): Likewise.
* optabs.h (widening_optab_handlers): New struct.
(optab_d): New member, 'widening'.
(widening_optab_handler): New function.
(set_widening_optab_handler): New function.
* tree-ssa-math-opts.c (convert_mult_to_widen): Use
widening_optab_handler.
(convert_plusminus_to_widen): Likewise.
From-SVN: r177901
PR fortran/49792
* trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
lhs needs reallocation.
* trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
code is NULL, emit a barrier if workshare emitted no code at all
and NOWAIT clause isn't present.
* testsuite/libgomp.fortran/pr49792-1.f90: New test.
* testsuite/libgomp.fortran/pr49792-2.f90: New test.
From-SVN: r177898