* regclass.c (move_table): New type.
(move_cost, may_move_in_cost, may_move_out_cost): Use it.
(init_move_cost): Break out from ...
(init_reg_sets_1): ... here; simplify computation of
have_regs-of_mode and contains_reg_of_mode.
(record_reg_classes): Unswitch internal loops.
(copy_cost): Trigger lazy initialization of move cost
(record_address_regs): Likewise.
From-SVN: r126901
2007-07-24 Daniel Berlin <dberlin@dberlin.org>
* config/darwin.c (darwin_override_options): Don't force on
flag_var_tracking_uninit when no debug info is requested.
From-SVN: r126900
2007-07-24 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/dfp/fe-convert-2.c: Unconditionally enable testing
for converting from 1.0e-96 and 0.00048828125 to _Decimal32.
From-SVN: r126898
2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
PR fortran/32842
* trans-expr.c (gfc_conv_function_call): Remove the default
initialization of intent(out) derived types.
* symbol.c (gfc_lval_expr_from_sym): New function.
* matchexp.c (gfc_get_parentheses): Return argument, if it is
character and posseses a ref.
* gfortran.h : Add prototype for gfc_lval_expr_from_sym.
* resolve.c (has_default_initializer): Move higher up in file.
(resolve_code): On detecting an interface assignment, check
if the rhs and the lhs are the same symbol. If this is so,
enclose the rhs in parenetheses to generate a temporary and
prevent any possible aliasing.
(apply_default_init): Remove code making the lval and call
gfc_lval_expr_from_sym instead.
(resolve_operator): Give a parentheses expression a type-
spec if it has no type.
* trans-decl.c (gfc_trans_deferred_vars): Apply the a default
initializer, if any, to an intent(out) derived type, using
gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
the dummy is present.
2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
* gfortran.dg/alloc_comp_basics_1.f90 : Restore number of
"deallocates" to 24, since patch has code rid of much spurious
code.
* gfortran.dg/interface_assignment_1.f90 : New test.
PR fortran/32842
* gfortran.dg/interface_assignment_2.f90 : New test.
From-SVN: r126886
2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
PR fortran/32842
* trans-expr.c (gfc_conv_function_call): Remove the default
initialization of intent(out) derived types.
* symbol.c (gfc_lval_expr_from_sym): New function.
* matchexp.c (gfc_get_parentheses): Return argument, if it is
character and posseses a ref.
* gfortran.h : Add prototype for gfc_lval_expr_from_sym.
* resolve.c (has_default_initializer): Move higher up in file.
(resolve_code): On detecting an interface assignment, check
if the rhs and the lhs are the same symbol. If this is so,
enclose the rhs in parenetheses to generate a temporary and
prevent any possible aliasing.
(apply_default_init): Remove code making the lval and call
gfc_lval_expr_from_sym instead.
(resolve_operator): Give a parentheses expression a type-
spec if it has no type.
* trans-decl.c (gfc_trans_deferred_vars): Apply the a default
initializer, if any, to an intent(out) derived type, using
gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
the dummy is present.
2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
* gfortran.dg/alloc_comp_basics_1.f90 : Restore number of
"deallocates" to 24, since patch has code rid of much spurious
code.
* gfortran.dg/interface_assignment_1.f90 : New test.
PR fortran/32842
* gfortran.dg/interface_assignment_2.f90 : New test.
From-SVN: r126885
gcc/fortran:
2007-07-24 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32778
* intrinsic.c (add_sym): Do not exclude any symbols, even if not part
of the selected standard.
(make generic): Likewise.
(make alias): Likewise, set standard the alias belongs to.
(add_subroutines): Call make_noreturn unconditionally.
(check_intrinsic_standard): Change return value to try.
(gfc_intrinsic_func_interface): Check return value of above function.
(gfc_intrinsic_sub_interface): Likewise.
gcc/testsuite:
2007-07-24 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32778
* gfortran.dg/imag_2.f: Removed
* gfortran.dg/warn_std_1.f90: New test.
* gfortran.dg/warn_std_2.f90: New test.
* gfortran.dg/warn_std_3.f90: New test.
From-SVN: r126881
2007-07-24 Andreas Krebbel <krebbel1@de.ibm.com>
* tree-ssa-ifcombine.c (ifcombine_ifandif): Use a ONE operand
with the mode of the original operand instead of
integer_one_node.
From-SVN: r126876
2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/30814
* trans-decl.c (generate_function_code): Add argument
for flag_bounds_check to the array for set_options.
* invoke.texi: Mention that some checks require
-fbounds-check to be set during compilation of the
main program.
2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/30814
* libgfortran.h: Add bounds_check to compile_options_t.
* runtime/compile_options.c (set_options): Add handling
of compile_options.bounds_check.
* intrinsics/pack_generic.c (pack_internal): Also determine
the number of elements if compile_options.bounds_check is
true. Raise runtime error if a different array shape is
detected.
2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/30814
* gfortran.dg/pack_bounds_1.f90: New test case.
From-SVN: r126866
* i386.c (ix86_secondary_memory_needed): Break out to...
(inline_secondary_memory_needed): ... here.
(ix86_memory_move_cost): Break out to ...
(inline_memory_move_cost): ... here; add support for IN value of 2 for
maximum of input and output; fix handling of Q_REGS on 64bit.
(ix86_secondary_memory_needed): Microoptimize.
From-SVN: r126861
2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32797
PR fortran/32800
* decl.c (verify_bind_c_sym): Use the result symbol for functions
with a result clause. Warn if implicitly typed. Verify the type
and rank of the SHAPE argument, if given.
* resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
check the actual args against the formal, sorting them if
necessary.
* symbol.c (gen_shape_param): Initialize type of SHAPE param to
BT_VOID.
2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32797
PR fortran/32800
* gfortran.dg/bind_c_usage_8.f03: New test case.
* gfortran.dg/c_f_pointer_tests_2.f03: Ditto.
* gfortran.dg/c_ptr_tests_5.f03: Updated expected error message.
From-SVN: r126856
PR middle-end/PR28690
* optabs.c (expand_binop): (emit_cmp_and_jump_insns): Allow EQ compares.
* rtlanal.c (commutative_operand_precedence): Prefer both REG_POINTER
and MEM_POINTER operands over REG and MEM operands.
(swap_commutative_operands_p): Change return value to bool.
* rtl.h: Update the corresponding prototype.
* tree-ssa-address.c (gen_addr_rtx): Use simplify_gen_binary
instead of gen_rtx_PLUS.
* simplify-rtx.c (simplify_plus_minus_op_data_cmp): Change return
value to bool. Change function arguments to rtx's and update code
to match.
(simplify_plus_minus): Update the simplify_plus_minus_op_data_cmp
calls to match the new declaration.
* simplify-rtx.c (simplify_associative_operation): Don't
reorder simplify_binary_operation arguments.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r126852
gcc/
* config/mips/mips.c (override_options): Use mips_costs to derive
the default branch cost.
* config/mips/mips.h (BRANCH_COST): Use mips_branch_cost rather
than mips_costs.
* config/mips/mips.opt (mbranch-cost=): New option.
* doc/invoke.texi (-mbrach-cost): Document new MIPS option.
gcc/testsuite/
* gcc.target/mips/branch-cost-1.c: New test.
* gcc.target/mips/branch-cost-2.c: Likewise.
From-SVN: r126846
2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32732
* trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
value character dummy args of BIND(C) procedures.
* trans-expr.c (gfc_conv_variable): Do not build address
expression for BT_CHARACTER dummy args.
2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32732
* gfortran.dg/c_char_tests.f03: New test case.
* gfortran.dg/c_char_driver.c: Driver for c_char_tests.f03.
* gfortran.dg/c_char_tests_2.f03: New test case.
* gfortran.dg/value_6.f03: Ditto.
* gfortran.dg/value_7.f03: Ditto.
From-SVN: r126836
cp/
PR c++/32839
* typeck.c (convert_arguments): Only use default args if we have
a function decl.
testsuite/
PR c++/32839
* g++.dg/expr/call4.C: New.
* g++.dg/expr/call5.C: New.
From-SVN: r126829
gcc/fortran:
2007-07-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32710
* parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
the current is a namelist.
gcc/testsuite:
2007-07-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32710
* gfortran.dg/namelist_30.f90: New test.
From-SVN: r126828
2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32627
* resolve.c (set_name_and_label): Set kind number for character
version of c_f_pointer.
(gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
that of the actual SHAPE arg.
* symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32627
* libgfortran/intrinsics/iso_c_generated_procs.c: Add c_f_pointer
for character/string arguments.
* libgfortran/intrinsic/iso_c_binding.c (c_f_pointer_u0): Allow
the optional SHAPE arg to be any valid integer kind.
* libgfortran/gfortran.map: Add c_f_pointer_s0.
* libgfortran/mk-kinds-h.sh: Save smallest integer kind as default
character kind.
* libgfortran/intrinsics/iso_c_generated_procs.c: Add versions of
c_f_pointer for complex and logical types.
* libgfortran/gfortran.map: Add c_f_pointer versions for logical
and complex types.
2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32627
* gfortran.dg/pr32627_driver.c: Driver for pr32627.
* gfortran.dg/pr32627.f03: New test case.
* gfortran.dg/c_f_pointer_logical.f03: New test case.
* gfortran.dg/c_f_pointer_logical_driver.c: Driver for
c_f_pointer_logical.
* gfortran.dg/c_f_pointer_complex_driver.c: Driver for
c_f_pointer_complex.
* gfortran.dg/c_f_pointer_complex.f03: New test case.
* gfortran.dg/c_f_pointer_shape_tests_2_driver.c: Driver for
c_f_pointer_shape_tests_2.
* gfortran.dg/c_f_pointer_shape_tests_2.f03: New test case.
From-SVN: r126817
* optabs.h (enum optab_index): Add new OTI_signbit.
(signbit_optab): Define corresponding macro.
(enum insn_code signbit_optab[]): Remove array.
* optabs.c (init_optabs): Initialize signbit_optab using init_optab.
(expand_copysign_absneg): If back end provides signbit insn, use it
instead of bit operations on floating point argument.
* builtins.c (enum insn_code signbit_optab[]): Remove array.
(expand_builtin_signbit): Check signbit_optab->handlers[].insn_code for
availability of signbit insn.
* config/i386/i386.md (signbit<mode>2): New insn pattern to implement
signbitf, signbit and signbitl built-ins as inline x87 intrinsics when
SSE mode is not active.
(isinf<mode>2): Disable for mfpmath=sse,387.
From-SVN: r126813
2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32801
* symbol.c (generate_isocbinding_symbol): Remove unnecessary
conditional.
PR fortran/32804
* resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
deferred-shape arrays as args to C_LOC. Fix bug in testing
character args to C_LOC.
2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32804
* gfortran.dg/c_loc_tests_9.f03: New test case.
* gfortran.dg/c_loc_tests_10.f03: Ditto.
From-SVN: r126812