2007-07-15 Andrew Haley <aph@redhat.com>
* unwind-sjlj.c (_Unwind_GetIPInfo): Check for context->fc !=
NULL before looking in the context.
From-SVN: r126658
2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32611
* gfortran.h (gfc_option_t): Add flag_sign_zero field.
* lang.opt (-fsign-zero): New option.
* trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
* trans-decl.c (gfc_build_builtin_function_decls): Build the function
declaration to pass an array containing the options to be used by the
runtime library. (gfc_generate_function_code): Build an array that
contains option values to be passed to the runtime library and the call
to the function.
* options.c (gfc_init_options): Initialize the flag_sign_zero field.
(gfc_handle_option): Handle the -fsign-zero option.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r126655
2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32611
* runtime/compile_options.c (set_std): Remove.
(set_options): New function.
(init_compile_options): Add initialization for -fsign-zero option.
* gfortran.map (GFORTRAN_1.0): Rename _gfortran_set_std into
_gfortran_set_options.
* libgfortran.h (compile_options_t): Add sign_zero field.
* io/write.c (output_float): Use the sign bit of the value to determine
if a negative sign should be emitted for zero values. Do not emit the
negative sign for zero if -fno-sign-zero was set during compile.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r126654
2007-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/32752
* io/unix.c (unix_stream): Move buffer pointer adjacent to small_buffer.
* io/transfer.c (formatted_transfer_scalar): If stream I/O, set
bytes_used to zero. Fix off by one error in calculation of pos and
skips. Eliminate duplicate pending_spaces check.
From-SVN: r126652
PR fortran/32357
* iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
to C int.
* intrinsics/mvbits.c: Change prototype so that FROMPOS, LEN and
TOPOS arguments are C int.
* gfortran.dg/mvbits_2.f90: New test.
From-SVN: r126646
2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32731
* iresolve.c(gfc_resolve_pack): A scalar mask has
to be kind=4, an array mask with kind<4 is converted
to gfc_default_logical_kind automatically.
(gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
if it has a kind<4.
2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32731
* gfortran.dg/pack_mask_1.f90: New test.
* gfortran.dg/unpack_mask_1.f90: New test.
From-SVN: r126644
* lib/target-supports.exp (check_effective_target_vect_aligned_arrays):
New procedure to check if arrays are naturally aligned to the vector
alignment boundary.
* gcc.dg/vect/pr25413a.c: Do not include stdarg.h. Use __SIZE_TYPE__
in size_t typedef. Adjust tree dump scan results according to
vect_aligned_arrays target check.
* gcc.dg/vect/pr25413.c: Adjust tree dump scan results according to
vect_aligned_arrays target check.
* gcc.dg/vect/pr31699.c: Ditto.
From-SVN: r126636
Add ability to track uninitialized variables, and mark uninitialized
variables in the Dwarf debug info. Controlled by compile option
-fvar-tracking-uninit
From-SVN: r126630
2007-07-13 Sa Liu <saliu@de.ibm.com>
* config.gcc: Add options for arch and tune on SPU.
* config/spu/predicates.md: Add constant operands 0 and 1.
* config/spu/spu-builtins.def: Add builtins for double precision
floating point comparison: si_dfceq, si_dfcmeq, si_dfcgt, si_dfcmgt,
si_dftsv, spu_cmpeq_13, spu_cmpabseq_1, spu_cmpgt_13, spu_cmpabsgt_1,
spu_testsv.
* config/spu/spu-c.c: Define __SPU_EDP__ when builtins invoked with
a CELLEDP target.
* config/spu/spu-protos.h: Add new function prototypes.
* config/spu/spu.c (spu_override_options): Check options -march and
-mtune.
(spu_comp_icode): Add comparison code for DFmode and vector mode.
(spu_emit_branch_or_set): Use the new code for DFmode and vector
mode comparison.
(spu_const_from_int): New. Create a vector constant from 4 ints.
(get_vec_cmp_insn): New. Get insn index of vector compare instruction.
(spu_emit_vector_compare): New. Emit vector compare.
(spu_emit_vector_cond_expr): New. Emit vector conditional expression.
* config/spu/spu.h: Add options -march and -mtune. Define processor
types PROCESSOR_CELL and PROCESSOR_CELLEDP. Define macro
CANONICALIZE_COMPARISON.
* config/spu/spu.md: Add new insns for double precision compare
and double precision vector compare. Add vcond and smax/smin patterns
to enable DFmode vector conditional expression.
* config/spu/spu.opt: Add options -march and -mtune.
* config/spu/spu_internals.h: Add builtins for CELLEDP target:
si_dfceq, si_dfcmeq, si_dfcgt, si_dfcmgt, si_dftsv. Add builtin for
both CELL and CELLEDP targets: spu_testsv.
* config/spu/spu_intrinsics.h: Add flag mnemonics for test special
values.
testsuite/
* gcc.dg/vect/fast-math-vect-reduc-7.c: Switch on test
for V2DFmode vector conditional expression.
* gcc.target/spu/dfcmeq.c: New. Test combination of abs
and dfceq patterns.
* gcc.target/spu/dfcmgt.c: New. Test combination of abs
and dfcgt patterns.
* gcc.target/spu/intrinsics-2.c: New. Test intrinsics for
V2DFmode comparison and test special values.
* lib/target-supports.exp: Switch on test for V2DFmode
vector conditional expression.
From-SVN: r126626
2007-07-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/32721
* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Preserve
TREE_THIS_VOLATILE on the folded reference.
* tree-ssa-operands.c (get_expr_operands): Set has_volatile_ops
if the array reference has TREE_THIS_VOLATILE set.
* gcc.dg/pr32721.c: New testcase.
From-SVN: r126624
2007-07-13 Andrew Haley <aph@redhat.com>
* libgcj.ver: Add __gcj_personality_sj0.
* testsuite/libjava.jvmti/jvmti-interp.exp: Likewise.
* testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise.
* gnu/classpath/natVMStackWalker.cc (getCallingClassLoader): Check
klass is non-null.
* java/lang/reflect/natField.cc (getAddr): Call
_Jv_StackTrace::GetCallingClass only if CALLER is non-null.
* java/lang/reflect/natVMProxy.cc (run_proxy): Use
_Jv_getFieldInternal to get field proxyClass.m.
(_Jv_getFieldInternal): New function.
From-SVN: r126623
2007-07-13 Andrew Haley <aph@redhat.com>
* libgcj.ver: Add __gcj_personality_sj0.
* testsuite/libjava.jvmti/jvmti-interp.exp: Likewise.
* testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise.
* gnu/classpath/natVMStackWalker.cc (getCallingClassLoader): Check
klass is non-null.
* java/lang/reflect/natField.cc (getAddr): Call
_Jv_StackTrace::GetCallingClass only if CALLER is non-null.
* java/lang/reflect/natVMProxy.cc (run_proxy): Use
_Jv_getFieldInternal to get field proxyClass.m.
(_Jv_getFieldInternal): New function.
2007-07-11 Andrew Haley <aph@redhat.com>
* configure.host (arm*-linux-gnu): New.
* sysdep/arm/locks.h: New.
From-SVN: r126622
gcc/fortran:
2007-07-12 Daniel Franke <franke.daniel@gmail.com>
PR fortran/31639
* decl.c (gfc_match_suffix): Removed surplus general error that hides
a more specific message.
* resolve.c (resolve_fl_variable): Reject illegal initializiers only
if not already done.
(resolve_fl_procedure): Added check for initializers of functions.
gcc/testsuite:
2007-07-12 Daniel Franke <franke.daniel@gmail.com>
PR fortran/31639
* gfortran.dg/func_decl_4.f90: New test.
From-SVN: r126605
2007-07-12 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (thumb1_compute_save_reg_mask): Make sure scratch
reg does not overlap return value.
From-SVN: r126604
2007-07-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32634
PR fortran/32727
* module.c (write_generic): Restore patch of 2007-07-10 and use
symbol name if there are no use names.
2007-07-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32727
* gfortran.dg/interface_17.f90: New test.
From-SVN: r126600
2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32599
* decl.c (verify_c_interop_param): Require character string dummy
args to BIND(C) procedures to have length 1.
* resolve.c (resolve_fl_procedure): Modify parameter checking for
BIND(C) procedures.
PR fortran/32601
* resolve.c (gfc_iso_c_func_interface): Verify that a valid
expression is given as an argument to C_LOC and C_ASSOCIATED.
* trans-io.c (transfer_expr): Add argument for code block. Add
standards check to determine if an error message should be
reported for printing C_PTR or C_FUNPTR.
(transfer_array_component): Update arguments to transfer_expr.
(gfc_trans_transfer): Ditto.
* symbol.c (gen_cptr_param): Fix whitespace.
2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32599
* gfortran.dg/32599.f03: New test case.
PR fortran/32601
* gfortran.dg/32601.f03: New test case.
* gfortran.dg/32601_1.f03: Ditto.
* gfortran.dg/c_ptr_tests_9.f03: Updated dg-options.
* gfortran.dg/c_ptr_tests_10.f03: Ditto.
From-SVN: r126598