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
PR fortran/32823
* trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
arguments passed, not just the first one. Adjust code to refer
to "args[0]" instead of "arg" as a result.
* gfortran.dg/int_2.f90: New test.
From-SVN: r126810
2007-07-20 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_expr): COND_EXPRs can have any
integral typed condition.
* tree-ssa.c (useless_type_conversion_p): Do not preserve
booleanness. Only preserve conversions from a non-base
type to a base type, not in general between types with
different TYPE_MIN_VALUE or TYPE_MAX_VALUE.
* tree.def (COND_EXPR): Document that the condition
can be of any integral type.
From-SVN: r126804
gcc/
2007-07-20 Nigel Stephens <nigel@mips.com>
Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.h (mips_dwarf_regno): Declare.
(DBX_REGISTER_NUMBER): Remove redundant brackets.
(HI_REGNUM, LO_REGNUM): Define in an endian-dependent way.
(AC1HI_REGNUM, AC1LO_REGNUM, AC2HI_REGNUM, AC2LO_REGNUM)
(AC3HI_REGNUM, AC3LO_REGNUM, ACC_HI_REG_P): Delete.
(reg_class): Rename HI_REG to MD0_REG and LO_REG to MD1_REG.
(REG_CLASS_NAMES): Update accordingly.
* config/mips/mips.c (mips_dwarf_regno): New array.
(mips_regno_to_class): Rename HI_REG to MD0_REG and LO_REG to MD1_REG.
(mips_subword): Remove special handling for accumulator registers.
(override_options): Initiailize mips_dwarf_regno. Remove use
of ACC_HI_REG_P.
(mips_swap_registers): New function.
(mips_conditional_register_usage): Swap accumulator registers
around if TARGET_LITTLE_ENDIAN.
(mips_cannot_change_mode_class): Remove special treatment of ACC_REGS.
* config/mips/constraints.md (h, l): Use the endianness to choose
between MD0_REG and MD1_REG.
* config/mips/mips.md (*mfhilo_<mode>_macc): Use a fixed-string,
alternative-dependent template.
Co-Authored-By: Richard Sandiford <richard@codesourcery.com>
From-SVN: r126801
* tree-ssa-loop-niter.c (assert_loop_rolls_lt): Convert the operands
of compare to the same type.
* cfgloopmanip.c (add_loop): Update information about loop exits.
(loop_version): Remove the innermost loop requirement.
* tree-ssa-loop-manip.c (determine_exit_conditions): Convert bounds
to sizetype for pointers.
From-SVN: r126796
2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32801
* symbol.c (generate_isocbinding_symbol): Fix bug where
ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
ISOCBINDING_PTR.
2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32801
* gfortran.dg/pr32801.f03: New test case.
From-SVN: r126732
2007-07-18 Caroline Tice <ctice@apple.com>
* var-tracking.c (find_src_status): Check for COND_EXEC insns
and handle them correctly; check that src is not NULL before
trying to use it.
(find_src_set_src): Likewise.
From-SVN: r126731