/cp
2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51421
* decl2.c (mark_used): Consistently return false after errors
about uses before deduction of auto.
* semantics.c (finish_id_expression): Check mark_used return
value and return error_mark_node in case of failure.
/testsuite
2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51421
* g++.dg/cpp0x/auto34.C: New.
From-SVN: r190665
* pt.c (tsubst_default_argument): Indicate where the default
argument is being instantiated for.
(tsubst_expr): Restore previous location.
(tsubst_copy_and_build): Set and restore location.
* call.c (build_new_method_call_1): Remember location of call.
* semantics.c (finish_call_expr): Here too.
* parser.c (cp_parser_omp_for_loop): Remember the location of the
increment expression.
From-SVN: r190662
PR c/54355
* c-decl.c (c_parser_label): Pass true as nested and fix up comments
for nested and empty_ok arguments in the call to
c_parser_declaration_or_fndef.
* gcc.dg/pr54355.c: New test.
From-SVN: r190656
* plugin-api.h (ld_plugin_allow_unique_segment_for_sections):
New interface.
(ld_plugin_unique_segment_for_sections): New interface.
(LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
(LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
(tv_allow_unique_segment_for_sections): New member.
(tv_unique_segment_for_sections): New member.
From-SVN: r190654
2012-08-24 Martin Jambor <mjambor@suse.cz>
* predict.c (maybe_hot_frequency_p): New parameter fun. Use its decl
instead of current_function_decl, use profile_status_for_function and
ENTRY_BLOCK_PTR_FOR_FUNCTION with fun instead of their cfun variants.
(maybe_hot_count_p): New parameter fun, use
profile_status_for_function instead of its cfun_variant.
(maybe_hot_bb_p): New parameter fun, checking-assert it, pass it to
all callees.
(maybe_hot_edge_p): Pass cfun to maybe_hot_count_p and
maybe_hot_frequency_p.
(probably_never_executed_bb_p): New parameter fun, use its decl
instead of current_function_decl.
(optimize_bb_for_size_p): Pass cfun to maybe_hot_bb_p.
(rtl_profile_for_bb): Likewise.
(compute_function_frequency): Pass cfun to maybe_hot_bb_p and
probably_never_executed_bb_p.
* tree-ssa-operands.c (ssa_operands_active): New operator fun. Use it
instead of cfun.
(update_stmt_operands): Pass cfun as an argument of
ssa_operands_active.
(swap_tree_operands): Likewise.
* gimple-iterator.c (update_modified_stmt): Likewise.
(update_modified_stmts): Likewise.
* tree-flow-inline.h (delink_stmt_imm_use): Likewise.
* tree-ssa.c (delete_tree_ssa): Likewise.
* bb-reorder.c (bb_to_key): Pass cfun to probably_never_executed_bb_p.
(push_to_next_round_p): Likewise.
(find_rarely_executed_basic_blocks_and_crossing_edges ): Likewise.
* cfg.c: Inlude tree.h.
(check_bb_profile): Use profile_status_for_function,
EXIT_BLOCK_PTR_FOR_FUNCTION and ENTRY_BLOCK_PTR_FOR_FUNCTION with
DECL_STRUCT_FUNCTION (current_function_decl) instead of their cfun
variants.
(dump_bb_info): Pass DECL_STRUCT_FUNCTION (current_function_decl) to
maybe_hot_bb_p and probably_never_executed_bb_p.
* gimple-pretty-print.c (gimple_dump_bb_buff): Checking-assert that
DECL_STRUCT_FUNCTION (current_function_decl) is not NULL. Pass it to
dump_histograms_for_stmt.
(dump_gimple_mem_ops): Pass DECL_STRUCT_FUNCTION (current_function_decl)
as an argument to dump_gimple_mem_ops.
* tree-cfg.c (dump_function_to_file): Rename parameter fn to fndecl.
Do not change cfun. Change and restore current_function_decl.
* Makefile.in (cfg.o): Include TREE_H in dependencies.
From-SVN: r190645
* Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out
LIB2FUNCS_EXCLUDE before adding them to libgcc-objects,
libgcc-s-objects.
* fixed-obj.mk: Only expand dependency if $o is not in
LIB2FUNCS_EXCLUDE.
From-SVN: r190624
/cp
2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/20420
* name-lookup.c (supplement_binding_1): Handle specially enums
only in class templates.
(validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
using declarations at function scope.
/testsuite
2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/20420
* g++.dg/lookup/using53.C: New.
From-SVN: r190618
PR target/54089
* config/sh/predicates (p27_rshift_count_operand,
not_p27_rshift_count_operand): New predicates.
* config/sh/sh.c (sh_ashlsi_clobbers_t_reg_p,
sh_lshrsi_clobbers_t_reg_p, sh_dynamicalize_shift_p): Handle special
case when shift amount is 31.
(gen_ashift): Emit gen_shlr instead of gen_lshrsi3_m.
* config/sh/sh.md (ashlsi3_d): Set type to 'dyn_shift' instead
of 'arith'.
(ashlsi_c): Rename to shll. Adapt calls to gen_ashlsi_c throughout
the file.
(lshrsi3): Remove clobber from expander. Use shift_count_operand
instead of nonmemory_operand predicate for second operand. Add
handling of case lshrsi3_n_clobbers_t.
(lshrsi3_k): Use p27_rshift_count_operand for second operand.
(lshrsi3_d): Make insn_and_split. Split dynamic shift to constant
shift sequences if beneficial.
(lshrsi3_n): Make insn_and_split. Split constant shift sequence to
dynamic shift if beneficial.
(lshrsi3_n_clobbers_t): New insn_and_split.
(lshrsi3_m): Delete.
PR target/54089
* gcc.target/sh/pr54089-2.c: New.
From-SVN: r190603
* tracer.c (mark_bb_seen): Use SBITMAP_SIZE.
* alias.c (MAX_ALIAS_LOOP_PASSES): Update comment with rationale,
or rather a lack thereof.
(init_alias_analysis): Propagate the latest information across
the CFG in topological order to propagate as far as possible in
each iteration. Ignore debug insns.
From-SVN: r190602
2012-08-22 Richard Guenther <rguenther@suse.de>
* tree-vectorizer.c (vectorize_loops): Do not call
mark_virtual_operands_for_renaming.
* tree-vect-slp.c (vect_slp_transform_bb): Likewise.
Do not update SSA form here.
From-SVN: r190596
While working on something else, I noticed that debug_tree (vec), when
vec is a TREE_VEC was crashing because TREE_NOTHROW was asserting that
its argument is not a TREE_VEC, so print_node would crash.
It turned out that TREE_NOTHROW was accidentally modified by this
change set:
commit 87d8f7b67c
Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Aug 21 10:03:38 2012 +0000
2012-08-21 Richard Guenther <rguenther@suse.de>
cp/
* cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
(ATTR_IS_DEPENDENT): Likewise.
(ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
TREE_LANG_FLAG_0 on TREE_VECs.
* tree.h (struct tree_base): Add union to make it possible to
re-use the upper 4 bytes for tree codes that do not need as
many flags as others. Move visited and default_def_flag to
common bits section in exchange for saturating_flag and
unsigned_flag. Add SSA name version and tree vec length
fields here.
(struct tree_vec): Remove length field here.
(struct tree_ssa_name): Remove version field here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190558 138bc75d-0d04-0410-961f-82ee72b054a4
Richard Guenther pre-approved the reverting of the TREE_NOTHROW change
line.
Tested on x86_64-unknown-linux-gnu against master and applied to
trunk.
gcc/
* tree.h (TREE_NOTHROW): Use the base.nothrow_flag.
From-SVN: r190595
2012-08-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46590
* tree-ssa-alias.h (get_continuation_for_phi): Add alias query
counter output argument.
(walk_non_aliased_vuses): Add alias query counter argument
to the walker callback.
* tree-ssa-alias.c (maybe_skip_until): Add alias query counter
output argument and count alias queries.
(get_continuation_for_phi_1): Likewise.
(get_continuation_for_phi): Likewise.
(walk_non_aliased_vuses): Add alias query counter argument
to the walker callback and allow it to abort the walk by
returning -1.
* tree-ssa-pre.c (translate_vuse_through_block): Adjust.
* tree-ssa-sccvn.c (vn_reference_lookup_2): Add alias query
counter parmeter, abort walk if that is bigger than
--param sccvn-max-alias-queries-per-access.
* params.def (sccvn-max-alias-queries-per-access): New param.
* doc/invoke.texi (sccvn-max-alias-queries-per-access): Document.
From-SVN: r190594
* tree-vect-loop.c (vect_transform_loop): Initialize
check_profitability to false.
* tree-predcom.c (try_combine_chains): Free the worklist vector
at the end.
From-SVN: r190592