PR middle-end/38505
* tree-ssa-ccp.c (may_propagate_address_into_dereference): Return
false if ADDR's operand has incomplete type.
Revert:
2008-12-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/38505
* tree-ssa.c (useless_type_conversion_p_1): Return
false if inner_type is incomplete and outer_type is complete.
From-SVN: r142972
2008-12-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38645
* tree-ssa-ccp.c (fold_gimple_assign): Use the correct pointer
type.
* tree-ssa-dom.c (cprop_operand): Simplify. Do not propagate
volatileness changing operands.
* gcc.dg/pr38645.c: New testcase.
From-SVN: r142967
2008-12-30 Andrew Pinski <pinskia@gmail.com>
PR middle-end/38661
* tree-switch-conversion.c (build_constructors): Test for wrapping of
pos case.
2008-12-30 Andrew Pinski <pinskia@gmail.com>
PR middle-end/38661
* gcc.c-torture/compile/pr38661.c: New testcase.
* gcc.c-torture/compile/pr38661-1.c: New testcase.
From-SVN: r142964
PR middle-end/38584
* ipa-inline.c (compute_inline_parameters): When not optimizing,
don't compute the inline parameters, just set them to 0 instead.
From-SVN: r142963
2008-12-30 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/38572
* tree-vrp.c (vrp_visit_phi_node): Look out for invalid ranges
and change them to VARYING.
From-SVN: r142962
2008-12-30 Richard Guenther <rguenther@suse.de>
PR middle-end/38564
* fold-const.c (fold_comparison): Use the correct result type.
* gcc.c-torture/compile/pr38564.c: New testcase.
From-SVN: r142961
PR tree-optimization/38529
* tree-vect-transform (vect_transform_stmt): Handle inner-loop stmts
whose DEF is used in the loop-nest that is being vectorized, but
outside the immediately enclosing loop.
Co-Authored-By: Ira Rosen <irar@il.ibm.com>
From-SVN: r142959
PR fortran/31832
* acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_POWF): New autoconf check for
broken powf.
* configure.ac (LIBGFOR_CHECK_FOR_BROKEN_POWF): Use it.
* intrinsics/c99_functions.c: Use internal powf implementation if
HAVE_BROKEN_POWF is defined.
* configure: Rebuilt.
* config.h.in: Rebuilt.
From-SVN: r142952
PR c++/38635
* parser.c (cp_parser_condition): Use cp_parser_require
instead of cp_lexer_consume_token to consume =.
* g++.dg/parse/cond4.C: New test.
From-SVN: r142951
PR c++/36191
* tree-complex.c (expand_complex_libcall): Call
maybe_clean_or_replace_eh_stmt and gimple_purge_dead_eh_edges
instead of passing true as 3rd argument to gsi_replace.
* g++.dg/torture/pr36191.C: New test.
From-SVN: r142950
* gcc.c-torture/execute/builtins/fprintf.x: Disable test for
freestanding targets.
* gcc.c-torture/execute/pr37573.x: Disable test for 16-bit targets.
* gcc.c-torture/execute/20081117-1.x: Disable test for 16-bit targets.
* gcc.c-torture/compile/limits-stringlit.c: Disable test for picochip.
* gcc.dg/array-quals-1.c: Disable test for picochip.
* lib/target-supports.exp: Add support for freestanding ports and
disable picochip for profiling tests.
From-SVN: r142948
PR driver/38381
* gcc.c (process_command): Accept also -b with configuration name
in the next argument.
* doc/invoke.texi (-b): Document that no hyphen is required if
configuration name is in the next argument after -b.
From-SVN: r142947
PR middle-end/38633
* tree-cfg.c (replace_block_vars_by_duplicates): Only call
replace_by_duplicate_decl for VAR_DECLs or CONST_DECLs.
* gcc.dg/gomp/pr38633.c: New test.
* g++.dg/gomp/pr38633.C: New test.
From-SVN: r142934
2008-12-23 Andrew Pinski <pinski@gmail.com>
PR middle-end/38590
* fold-const.c (fold_binary): Call fold_convert on arguments to
fold_build2 for negative divide optimization.
2008-12-23 Andrew Pinski <pinskia@gmail.com>
PR middle-end/38590
* gcc.c-torture/compile/pr38590-1.c: New testcase.
* gcc.c-torture/compile/pr38590-2.c: New testcase.
From-SVN: r142906
PR middle-end/31150
* dse.c (struct store_info): Add const_rhs field.
(clear_rhs_from_active_local_stores): Clear also const_rhs.
(record_store): Try also cselib_expand_value_rtx to get a constant.
(find_shift_sequence, get_stored_val): Use const_rhs instead of
rhs if worthwhile.
* cselib.c (cselib_record_sets): If !cselib_record_memory and
there is just one set from read-only MEM, look at REG_EQUAL or
REG_EQUIV note.
* dse.c (struct store_info): Add redundant_reason field.
(record_store): When storing the same constant as has been
stored by an earlier store, set redundant_reason field
to the earlier store's insn_info_t. Don't delete cannot_delete
insns.
(find_shift_sequence): Remove read_info argument, add read_mode
and require_cst arguments. Return early if require_cst and
constant wouldn't be returned.
(get_stored_val): New function.
(replace_read): Use it.
(scan_insn): Put even cannot_delete insns with exactly 1 store
into active_local_stores.
(dse_step1): Don't delete cannot_delete insns. Remove redundant
constant stores if contains_cselib_groups and earlier store storing
the same value hasn't been eliminated.
(dse_step6): Renamed to dse_step7. New function.
(dse_step7): Renamed from dse_step6.
(rest_of_handle_dse): Call dse_step6 and dse_step7 at the end.
* cselib.c (cselib_expand_value_rtx): Don't wrap CONST_INTs
into CONST unless really necessary. Handle SUBREG, unary,
ternary, bitfield and compares specially, to be able to simplify
operations on constants.
(expand_loc): Try to optimize LO_SUM.
* dse.c (get_call_args): New function.
(scan_insn): Don't handle BUILT_IN_BZERO. For memset, attempt
to get call arguments and if successful and both len and val are
constants, handle the call as (mem:BLK) (const_int) store.
* dse.c (struct store_info): Add is_large bool field, change
positions_needed into a union of a bitmask and bitmap + count.
(free_store_info): Free bitmap if is_large.
(set_usage_bits): Don't look at stores where
offset + width >= MAX_OFFSET.
(set_position_unneeded, set_all_positions_unneeded,
any_positions_needed_p, all_positions_needed_p): New static inline
functions.
(record_store): Handle BLKmode stores of CONST_INT, if
MEM_SIZE is set on the MEM. Use the new positions_needed
accessor inlines.
(replace_read): Handle reads from BLKmode CONST_INT stores.
(check_mem_read_rtx): Use all_positions_needed_p function.
(dse_step1): Free large positions_needed bitmaps and clear is_large.
* dse.c (struct store_info): Change begin and end types to
HOST_WIDE_INT.
* dse.c (record_store): Fix check for unused store.
* expr.c (block_clear_fn): No longer static.
* expr.h (block_clear_fn): Declare.
* dse.c (scan_insn): Memset and bzero can just read their
arguments.
* gcc.c-torture/execute/20081218-1.c: New test.
From-SVN: r142892
* config/i386/i386.c (expand_setmem_via_rep_stos): Add ORIG_VALUE
argument. If ORIG_VALUE is const0_rtx and COUNT is constant,
set MEM_SIZE on DESTMEM.
(ix86_expand_setmem): Adjust callers.
PR target/38488
* expr.h (get_mem_align_offset): New prototype.
* emit-rtl.c (get_mem_align_offset): New function.
* config/i386/i386.c (expand_movmem_via_rep_mov): Set MEM_SIZE correctly.
(expand_constant_movmem_prologue, expand_constant_setmem_prologue):
New functions.
(ix86_expand_movmem): Optimize if COUNT_EXP
is constant, desired_align > align and dst & (desired_align - 1)
is computable at compile time.
(ix86_expand_setmem): Likewise.
* builtins.c (get_memory_rtx): Try to derive MEM_ATTRS from not yet
resolved SAVE_EXPR or POINTER_PLUS_EXPR.
From-SVN: r142891
* config/alpha/alpha.h (ASM_OUTPUT_EXTERNAL): New macro.
PR target/34571
* config/alpha/predicates.md (symbolic_operand): Return 1 for a
label_ref with an offset.
From-SVN: r142885
2008-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37472
* io/write_float.def (output_float_FMT_G_): Modify calculation of temp
to avoid sensitivity to round-off.
From-SVN: r142884