2011-06-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/48699
* check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
make sure the vtab is present.
2011-06-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/48699
* gfortran.dg/move_alloc_5.f90: New.
From-SVN: r175151
2011-06-17 Daniel Carrera <dcarrera@gmail.com>
* caf/single.c (_gfortran_caf_register): Store the address
of all static coarrays in a linked list.
(_gfortran_caf_finalize): Free memory of staic coarrays.
* caf/mpi.c (_gfortran_caf_register): Store the address
of all static coarrays in a linked list. Initialize MPI
if necessary.
(_gfortran_caf_finalize): Free memory of staic coarrays.
(_gfortran_caf_init): Check if MPI is already initialized
before initializing again.
* caf/libcaf.h: Add a type to caf_register_t to distinguish
static coarrays and add the type caf_static_t to make the
linked list of static coarrays.
From-SVN: r175124
PR c++/44160
* parser.c (cp_parser_lambda_body): Share code between
simple and complex cases instead of using cp_parser_function_body.
From-SVN: r175123
* tree-ssa-threadupdate.c (struct redirection_data): New field
intermediate_edge.
(THREAD_TARGET2): Define.
(redirection_data_eq): Also check that the intermediate edge is
equal.
(lookup_redirection_data): Drop useless argument. Extract the
outgoing_edge and intermediate edge from E. Callers updated.
(copy_phi_args, update_destination_phis): New functions.
(fix_duplicate_block_edges): Likewise.
(create_edge_and_update_destination_phis): Duplicate all the edges
hung off e->aux. Use copy_phi_args.
(create_duplicates): Use fix_duplicate_block_edges.
(fixup_template_block): Likewise.
(redirect_edges): If necessary, redirect the joiner block's incoming
edge to the duplicate of the joiner block.
(thread_block): Don't muck up loops when threading through a joiner
block.
(thread_through_loop_header): Handle threading through a joiner
block.
(mark_threaded_blocks, register_jump_thread): Likewise.
* tree-flow.h (register_jump_thread): Add new argument. Callers
updated.
* tree-ssa-threadedge.c (phi_args_equal_on_edges): New function.
(thread_across_edge): Handle threading through a joiner block.
* gcc.dg/builtin-object-size-1.c: Update to handle changes from
improved jump threading.
* gcc.dg/builtin-object-size-2.c: Likewise.
* gcc.dg/tree-ssa/20030728-1.c: Likewise.
From-SVN: r175114
2011-06-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/49074
* interface.c (gfc_extend_assign): Propagate the locus from the
assignment to the type-bound procedure call.
2011-06-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/49074
* gfortran.dg/typebound_assignment_3.f03: New.
From-SVN: r175113
2011-06-16 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/49343
* tree-sra.c (build_ref_for_model): Use component_ref_field_offset to
calculate offset, provide 2nd operand for the new COMPONENT_REF.
* testsuite/gnat.dg/discr31.adb: New test.
* testsuite/gnat.dg/discr31.ads: Likewise.
From-SVN: r175111
* tree-vectorizer.h (vect_recog_func_ptr): Change the first
argument to be a VEC of statements.
* tree-vect-loop.c (vect_determine_vectorization_factor):
Remove the assert that pattern statements have to have their
vector type set.
* tree-vect-patterns.c (vect_recog_widen_sum_pattern):
Change the first argument to be a VEC of statements. Update
documentation.
(vect_recog_dot_prod_pattern, vect_recog_pow_pattern): Likewise.
(vect_handle_widen_mult_by_const): New function.
(vect_recog_widen_mult_pattern): Change the first argument to
be a VEC of statements. Update documentation. Check that the
constant is INTEGER_CST. Support multiplication by a constant
that fits an intermediate type - call
vect_handle_widen_mult_by_const.
(vect_pattern_recog_1): Update vect_recog_func_ptr and its
call. Handle additional pattern statements if necessary.
From-SVN: r175102
2011-06-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/49417
* module.c (mio_component): Make sure the 'class_ok' attribute is set
for use-associated CLASS components.
* parse.c (parse_derived): Check for 'class_ok' attribute.
* resolve.c (resolve_fl_derived): Ditto.
2011-06-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/49417
* gfortran.dg/class_43.f03: New.
From-SVN: r175101
PR target/49427
* config.gcc: Set cpu_type to v850 for any V850 architecture.
(v850*-*-*): Delete explicit setting of tm_p_file, tmake_file,
md_file, extra_modes, out_file and extra_options are these are all
deduced from cpu_type.
From-SVN: r175100
gcc/
PR target/49313
PR target/29524
* longlong.h: Add AVR support:
(count_leading_zeros): New macro.
(count_trailing_zeros): New macro.
(COUNT_LEADING_ZEROS_0): New macro.
* config/avr/t-avr (LIB1ASMFUNCS): Add
_ffssi2, _ffshi2, _loop_ffsqi2,
_ctzsi2, _ctzhi2, _clzdi2, _clzsi2, _clzhi2,
_paritydi2, _paritysi2, _parityhi2,
_popcounthi2,_popcountsi2, _popcountdi2, _popcountqi2,
_bswapsi2, _bswapdi2,
_ashldi3, _ashrdi3, _lshrdi3
(LIB2FUNCS_EXCLUDE): Add _clz.
* config/avr/libgcc.S (XCALL): Move up in file.
(XJMP): New C Macro.
(DEFUN): New asm macro.
(ENDF): New asm macro.
(__ffssi2): New function.
(__ffshi2): New function.
(__loop_ffsqi2): New function.
(__ctzsi2): New function.
(__ctzhi2): New function.
(__clzdi2): New function.
(__clzsi2): New function.
(__clzhi2): New function.
(__paritydi2): New function.
(__paritysi2): New function.
(__parityhi2): New function.
(__popcounthi2): New function.
(__popcountsi2): New function.
(__popcountdi2): New function.
(__popcountqi2): New function.
(__bswapsi2): New function.
(__bswapdi2): New function.
(__ashldi3): New function.
(__ashrdi3): New function.
(__lshrdi3): New function.
Fix suspicous lines.
libgcc/
PR target/49313
PR target/29524
* config/avr/t-avr: Fix line endings.
(intfuncs16): Remove _ffsXX2, _clzXX2, _ctzXX2, _popcountXX2,
_parityXX2.
From-SVN: r175097
2011-06-16 Richard Guenther <rguenther@suse.de>
* gimple.c (canonicalize_cond_expr_cond): (bool)x is not
the same as x != 0.
* fold-const.c (fold_binary_loc): Do not fold X & 1 != 0 to
(bool) X & 1.
* ipa-prop.c (ipa_analyze_indirect_call_uses): Also allow
equality compares against zero for the lower bit.
From-SVN: r175096
2011-06-13 Edmar Wienskoski <edmar@freescale.com>
PR target/44618
* config/rs6000/rs6000.md (save_gpregs_<mode>): Replaced pattern
with a set of similar patterns, where the MATCH_OPERAND for the
function argument is replaced with individual references to hardware
registers.
(save_fpregs_<mode>): Ditto
(restore_gpregs_<mode>): Ditto
(return_and_restore_gpregs_<mode>): Ditto
(return_and_restore_fpregs_<mode>): Ditto
(return_and_restore_fpregs_aix_<mode>): Ditto
* gcc.target/powerpc/outofline_rnreg.c: New testcase.
From-SVN: r175093
2011-06-15 Richard Guenther <rguenther@suse.de>
* expr.c (expand_expr_real_2): Reduce all integral types to
bitfield precision.
(expand_expr_real_1): Likewise.
From-SVN: r175078