1. 10 Jan, 2007 9 commits
    • function.c (get_last_funcdef_no): New function. · 3e87758a
      2007-01-10  Razya Ladelsky  <razya@il.ibm.com>
      
              * function.c (get_last_funcdef_no): New function.
              * function.h (get_last_funcdef_no): Declare.
              * tree-inline.c (initialize_cfun): Add initialization.
              (tree_function_versioning): Cleanup.
      
      From-SVN: r120638
      Razya Ladelsky committed
    • tree-inline.c (setup_one_parameter): Do not propagate into abnormal PHIs. · 9b718f81
      	* tree-inline.c (setup_one_parameter): Do not propagate into abnormal
      	PHIs.
      
      From-SVN: r120637
      Jan Hubicka committed
    • simplify.c (gfc_simplify_ibclr): Fix POS comparison. · 3775c3dc
      * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
      (gfc_simplify_ibset): Same.
      
      From-SVN: r120636
      Brooks Moses committed
    • re PR fortran/30381 ([4.1 only] ISHFTC() constant folding is broken.) · f1dcb9bf
      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
      Brooks Moses committed
    • spu.h (STACK_SAVE_AREA): Use VOIDmode for SAVE_FUNCTION... · e1f1d97f
      	* 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
      Sa Liu committed
    • [multiple changes] · 0b30ba3b
      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
      Jerry DeLisle committed
    • * gfortran.dg/altreturn_2.f90: Removed executable bit. · c49a1f9e
      From-SVN: r120631
      Brooks Moses committed
    • re PR middle-end/30322 (((-i-1) + i) +1) is turned into ~i + (i+1) and never… · 7e2ac86c
      re PR middle-end/30322 (((-i-1) + i) +1) is turned into ~i + (i+1) and never into 0 on the tree level)
      
      	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
      Zdenek Dvorak committed
    • Daily bump. · 92c25b55
      From-SVN: r120628
      GCC Administrator committed
  2. 09 Jan, 2007 12 commits
  3. 08 Jan, 2007 19 commits
    • tree.h (force_fit_type_double): Export. · b8fca551
      2007-01-08  Richard Guenther  <rguenther@suse.de>
      
      	* tree.h (force_fit_type_double): Export.
      	(force_fit_type): Remove.
      	* fold-const.c (force_fit_type_double): New function.
      	(force_fit_type): Remove.
      	(int_const_binop): Use it.
      	(fold_convert_const_int_from_int): Likewise.
      	(fold_convert_const_int_from_real): Likewise.
      	(fold_div_compare): Likewise.
      	(fold_sign_changed_comparison): Likewise.
      	(fold_unary): Likewise.
      	(fold_negate_const): Likewise.
      	(fold_abs_const): Likewise. 
      	(fold_not_const): Likewise.
      	* c-common.c (shorten_compare): Use force_fit_type_double.
      	* convert.c (convert_to_pointer): Likewise.
      
      From-SVN: r120597
      Richard Guenther committed
    • tree.h (build_int_cst_wide_type): Export. · 2ac7cbb5
      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
      Richard Guenther committed
    • * config/pa/t-pa64 (libgcc_stub.a): Use $(T). · 1c61ff29
      From-SVN: r120595
      Daniel Jacobowitz committed
    • genautomata.c (STATS_OPTION): New option. · df1133a6
      	* 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
      Ben Elliston committed
    • builtins.c (fold_builtin_int_roundingfn): Use fit_double_type. · 2b60792f
      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
      Richard Guenther committed
    • * MAINTAINERS: Add myself as i386 maintainer. · 61fcaeef
      From-SVN: r120592
      Jan Hubicka committed
    • * MAINTAINERS: Add myself as build system maintainer. · a36aee1a
      From-SVN: r120591
      Jan Hubicka committed
    • * ipa.c (function_and_variable_visibility): Fix return type. · 4e260309
      From-SVN: r120590
      Jan Hubicka committed
    • overflow-warn-1.C: Fix testcase. · 8444a5de
      2007-01-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      testsuite/
      	* g++.dg/warn/overflow-warn-1.C: Fix testcase.
      	* g++.dg/warn/overflow-warn-3.C: Likewise.
      	* g++.dg/warn/overflow-warn-4.C: Likewise.
      	* g++.dg/warn/overflow-warn-5.C: Likewise.
      	* g++.dg/warn/overflow-warn-6.C: Likewise.
      	* g++.dg/warn/Woverflow-1.C: Likewise.
      	* g++.dg/warn/Woverflow-2.C: Likewise.
      	* g++.dg/warn/Woverflow-3.C: Likewise.
      	* g++.dg/warn/multiple-overflow-warn-2.C: Likewise.
      
      From-SVN: r120588
      Manuel López-Ibáñez committed
    • interface.c, [...]: Update Copyright years. · b251af97
      2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
      
          * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
          iresolve.c, match.c:  Update Copyright years.  Whitespace.
      
      From-SVN: r120587
      Steven G. Kargl committed
    • tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use type of offset to build the index. · 7fb41a42
      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
      Richard Guenther committed
    • * configure.in: Add support for an x86_64-mingw* target. · 738a52d3
      From-SVN: r120585
      Kai Tietz committed
    • trans-array.c (constant_array_constructor_p): New function to determine whether… · 62511fb1
      trans-array.c (constant_array_constructor_p): New function to determine whether an array constructor consists only of...
      
      
      	* 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
      Roger Sayle committed
    • Better handling of COND_EXPRs in rhs · f255541f
      From-SVN: r120581
      Roberto Costa committed
    • tree-ssa-forwprop.c (forward_propagate_into_cond, [...]): Release defs of propagated statement. · feb8476a
      	* tree-ssa-forwprop.c (forward_propagate_into_cond,
      	tree_ssa_forward_propagate_single_use_va): Release defs of propagated
      	statement.
      
      From-SVN: r120580
      Jan Hubicka committed
    • re PR tree-optimization/23603 (VRP does not say range for a in a = b == c; is [0,1]) · 31ab1cc9
      2007-01-08  Richard Guenther  <rguenther@suse.de>
      
              PR tree-optimization/23603
              * tree-vrp.c (set_value_range_to_truthvalue): New function.
              (extract_range_from_binary): Fall back to truthvalue instead of
              varying for TRUTH_*_EXPR.
              (extract_range_from_comparison): Fall back to truthvalue instead of
              varying.
              (vrp_visit_phi_node): Don't adjust new range bounds to +INF/-INF
              if all visited PHI values were constant.
      
              * gcc.dg/tree-ssa/vrp31.c: New testcase.
              * gcc.dg/tree-ssa/vrp32.c: Likewise.
      
      From-SVN: r120578
      Richard Guenther committed
    • cgraphunit.c (cgraph_process_new_functions): Reset reachable flag. · 151e6f24
      
      	* cgraphunit.c (cgraph_process_new_functions): Reset reachable flag.
      	(cgraph_analyze_function): break out from ...
      	(cgraph_finalize_compilation_unit): ... here.
      	(cgraph_expand_function): Remove forgoten commented out line.
      	(cgraph_optimize): Analyze functions.
      
      From-SVN: r120577
      Jan Hubicka committed
    • tree-pas.h (TODO_remove_function): New flag. · f4b3ca72
      
      	* tree-pas.h (TODO_remove_function): New flag.
      	(TODO_update*): Renumber.
      	(pass_ipa_increase_alignment,
      	pass_ipa_function_and_variable_visibility): New passes.
      	* cgraphunit.c (cgraph_increase_alignment): Move to tree-vectorizer.c
      	(cgraph_function_and_variable_visibility): Move to ipa.c
      	(cgraph_optimize): Don't call cgraph_function_and_variable_visibility,
      	cgraph_increase_alignment.
      	* ipa-inline.c (cgraph_decide_inlining): Don't push timevar.
      	(cgraph_decide_inlining_incrementally): Push TV_INTEGRATION before
      	calling tree-inline.
      	(cgraph_early_inlining): Do not call cgraph_remove_unreachable_nodes.
      	(pass_ipa_inline, pass_early_ipa_inlining): Set TODO_remove_functions
      	* tree-vectorizer.c (increase_alignment): Move here from cgraphunit.c
      	(gate_increase_alignment): New function.
      	(pass_ipa_increase_alignment): New pass.
      	* ipa.c: Inline tree-pass.h and timevar.h
      	(function_and_variable_visibility): Move here from cgraphunit.c
      	* tree-optimize.c (pass_early_local_passes): Add TODO_remove_functions.
      	* passes.c (init_optimization_passes): Add the two new passes.
      	(execute_todo): Handle cgraph_remove_functions.
      
      From-SVN: r120576
      Jan Hubicka committed