2007-08-24 Richard Guenther <rguenther@suse.de>
PR middle-end/33166
* tree-ssa.c (useless_type_conversion_p): Split into a
recursive and a non-recursive part.
(useless_type_conversion_p_1): New function.
* tree-ssa-ccp.c (fold_stmt_r): Make sure that the result
from maybe_fold_offset_to_reference is trivially convertible
to the desired type before doing the simplification.
* gcc.c-torture/compile/pr33166.c: New testcase.
From-SVN: r127771
* expr.c (store_expr): Optimize initialization of an array
with STRING_CST.
* expr.h (builtin_strncpy_read_str): New prototype.
* builtins.c (builtin_strncpy_read_str): Remove prototype.
No longer static.
* gcc.dg/array-init-1.c: New test.
From-SVN: r127769
2007-08-23 Richard Guenther <rguenther@suse.de>
* expr.c (get_inner_reference): Do computation of bitoffset
from offset in a way we can detect overflow reliably.
From-SVN: r127762
PR c++/32567
* typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
error_mark_node right away if build_expr_type_conversion
returned it.
* g++.dg/parse/crash36.C: New test.
From-SVN: r127760
PR tree-optimization/32573
PR middle-end/32946
* tree-data-ref.c (initialize_data_dependence_relation): Clear
DDR_SUBSCRIPTS, DDR_DIR_VECTS and DDR_DIST_VECTS at the beginning.
(finalize_ddr_dependent): Clear DDR_SUBSCRIPTS after freeing it.
(build_classic_dist_vector): Return false rather than true if
DDR_ARE_DEPENDENT is non-NULL at the beginning. Return false
if either subscript_dependence_tester_1 or build_classic_dist_vector_1
returned false. Don't call save_dist_v before calling
build_classic_dist_vector_1.
(free_dependence_relation): Don't guard freeing DDR_SUBSCRIPTS
with NULL DDR_ARE_DEPENDENT. Also free DDR_DIST_VECTS and/or
DDR_DIR_VECTS vectors.
* gcc.dg/pr32573.c: New test.
From-SVN: r127750
PR target/17390
* config/i386/i386.c (ix86_expand_fp_compare): Expand fp comparison to
fake fcomi i387 instruction for !TARGET_CMOVE.
(ix86_expand_branch): Expand natural sequence with one jump for
all targets, not only TARGET_CMOVE.
* config/i386/i386.md (*cmpfp_0_cc): New define_insn_and_split
pattern to implement fake fcomi sequence. Split instruction after
reload to correct compare sequences.
(*cmpfp_xf_cc): Ditto.
(*cmpfp_<mode>_cc): Ditto.
(*cmpfp_u_cc): Ditto.
(*cmpfp_<mode>_cc): Ditto.
testsuite/ChangeLog:
PR target/17390
* gcc.target/i386/pr17390.c: New test.
From-SVN: r127742
PR libfortran/23138
* acinclude.m4 (LIBGFOR_CHECK_MINGW_SNPRINTF): New check.
* configure.ac: Use LIBGFOR_CHECK_MINGW_SNPRINTF.
* libgfortran.h: If HAVE_MINGW_SNPRINTF is true, use __mingw_snprintf
instead of snprintf.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r127739
2007-08-22 Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/32949
* tree-ssa-loop-niter.c (scev_probably_wraps_p): Test nowrap_type_p
before failing for ivs with non-constant step.
From-SVN: r127720
2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/33020
* resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
kind for optional SHAPE parameter of C_F_POINTER.
2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/33020
* gfortran.dg/c_f_pointer_shape_tests_2.f03: Update test to
include multiple kinds for SHAPE parameter within a single
namespace.
* gfortran.dg/c_f_pointer_shape_tests_2_driver.c: Ditto.
* gfortran.dg/c_f_pointer_shape_tests_3.f03: New test case.
From-SVN: r127719
2007-08-22 Janus Weil <jaydub66@gmail.com>
* decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
(gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
(gfc_match_mopdproc): Bugfix to reject module procedures in
abstract interfaces.
2007-08-22 Janus Weil <jaydub66@gmail.com>
* interface_abstract_1.f90: Extended test case.
* interface_abstract_3.f90: New test.
From-SVN: r127718
PR c++/29365
* pt.c (outermost_tinst_level): New function.
* lex.c (in_main_input_context): New function.
* decl2.c (constrain_class_visibility): Use it to avoid warning
about uses of the anonymous namespace in the main input file.
From-SVN: r127711
* doc/libgcc.texi (Decimal float library routines): Fix formatting
and rearrange floating point conversion functions into different
categories.
From-SVN: r127709