* tree-ssa-loop-manip.c (tree_unroll_loop): Make it a wrapper over ...
(tree_transform_and_unroll_loop): New.
* tree-flow.h (transform_callback, tree_transform_and_unroll_loop):
Declare.
From-SVN: r120650
./: * fold-const.c (fold_comparison): Fold comparisons like (x *
1000 < 0) to (x < 0).
testsuite/:
* gcc.dg/fold-compare-2.c: New test case for fold_comparison.
From-SVN: r120649
PR 30381
PR 30420
* fortran/simplify.c (convert_mpz_to_unsigned): New function.
(convert_mpz_to_signed): New function, largely based on
twos_complement().
(twos_complement): Removed.
(gfc_simplify_ibclr): Add conversions to and from an
unsigned representation before bit-twiddling.
(gfc_simplify_ibset): Same.
(gfc_simplify_ishftc): Add checks for overly large
constant arguments, only check the third argument if
it's present, carry over high bits into the result as
appropriate, and perform the final conversion back to
a signed representation using the correct sign bit.
(gfc_simplify_not): Removed unnecessary masking.
* testsuite/gfortran.dg/
* chkbits.f90: Added IBCLR tests; test calls for
different integer kinds.
* ishft.f90: Renamed to ishft_1.f90...
* ishft_1.f90: ...Renamed from ishft.f90.
* ishft_2.f90: New test.
* ishft_3.f90: New test.
From-SVN: r120634
* spu.h (STACK_SAVE_AREA): Use VOIDmode for SAVE_FUNCTION, SImode
for SAVE_NONLOCAL and Pmode for any other save level.
* spu-protos.h (spu_restore_stack_block): Declare.
* spu.md (save_stack_block): Remove.
(restore_stack_block): Call spu_restore_stack_block.
* spu.c (spu_restore_stack_block): New function.
(spu_expand_epilogue): Remove old comment.
Co-Authored-By: Ben Elliston <bje@au.ibm.com>
From-SVN: r120633
2007-01-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30408
* resolve.c (resolve_code): Use the code->expr character length
directly to set length of llen.
2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/30408
* lang.opt: Add Wcharacter_truncation option.
* options.c (gfc_init_options): Initialize
gfc_option.warn_character_truncation to zero.
(gfc_handle_option): Add case for OPT_Wcharacter_truncation.
From-SVN: r120632
PR tree-optimization/30322
* tree-ssa-loop-ivopts.c (fold_affine_expr, iv_value): Removed.
(cand_value_at): Return the value as aff_tree.
(may_eliminate_iv): Convert the bound from aff_tree to tree.
* tree-affine.c (aff_combination_add_cst, aff_combination_add_product,
aff_combination_mult): New functions.
(aff_combination_add): Use aff_combination_add_cst.
(aff_combination_convert): Allow conversions to a wider type.
(tree_to_aff_combination): Handle BIT_NOT_EXPR.
* tree-affine.h (aff_combination_mult): Declare.
* gcc.dg/tree-ssa/loop-21.c: New test.
From-SVN: r120630
gcc/
2007-01-09 Carlos O'Donell <carlos@codesourcery.com>
* doc/tm.texi: Update documentation to reflect reality of exec
and start file search behaviours. Update copyright year.
* doc/invoke.texi: Explain how GCC_EXEC_PREFIX is used to find
header file directories.
From-SVN: r120622
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree.h (build_int_cst_wide_type): Export.
* tree.c (build_int_cst_wide_type): New function.
(build_int_cst_wide): Fix comment.
* builtins.c (fold_builtin_object_size): Use build_int_cst
to build -1 or 0 of the correct type. Use fit_double_type
to check for overflow.
* fold-const.c (optimize_bit_field_compare): Use build_int_cst_type
to build the mask.
(decode_field_reference): Likewise.
(all_ones_mask_p): Likewise.
(native_interpret_int): Use build_int_cst_wide_type.
(fold_binary): Use build_int_cst_type to build an all-ones
value.
* stor-layout.c (set_sizetype): Use build_int_cst_wide_type.
java/
* lex.c (do_java_lex): Use build_int_cst_wide_type.
* jcf-parse.c (get_constant): Likewise.
cp/
* cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
ada/
* cuintp.c (build_cst_from_int): Use built_int_cst_type.
* trans.c (gnat_to_gnu): Likewise.
From-SVN: r120596
* genautomata.c (STATS_OPTION): New option.
(stats_flag): New flag.
(gen_automata_option): Handle it.
(initiate_automaton_gen): Ditto.
(write_automata): Output statistics only if stats_flag is
set. Likewise, output time statistics only if time_flag is set.
* doc/md.texi (Processor pipeline description): Document new flag.
From-SVN: r120594
2007-01-08 Richard Guenther <rguenther@suse.de>
* builtins.c (fold_builtin_int_roundingfn): Use fit_double_type.
* tree.c (build_int_cst_type): Likewise.
(size_in_bytes): Don't call force_fit_type on the result.
(int_fits_type_p): Use fit_double_type.
* fold-const.c (fit_double_type): New function.
(force_fit_type): Use it.
* tree.h (fit_double_type): Export.
From-SVN: r120593
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use type
of offset to build the index.
* tree-pretty-print.c (dump_generic_node): Don't build negated
const just for printing.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
* builtins.c (fold_builtin_int_roundingfn): Check if result
fits the type by using force_fit_type and comparing the result.
* predict.c (predict_loops): Use compare_tree_int for comparison.
* tree.c (build_int_cst): Fall back to integer_type_node for
NULL_TREE type.
(build_int_cst_wide): Assert type is non-null.
fortran/
* trans-io.c (transfer_array_desc): Use build_int_cst instead
of build_int_cstu.
From-SVN: r120586
* trans-array.c (constant_array_constructor_p): New function to
determine whether an array constructor consists only of constant
elements, and if so return it's size.
(gfc_build_constant_array_constructor): Construct a statically
initialized gfortran array for a given EXPR_ARRAY.
(gfc_trans_constant_array_constructor): Efficiently scalarize
a constant array constructor.
(gfc_trans_array_constructor): Tidy up use of CONST_STRING.
Special case scalarization of constant array constructors, all of
whose elements are specified, using constant_array_constructor_p
and gfc_trans_constant_array_constructor.
(gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
before adding it to index, to avoid creating a NON_LVALUE_EXPR.
* gfortran.dg/array_constructor_14.f90: New test case.
* gfortran.dg/vect/vect-5.f90: Update test for improved alignment.
From-SVN: r120584