gcc/ChangeLog:
* tree-ssa-uninit.c (find_uninit_use): Declare and pass to
is_use_properly_guarded the variable def_preds. Free its
contents before returning.
(prune_uninit_phi_opnds_in_unrealizable_paths): Same.
(is_use_properly_guarded): Replace local variable def_preds with
a parameter. Adjust accordingly. Only update *def_preds if it's
the empty vector.
From-SVN: r226511
PR c/67088
* c-decl.c (check_bitfield_type_and_width): Add location parameter.
Use it.
(grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
* gcc.dg/pr67088.c: New test.
From-SVN: r226506
2015-08-03 Richard Biener <rguenther@suse.de>
* genmatch.c (simplify::for_subst_vec): New member.
(binary_ok): New helper for for lowering.
(lower_for): Delay substituting operators into result expressions
if we can merge the results eventually again.
(capture_info::walk_result): Adjust for user_id appearing as
result expression operator.
(expr::gen_transform): Likewise.
(dt_simplify::gen_1): Likewise.
(dt_simplify::gen): Pass not substituted operators to tail
functions or initialize local variable with it.
(decision_tree::gen): Adjust function signature.
* match.pd: Fix tests against global code and add default
cases to switch stmts.
From-SVN: r226505
2015-08-03 Richard Biener <rguenther@suse.de>
* genmatch.c (simplify::for_subst_vec): New member.
(binary_ok): New helper for for lowering.
(lower_for): Delay substituting operators into result expressions
if we can merge the results eventually again.
(capture_info::walk_result): Adjust for user_id appearing as
result expression operator.
(expr::gen_transform): Likewise.
(dt_simplify::gen_1): Likewise.
(dt_simplify::gen): Pass not substituted operators to tail
functions or initialize local variable with it.
(decision_tree::gen): Adjust function signature.
* match.pd: Fix tests against global code and add default
cases to switch stmts.
From-SVN: r226504
gcc/ChangeLog:
* configure.ac: Set aliasing_flags to -fno-strict-aliasing if
the host compiler is affected by placement new aliasing bug.
* configure: Regenerate.
* Makefile.in (ALIASING_FLAGS): New variable.
(ALL_CXXFLAGS): Add $(ALIASING_FLAGS).
From-SVN: r226499
* ifcvt.c (noce_try_store_flag_constants): Make logic of the case
when diff == STORE_FLAG_VALUE or diff == -STORE_FLAG_VALUE more
explicit. Prefer to add the flag whenever possible.
(noce_process_if_block): Try noce_try_store_flag_constants before
noce_try_cmove.
* gcc.target/aarch64/csel_bfx_1.c: New test.
* gcc.target/aarch64/csel_imms_inc_1.c: Likewise.
From-SVN: r226491
2015-08-03 Richard Biener <rguenther@suse.de>
* genmatch.c (struct sinfo, struct sinfo_hashmap_traits, sinfo_map_t):
New hash-map to record equivalent transforms.
(dt_node::analyze): Populate the equivalent transforms hash-map.
(dt_simplify::info): Add reference to hash-map entry.
(dt_simplify::gen): If we have split out a function for the
transform, generate a call to it.
(sinfo_hashmap_traits::hash): New function.
(compare_op): New helper function for ...
(sinfo_hashmap_traits::equal_keys): ... this new function.
(decision_tree::gen): Split out common equivalent transforms
into functions.
From-SVN: r226490
2015-08-03 Richard Biener <rguenther@suse.de>
* gimple-match-head.c (gimple_simplify): For [VEC_]COND_EXPRs
on the rhs of assignments first simplify the embedded
GENERIC condition.
From-SVN: r226488
2015-08-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/66917
* tree-vectorizer.h (struct dataref_aux): Add base_element_aligned
field.
(DR_VECT_AUX): New macro.
(set_dr_misalignment): Adjust.
(dr_misalignment): Likewise.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
Compute whether the base is at least element aligned.
* tree-vect-stmts.c (ensure_base_align): Adjust.
(vectorizable_store): If the base is not element aligned
preserve alignment of the original access if misalignment is unknown.
(vectorizable_load): Likewise.
From-SVN: r226487
gcc/ChangeLog
2015-07-28 Martin Sebor <msebor@redhat.com>
* c-family/c.opt (-Wframe-address): New warning option.
* doc/invoke.texi (Wframe-address): Document it.
* doc/extend.texi (__builtin_frame_address, __builtin_return_address):
Clarify possible effects of calling the functions with non-zero
arguments and mention -Wframe-address.
* builtins.c (expand_builtin_frame_address): Handle -Wframe-address.
gcc/testsuite/ChangeLog
2015-07-28 Martin Sebor <msebor@redhat.com>
* g++.dg/Wframe-address-in-Wall.C: New test.
* g++.dg/Wframe-address.C: New test.
* g++.dg/Wno-frame-address.C: New test.
* gcc.dg/Wframe-address-in-Wall.c: New test.
* gcc.dg/Wframe-address.c: New test.
* gcc.dg/Wno-frame-address.c: New test.
From-SVN: r226480
gcc/c-family/ChangeLog:
* c-indentation.c (get_visual_column): Add parameter first_nws,
use it. Update comment documenting the function.
(is_first_nonwhitespace_on_line): Remove.
(should_warn_for_misleading_indentation): Replace usage of
of is_first_nonwhitespace_on_line with get_visual_column.
From-SVN: r226478
gcc/c-family/ChangeLog:
* c-indentation.h (struct token_indent_info): Define.
(get_token_indent_info): Define.
(warn_for_misleading_information): Declare.
* c-common.h (warn_for_misleading_information): Remove.
* c-identation.c (warn_for_misleading_indentation):
Change declaration to take three token_indent_infos. Adjust
accordingly.
* c-identation.c (should_warn_for_misleading_indentation):
Likewise. Bail out early if the body is a compound statement.
(guard_tinfo_to_string): Define.
gcc/c/ChangeLog:
* c-parser.c (c_parser_if_body): Take token_indent_info
argument. Call warn_for_misleading_indentation even when the
body is a semicolon. Extract token_indent_infos corresponding
to the guard, body and next tokens. Adjust call to
warn_for_misleading_indentation accordingly.
(c_parser_else_body): Likewise.
(c_parser_if_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
gcc/cp/ChangeLog:
* parser.c (cp_parser_selection_statement): Move handling of
semicolon body to ...
(cp_parser_implicitly_scoped_statement): .. here. Call
warn_for_misleading_indentation even when the body is a
semicolon. Extract token_indent_infos corresponding to the
guard, body and next tokens. Adjust call to
warn_for_misleading_indentation accordingly. Take
token_indent_info argument.
(cp_parser_already_scoped_statement): Likewise.
(cp_parser_selection_statement, cp_parser_iteration_statement):
Extract a token_indent_info corresponding to the guard token.
From-SVN: r226477
Fix PR 66521
libvtv/ChangeLog
2015-08-01 Caroline Tice <cmtice@google.com>
PR 66521
* Makefile.am: Update to match latest tree.
* Makefile.in: Regenerate.
* testsuite/lib/libvtv: Brought up to date.
* vtv_malloc.cc (VTV_DEBUG): Update function call to match renamed
function (old bug!).
* vtv_rts.cc (debug_functions, debug_init, debug_verify_vtable): Update
initializations to work correctly with VTV_DEBUG defined.
gcc/ChangeLog:
2015-08-01 Caroline Tice <cmtice@google.com>
PR 66521
* vtable-verify.c (vtbl_mangled_name_types, vtbl_mangled_name_ids): New
global variables.
(vtbl_find_mangled_name): New function.
(vtbl_register_mangled_name): New function.
(vtbl_map_get_node): If DECL_ASSEMBLER_NAME is "<anon>", look up
mangled name in mangled name vectors.
(find_or_create_vtbl_map_node): Ditto.
(var_is_used_for_virtual_call_p): Add recursion_depth parameter;
update recursion_depth on function entry; pass it to every recursive
call; automatically exit if depth > 25 (give up looking at that point).
(verify_bb_vtables): Initialize recursion_depth and pass it to
var_is_used_for_virtual_call_p.
* vtable-verify.h (vtbl_mangbled_name_types, vtbl_mangled_name_ids): New
global variable decls.
(vtbl_register_mangled_name): New extern function decl.
gcc/cp/ChangeLog:
2015-08-01 Caroline Tice <cmtice@google.com>
PR 66521
* mangle.c : Add vtable-verify.h to include files.
(get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
is "<anon>" get the real mangled name for the class instead, and
also store the real mangled name in a vector for use later.
From-SVN: r226471
2015-08-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67091
* trans-intrinsic.c (gfc_conv_associated): Add the pre and post
blocks for the second argument to se.
2015-08-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67091
* gfortran.dg/associated_target_6.f03: New test
From-SVN: r226464
Errors reported from malformed builtin calls are handled in a later
pass than the one in which they are detected. If a malformed builtin
call is lowered into an error expression too early, these errors will
never be reported.
Fixesgolang/go#11561.
Reviewed-on: https://go-review.googlesource.com/12778
From-SVN: r226459
Function declarations don't create a block where the variables listed
in the parameter list are declared. Because there are no variables
declared, the types of the parameter variables is unchecked, allowing
for invalid values to be used as the type. This patch adds a special
case to the check_types pass for function declarations.
Fixesgolang/go#11567.
Reviewed-on: https://go-review.googlesource.com/12662
From-SVN: r226456
2015-07-31 Richard Biener <rguenther@suse.de>
* fold-const.c (fold_binary_loc): Remove X ^ C1 == C2
-> X == (C1 ^ C2) which is already implemented in match.pd.
Remove redundant dispatching to fold_relational_const.
Move unordered self and NaN compares ...
* match.pd: ... as patterns here. Remove some stray captures
and add a comment.
From-SVN: r226434
2015-07-31 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/66846
* omp-low.c (expand_omp_taskreg) [ENABLE_CHECKING]: Call
verify_loop_structure for child_cfun if !LOOPS_NEED_FIXUP.
(expand_omp_target) [ENABLE_CHECKING]: Same.
(execute_expand_omp) [ENABLE_CHECKING]: Call verify_loop_structure for
cfun if !LOOPS_NEED_FIXUP.
(expand_omp_for_static_nochunk): Handle simple latch bb. Handle case
that omp_for already has its own loop struct.
* tree-parloops.c (create_phi_for_local_result)
(create_call_for_reduction): Handle simple latch bb.
(create_parallel_loop): Add simple latch bb to preserve
LOOPS_HAVE_SIMPLE_LATCHES. Record new exit. Handle simple latch bb.
(gen_parallel_loop): Remove call to cancel_loop_tree.
(parallelize_loops): Skip loops that are inner loops of parallelized
loops.
(pass_parallelize_loops::execute) [ENABLE_CHECKING]: Call
verify_loop_structure.
From-SVN: r226427