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
2007-07-19 Christoph von Wittich <Christoph_vW@reactos.org>
Danny Smith <dannysmith@users.sourceforge.net>
PR/other 30335
* config/i386/host-mingw32.c (mingw32_gt_pch_use_address): Put
file mapping object in local namespace if Windows version later
than NT4
Co-Authored-By: Danny Smith <dannysmith@users.sourceforge.net>
From-SVN: r126719
* parse.y: Change copyright header to refer to version 3 of the GNU
General Public License and to point readers at the COPYING3 file.
* lex.l: Likewise.
* lang.opt: Likewise.
* lang-specs.h: Likewise.
* treelang.h: Likewise.
* config-lang.in: Likewise.
* tree-convert.c: Likewise.
* treetree.c: Likewise.
* tree1.c: Likewise.
* Make-lang.in: Likewise.
* treetree.h: Likewise.
* spec.c: Likewise.
From-SVN: r126713
2007-07-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31320
PR fortran/32665
* trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
renormalization unity base is done independently of existing
lbound value.
(gfc_trans_scalar_assign): If rhs is not a variable, put
lse->pre after rse->pre to ensure that de-allocation of lhs
occurs after evaluation of rhs.
2007-07-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31320
PR fortran/32665
* gfortran.dg/alloc_comp_constructor_3.f90: New test.
From-SVN: r126703
* COPYING_v3: New file. Contains version 3 of the GNU General Public License.
* COPYING.LIB_v3: New file. Contains version 3 of the GNU Lesser General Public License.
* gpl_v3.texi: New file. Contains a texinfo formated copy of the GNU General Public License, version 3.
From-SVN: r126701
PR rtl-optimization/32773
* cfglayout.c (force_one_exit_fallthru): New function.
(cfg_layout_finalize): Use it.
* gcc.dg/pr32773.c: New test.
From-SVN: r126700
2007-07-16 Andrew Pinski <andrew_pinski@playstation.sony.com>
* gcc.target/spu/intrinsics-1.c: Use dg-message to
match flax-vector-conversions note.
* gcc.target/spu/fixed-range-bad.c: Use dg-warning
instead of dg-error for the warning.
From-SVN: r126699