2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
* trans-array.c (gfc_trans_constant_array_constructor): Remove
superfluous initialisation of DIM field.
(gfc_trans_array_constructor): Assert that DIMEN field is properly set.
(gfc_conv_expr_descriptor): Ditto.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
From-SVN: r178698
gcc/
* c-decl.c (lookup_name): Use the new
maybe_record_typedef_use.
(pushdecl): Use the new
record_locally_defined_typedef.
(store_parm_decls): Allocate cfun->language.
(finish_function): Use the new maybe_warn_unused_local_typedefs,
and free cfun->language.
(c_push_function_context): Allocate cfun->language here only if
needed.
(c_pop_function_context): Likewise, mark cfun->language
for collection only when it should be done.
* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
nodes.
* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
maybe_record_local_typedef_use.
gcc/c-family
* c-common.h (struct c_language_function::local_typedefs): New
field.
(record_locally_defined_typedef, maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Declare new functions.
* c-common.c (record_locally_defined_typedef)
(maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Define new functions.
* c.opt: Declare new -Wunused-local-typedefs flag.
gcc/cp
* name-lookup.c (pushdecl_maybe_friend_1): Use the new
record_locally_defined_typedef.
* decl.c (finish_function): Use the new
maybe_warn_unused_local_typedefs.
(grokfield): Use the new record_locally_defined_typedef.
* parser.c (lookup_name): Use the new maybe_record_typedef_use.
gcc/doc/
* invoke.texi: Update documentation for -Wunused-local-typedefs.
gcc/testsuite/
* g++.dg/warn/Wunused-local-typedefs.C: New test file.
* c-c++-common/Wunused-local-typedefs.c: Likewise.
libstdc++-v3/
* include/ext/bitmap_allocator.h
(__detail::__mini_vector::__lower_bound): Remove unused typedef.
* src/istream.cc (std::operator>>(basic_istream<char>& __in,
basic_string<char>& __str)): Likewise.
(std::getline): Likewise.
* src/valarray.cc (__valarray_product): Likewise.
From-SVN: r178692
2011-09-08 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/50287
* ipa-split.c (split_function): Do not create SSA names for
non-gimple-registers.
* testsuite/gcc.dg/torture/pr50287.c: New test.
From-SVN: r178688
2011-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831
* tree-ssa-dce.c (mark_all_reaching_defs_necessary_1): Also
skip builtins with vdefs that do not really store something.
(propagate_necessity): For calls to free that we can associate
with an allocation function do not mark the freed pointer
definition necessary.
(eliminate_unnecessary_stmts): Remove a call to free if
the associated call to an allocation function is not necessary.
* gcc.dg/tree-ssa/pr19831-1.c: New testcase.
* gcc.dg/tree-ssa/pr19831-2.c: Likewise.
* gcc.dg/tree-ssa/pr19831-3.c: Likewise.
* gcc.dg/errno-1.c: Adjust.
From-SVN: r178687
2011-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Do not mark
allocation functions as necessary.
* gcc.dg/tree-ssa/ssa-dce-8.c: New testcase.
From-SVN: r178683
PR target/50310
* config/i386/i386.c (ix86_prepare_sse_fp_compare_args): Return
code early if TARGET_AVX.
(ix86_expand_fp_vcond): Handle LTGT and UNEQ.
* gcc.c-torture/execute/ieee/pr50310.c: New test.
* gcc.dg/pr50310-2.c: New test.
From-SVN: r178673
* bb-reorder.c (insert_section_boundary_note): Don't check
optimize_function_for_speed_p.
(gate_handle_partition_blocks): Do it here instead.
(gate_handle_reorder_blocks): Move preliminary checks here ...
(rest_of_handle_reorder_blocks): ... from here.
From-SVN: r178657
* regrename.c (struct du_head): Make nregs signed.
(closed_chains): Remove.
(create_new_chain): Return the new chain.
(chain_from_id): New static function.
(dump_def_use_chain): Change argument to be an int, indicating
the first ID to print. All callers changed.
(merge_overlapping_regs): Use chain_from_id. Assert that
chains don't conflict with themselves.
(rename_chains): Take no argument. Iterate over id_to_chain
rather to find chains to rename. Clear tick before the main
loop.
(struct incoming_reg_info): New struct.
(struct bb_rename_info): New struct.
(init_rename_info, set_incoming_from_chain, merge_chains): New
static functions.
(regrename_analyze): New static function, broken out of
regrename_optimize. Record and make use of open chain information
at basic block boundaries, and merge chains where possible.
(scan_rtx_reg): Make this_nregs signed. Don't update
closed_chains.
(build_def_use): Return a bool to indicate success. All callers
changed. Don't initialize global data here.
(regrename_optimize): Move most code out of here into
regrename_analyze.
* regs.h (add_range_to_hard_reg_set, remove_range_from_hard_reg_set,
range_overlaps_hard_reg_set_p, range_in_hard_reg_set_p): New
static inline functions.
* vec.h (FOR_EACH_VEC_ELT_FROM): New macro.
From-SVN: r178645
2011-09-07 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/49911
* tree-sra.c (analyze_access_subtree): Change type of to-be-replaced
enumerations to the corresponding plain integer type.
* testsuite/g++.dg/tree-ssa/pr49911.C: New test.
From-SVN: r178639
2011-09-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50319
* tree-if-conv.c (set_bb_predicate): Assert we only set
canonical predicates.
(add_to_predicate_list): Simplify. Allow TRUTH_NOT_EXPR
around canonical predicates.
(predicate_bbs): Do not re-gimplify already canonical
predicates. Properly unshare them though.
(find_phi_replacement_condition): Simplify.
From-SVN: r178638
gcc/
PR target/49030
* config/arm/arm-protos.h (maybe_get_arm_condition_code): Declare.
* config/arm/arm.c (maybe_get_arm_condition_code): New function,
reusing the old code from get_arm_condition_code. Return ARM_NV
for invalid comparison codes.
(get_arm_condition_code): Redefine in terms of
maybe_get_arm_condition_code.
* config/arm/predicates.md (arm_comparison_operator): Use
maybe_get_arm_condition_code.
gcc/testsuite/
PR target/49030
* gcc.dg/torture/pr49030.c: New test.
From-SVN: r178636
gcc:
* config/rs6000/rs6000.c (compute_save_world_info): Test
cfun->has_nonlocal_label to determine if the out-of-line save
world call may be used.
ada:
* gcc-interface/Makefile.in (darwin): Provide powerpc64 system
implementation.
* system-darwin-ppc64.ads: New file.
From-SVN: r178630
2011-09-06 François Dumont <fdumont@gcc.gnu.org>
Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/hashtable_policy.h (_Prime_rehash_policy::
_M_next_bkt): Cast _M_max_load_factor to long double.
(_Prime_rehash_policy::_M_bkt_for_elements): Use _M_next_bkt.
(_Prime_rehash_policy::_M_need_rehash): Likewise; cast all
float quantities to long double.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r178615