1. 19 Nov, 2013 34 commits
    • string_view (_S_max_size): Remove. · 660dca79
      2013-11-19  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* include/experimental/string_view (_S_max_size): Remove.
      	(basic_string_view<>::max_size): Adjust.
      	* testsuite/experimental/string_view/capacity/1.cc: Clean-up.
      	* testsuite/experimental/string_view/inserters/pod/10081-out.cc:
      	Likewise.
      
      From-SVN: r205033
      Paolo Carlini committed
    • cfgloop.h (struct loop_iterator): C++-ify, add constructor and destructor and… · f0bd40b1
      cfgloop.h (struct loop_iterator): C++-ify, add constructor and destructor and make fel_next a member function.
      
      2013-11-19  Richard Biener  <rguenther@suse.de>
      
      	* cfgloop.h (struct loop_iterator): C++-ify, add constructor
      	and destructor and make fel_next a member function.
      	(fel_next): Transform into ...
      	(loop_iterator::next): ... this.
      	(fel_init): Transform into ...
      	(loop_iterator::loop_iterator): ... this.
      	(loop_iterator::~loop_iterator): New.
      	(FOR_EACH_LOOP): Remove loop-iterator argument.
      	(FOR_EACH_LOOP_BREAK): Remove no longer necessary macro.
      	* cfgloop.c, cfgloopmanip.c, config/mn10300/mn10300.c,
      	graphite-clast-to-gimple.c, graphite-scop-detection.c,
      	graphite-sese-to-poly.c, ipa-inline-analysis.c, ipa-pure-const.c,
      	loop-init.c, loop-invariant.c, loop-unroll.c, loop-unswitch.c,
      	modulo-sched.c, predict.c, sel-sched-ir.c, tree-cfg.c, tree-data-ref.c,
      	tree-if-conv.c, tree-loop-distribution.c, tree-parloops.c,
      	tree-predcom.c, tree-scalar-evolution.c, tree-ssa-dce.c,
      	tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
      	tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
      	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
      	tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vrp.c: Adjust
      	uses of FOR_EACH_LOOP and remove loop_iterator variables.  Replace
      	FOR_EACH_LOOP_BREAK with break.
      
      From-SVN: r205032
      Richard Biener committed
    • runtime: Update for change to libbacktrace library. · 92495ff6
      From-SVN: r205031
      Ian Lance Taylor committed
    • re PR tree-optimization/59164 (ice: tree check: expected tree that contains… · 47c32082
      re PR tree-optimization/59164 (ice: tree check: expected tree that contains ‘decl minimal’ structure, have ‘integer_cst’ in get_var_info, at tree-into-ssa.c:380)
      
      2013-11-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/59164
      	* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
      	Uncomment assert.
      	* tree-vect-loop.c (vect_analyze_loop_operations): Adjust
      	check whether we can create an epilogue loop to reflect the
      	cases where we create one.
      
      	* gcc.dg/torture/pr59164.c: New testcase.
      
      From-SVN: r205030
      Richard Biener committed
    • backtrace.h (backtrace_syminfo_callback): Add symsize argument. · 1f96a712
      	* backtrace.h (backtrace_syminfo_callback): Add symsize argument.
      	* elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
      	last argument.
      	* btest.c (struct symdata): Add size field.
      	(callback_three): Add symsize argument.  Copy it to the data->size
      	field.
      	(f23): Set symdata.size to 0.
      	(test5): Likewise.  If sizeof (int) > 1, lookup address of
      	((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
      	values.
      
      From-SVN: r205028
      Jakub Jelinek committed
    • graphite-sese-to-poly.c: Include expr.h. · e4effef7
      	* graphite-sese-to-poly.c: Include expr.h.
      
      From-SVN: r205027
      Andrew MacLeod committed
    • re PR middle-end/58956 (wrong code at -O1 and above (affecting gcc 4.6 to trunk)) · 7d07de0b
      2013-11-19  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/58956
      	* tree-ssa-ter.c (find_replaceable_in_bb): Avoid forwarding
      	loads into stmts that may clobber it.
      
      	* gcc.dg/torture/pr58956.c: New testcase.
      
      From-SVN: r205026
      Richard Biener committed
    • Small cleanups in cgraph. · b4d05578
      	* cgraphunit.c (symtab_terminator): New variable.
      	(queued_nodes): Renamed from first.  Use symtab_terminator as
      	initializer.
      	(analyze_functions): Adjust accordingly.
      	(cgraph_process_new_functions): Return void.
      	* cgraph.h (cgraph_process_new_functions): Adjust declaration.
      
      From-SVN: r205024
      Bernd Schmidt committed
    • Factor unrelated declarations out of tree.h. · d8a2d370
      This patch applies the rule that functions defined in FOO.c must be
      declared in FOO.h. One of the worst offenders in the code base is
      tree.h, unsurprisingly.
      
      The patch creates several new headers: attribs.h calls.h fold-const.h
      gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h
      tree-nested.h tree-object-size.h varasm.h.
      
      Functions in each corresponding .c file got moved to those headers and
      others that already existed. I wanted to make this patch as mechanical
      as possible, so I made no attempt to fix problems like having
      build_addr defined in tree-inline.c. I left that for later.
      
      There were some declarations that I could not move out of tree.h
      because of header poisoning or the use of target macros. We forbid the
      inclusion of things like expr.h from FE files. While that's a
      reasonable idea, the FE file *still* manage to at expr.c functionality
      because the declarations they want to use were defined in tree.h.
      
      The affected files are builtins.h, emit-rtl.h and expr.h.
      
      If that functionality is allowed to be accessed from the FEs,
      then I will later move those functions out of expr.c into tree.c.
      I have moved these declarations to the bottom of tree.h so they
      are easy to identify later.
      
      There is a namespace collision with libcpp. The file gcc/symtab.c
      cannot use gcc/symtab.h because the #include command picks up
      libcpp/include/symtab.h first. So I named this file gcc-symtab.h
      for now.
      
      Finally, I added a new header to PLUGIN_HEADERS to account for the
      tree.h refactoring. I did not add all headers factored out of tree.h
      because it is unclear (and impossible to tell) what plugins need.
      This adds the one header used by the plugins in the testsuite.
      
      This will be changing quite dramatically as we progress with the header
      refactoring.
      
      This patch should offer some minimal incremental build advantages
      by reducing the size of tree.h. Changes that would otherwise
      affected tree.h, will now go to other headers which are less
      frequently included.
      
      	* tree.h: Include fold-const.h.
      	(aggregate_value_p): Moved to function.h.
      	(alloca_call_p): Moved to calls.h.
      	(allocate_struct_function): Moved to function.h.
      	(apply_tm_attr): Moved to attribs.h.
      	(array_at_struct_end_p): Moved to expr.h.
      	(array_ref_element_size): Moved to tree-dfa.h.
      	(array_ref_low_bound): Moved to tree-dfa.h.
      	(array_ref_up_bound): Moved to tree.h.
      	(assemble_alias): Moved to cgraph.h.
      	(bit_from_pos): Moved to stor-layout.h.
      	(build_addr): Moved to tree-nested.h.
      	(build_duplicate_type): Moved to tree-inline.h.
      	(build_fold_addr_expr): Moved to fold-const.h.
      	(build_fold_addr_expr_with_type): Moved to fold-const.h.
      	(build_fold_addr_expr_with_type_loc): Moved to fold-const.h.
      	(build_fold_indirect_ref): Moved to fold-const.h.
      	(build_fold_indirect_ref_loc): Moved to fold-const.h.
      	(build_personality_function): Moved to tree.h.
      	(build_range_check): Moved to fold-const.h.
      	(build_simple_mem_ref): Moved to fold-const.h.
      	(build_simple_mem_ref_loc): Moved to fold-const.h.
      	(build_tm_abort_call): Moved to trans-mem.h.
      	(byte_from_pos): Moved to stor-layout.h.
      	(call_expr_flags): Moved to calls.h.
      	(can_move_by_pieces): Moved to expr.h.
      	(categorize_ctor_elements): Moved to expr.h.
      	(change_decl_assembler_name): Moved to gcc-symtab.h.
      	(combine_comparisons): Moved to fold-const.h.
      	(complete_ctor_at_level_p): Moved to tree.h.
      	(component_ref_field_offset): Moved to tree-dfa.h.
      	(compute_builtin_object_size): Moved to tree-object-size.h.
      	(compute_record_mode): Moved to stor-layout.h.
      	(constant_boolean_node): Moved to fold-const.h.
      	(constructor_static_from_elts_p): Moved to varasm.h.
      	(cxx11_attribute_p): Moved to attribs.h.
      	(debug_body): Moved to print-tree.h.
      	(debug_find_tree): Moved to tree-inline.h.
      	(debug_fold_checksum): Moved to fold-const.h.
      	(debug_head): Moved to print-tree.h.
      	(debug_head): Moved to print-tree.h.
      	(debug_raw): Moved to print-tree.h.
      	(debug_tree): Moved to print-tree.h.
      	(debug_vec_tree): Moved to print-tree.h.
      	(debug_verbose): Moved to print-tree.h.
      	(debug_verbose): Moved to print-tree.h.
      	(decl_attributes): Moved to attribs.h.
      	(decl_binds_to_current_def_p): Moved to varasm.h.
      	(decl_default_tls_model): Moved to varasm.h.
      	(decl_replaceable_p): Moved to varasm.h.
      	(div_if_zero_remainder): Moved to fold-const.h.
      	(double_int mem_ref_offset): Moved to fold-const.h.
      	(dump_addr): Moved to print-tree.h.
      	(element_precision): Moved to machmode.h.
      	(expand_dummy_function_end): Moved to function.h.
      	(expand_function_end): Moved to function.h.
      	(expand_function_start): Moved to function.h.
      	(expand_label): Moved to stmt.h.
      	(expr_first): Moved to tree-iterator.h.
      	(expr_last): Moved to tree-iterator.h.
      	(finalize_size_functions): Moved to stor-layout.h.
      	(finish_builtin_struct): Moved to stor-layout.h.
      	(finish_record_layout): Moved to stor-layout.h.
      	(fixup_signed_type): Moved to stor-layout.h.
      	(fixup_unsigned_type): Moved to stor-layout.h.
      	(flags_from_decl_or_type): Moved to calls.h.
      	(fold): Moved to fold-const.h.
      	(fold_abs_const): Moved to fold-const.h.
      	(fold_binary): Moved to fold-const.h.
      	(fold_binary_loc): Moved to fold-const.h.
      	(fold_binary_to_constant): Moved to fold-const.h.
      	(fold_build1): Moved to fold-const.h.
      	(fold_build1_initializer_loc): Moved to fold-const.h.
      	(fold_build1_loc): Moved to fold-const.h.
      	(fold_build1_stat_loc): Moved to fold-const.h.
      	(fold_build2): Moved to fold-const.h.
      	(fold_build2_initializer_loc): Moved to fold-const.h.
      	(fold_build2_loc): Moved to fold-const.h.
      	(fold_build2_stat_loc): Moved to fold-const.h.
      	(fold_build3): Moved to fold-const.h.
      	(fold_build3_loc): Moved to fold-const.h.
      	(fold_build3_stat_loc): Moved to fold-const.h.
      	(fold_build_call_array): Moved to fold-const.h.
      	(fold_build_call_array_initializer): Moved to fold-const.h.
      	(fold_build_call_array_initializer_loc): Moved to fold-const.h.
      	(fold_build_call_array_loc): Moved to fold-const.h.
      	(fold_build_cleanup_point_expr): Moved to fold-const.h.
      	(fold_convert): Moved to fold-const.h.
      	(fold_convert_loc): Moved to fold-const.h.
      	(fold_convertible_p): Moved to fold-const.h.
      	(fold_defer_overflow_warnings): Moved to fold-const.h.
      	(fold_deferring_overflow_warnings_p): Moved to fold-const.h.
      	(fold_fma): Moved to fold-const.h.
      	(fold_ignored_result): Moved to fold-const.h.
      	(fold_indirect_ref): Moved to fold-const.h.
      	(fold_indirect_ref_1): Moved to fold-const.h.
      	(fold_indirect_ref_loc): Moved to fold-const.h.
      	(fold_read_from_constant_string): Moved to fold-const.h.
      	(fold_real_zero_addition_p): Moved to fold-const.h.
      	(fold_single_bit_test): Moved to fold-const.h.
      	(fold_strip_sign_ops): Moved to fold-const.h.
      	(fold_ternary): Moved to fold-const.h.
      	(fold_ternary_loc): Moved to fold-const.h.
      	(fold_unary): Moved to tree-data-ref.h.
      	(fold_unary_ignore_overflow): Moved to fold-const.h.
      	(fold_unary_ignore_overflow_loc): Moved to fold-const.h.
      	(fold_unary_loc): Moved to fold-const.h.
      	(fold_unary_to_constant): Moved to fold-const.h.
      	(fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h.
      	(fold_undefer_overflow_warnings): Moved to fold-const.h.
      	(folding_initializer): Moved to fold-const.h.
      	(free_temp_slots): Moved to function.h.
      	(generate_setjmp_warnings): Moved to function.h.
      	(get_attribute_name): Moved to attribs.h.
      	(get_identifier): Moved to stringpool.h.
      	(get_identifier_with_length): Moved to stringpool.h.
      	(get_inner_reference): Moved to tree.h.
      	(gimple_alloca_call_p): Moved to calls.h.
      	(gimplify_parameters): Moved to function.h.
      	(highest_pow2_factor): Moved to expr.h.
      	(indent_to): Moved to print-tree.h.
      	(init_attributes): Moved to attribs.h.
      	(init_dummy_function_start): Moved to function.h.
      	(init_function_start): Moved to function.h.
      	(init_inline_once): Moved to tree-inline.h.
      	(init_object_sizes): Moved to tree-object-size.h.
      	(init_temp_slots): Moved to function.h.
      	(init_tree_optimization_optabs): Moved to optabs.h.
      	(initialize_sizetypes): Moved to stor-layout.h.
      	(initializer_constant_valid_for_bitfield_p): Moved to varasm.h.
      	(initializer_constant_valid_p): Moved to varasm.h.
      	(int_const_binop): Moved to fold-const.h.
      	(internal_reference_types): Moved to stor-layout.h.
      	(invert_tree_comparison): Moved to fold-const.h.
      	(invert_truthvalue): Moved to fold-const.h.
      	(invert_truthvalue_loc): Moved to fold-const.h.
      	(is_tm_ending_fndecl): Moved to trans-mem.h.
      	(is_tm_may_cancel_outer): Moved to trans-mem.h.
      	(is_tm_pure): Moved to trans-mem.h.
      	(is_tm_safe): Moved to trans-mem.h.
      	(layout_decl): Moved to stor-layout.h.
      	(layout_type): Moved to stor-layout.h.
      	(lookup_attribute_spec): Moved to attribs.h.
      	(make_accum_type): Moved to stor-layout.h.
      	(make_decl_one_only): Moved to varasm.h.
      	(make_decl_rtl): Moved to tree.h.
      	(make_decl_rtl_for_debug): Moved to varasm.h.
      	(make_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_signed_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_signed_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_unsigned_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_unsigned_fract_type): Moved to stor-layout.h.
      	(make_range): Moved to fold-const.h.
      	(make_range_step): Moved to fold-const.h.
      	(make_sat_signed_accum_type): Moved to stor-layout.h.
      	(make_sat_signed_fract_type): Moved to stor-layout.h.
      	(make_sat_unsigned_accum_type): Moved to stor-layout.h.
      	(make_sat_unsigned_fract_type): Moved to stor-layout.h.
      	(make_signed_accum_type): Moved to stor-layout.h.
      	(make_signed_fract_type): Moved to stor-layout.h.
      	(make_signed_type): Moved to stor-layout.h.
      	(make_unsigned_accum_type): Moved to stor-layout.h.
      	(make_unsigned_fract_type): Moved to stor-layout.h.
      	(make_unsigned_type): Moved to stor-layout.h.
      	(mark_decl_referenced): Moved to varasm.h.
      	(mark_referenced): Moved to varasm.h.
      	(may_negate_without_overflow_p): Moved to fold-const.h.
      	(maybe_get_identifier): Moved to stringpool.h.
      	(merge_ranges): Moved to fold-const.h.
      	(merge_weak): Moved to varasm.h.
      	(mode_for_size_tree): Moved to stor-layout.h.
      	(multiple_of_p): Moved to fold-const.h.
      	(must_pass_in_stack_var_size): Moved to calls.h.
      	(must_pass_in_stack_var_size_or_pad): Moved to calls.h.
      	(native_encode_expr): Moved to fold-const.h.
      	(native_interpret_expr): Moved to fold-const.h.
      	(non_lvalue): Moved to fold-const.h.
      	(non_lvalue_loc): Moved to fold-const.h.
      	(normalize_offset): Moved to stor-layout.h.
      	(normalize_rli): Moved to stor-layout.h.
      	(notice_global_symbol): Moved to varasm.h.
      	(omit_one_operand): Moved to fold-const.h.
      	(omit_one_operand_loc): Moved to fold-const.h.
      	(omit_two_operands): Moved to fold-const.h.
      	(omit_two_operands_loc): Moved to fold-const.h.
      	(operand_equal_p): Moved to tree-data-ref.h.
      	(parse_input_constraint): Moved to stmt.h.
      	(parse_output_constraint): Moved to stmt.h.
      	(place_field): Moved to stor-layout.h.
      	(pop_function_context): Moved to function.h.
      	(pop_temp_slots): Moved to function.h.
      	(pos_from_bit): Moved to stor-layout.h.
      	(preserve_temp_slots): Moved to function.h.
      	(print_node): Moved to print-tree.h.
      	(print_node_brief): Moved to print-tree.h.
      	(print_rtl): Moved to rtl.h.
      	(process_pending_assemble_externals): Moved to varasm.h.
      	(ptr_difference_const): Moved to fold-const.h.
      	(push_function_context): Moved to function.h.
      	(push_struct_function): Moved to function.h.
      	(push_temp_slots): Moved to function.h.
      	(record_tm_replacement): Moved to trans-mem.h.
      	(relayout_decl): Moved to stor-layout.h.
      	(resolve_asm_operand_names): Moved to stmt.h.
      	(resolve_unique_section): Moved to varasm.h.
      	(rli_size_so_far): Moved to stor-layout.h.
      	(rli_size_unit_so_far): Moved to stor-layout.h.
      	(round_down): Moved to fold-const.h.
      	(round_down_loc): Moved to fold-const.h.
      	(round_up): Moved to fold-const.h.
      	(round_up_loc): Moved to fold-const.h.
      	(set_decl_incoming_rtl): Moved to emit-rtl.h.
      	(set_decl_rtl): Moved to tree.h.
      	(set_min_and_max_values_for_integral_type): Moved to stor-layout.h.
      	(set_user_assembler_name): Moved to varasm.h.
      	(setjmp_call_p): Moved to calls.h.
      	(size_binop): Moved to fold-const.h.
      	(size_binop_loc): Moved to fold-const.h.
      	(size_diffop): Moved to fold-const.h.
      	(size_diffop_loc): Moved to fold-const.h.
      	(size_int_kind): Moved to fold-const.h.
      	(stack_protect_epilogue): Moved to function.h.
      	(start_record_layout): Moved to stor-layout.h.
      	(supports_one_only): Moved to varasm.h.
      	(swap_tree_comparison): Moved to fold-const.h.
      	(tm_malloc_replacement): Moved to trans-mem.h.
      	(tree build_fold_addr_expr_loc): Moved to fold-const.h.
      	(tree build_invariant_address): Moved to fold-const.h.
      	(tree_binary_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_binary_nonzero_warnv_p): Moved to fold-const.h.
      	(tree_call_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_expr_nonnegative_p): Moved to fold-const.h.
      	(tree_expr_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_output_constant_def): Moved to varasm.h.
      	(tree_overlaps_hard_reg_set): Moved to stmt.h.
      	(tree_single_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_single_nonzero_warnv_p): Moved to fold-const.h.
      	(tree_swap_operands_p): Moved to fold-const.h.
      	(tree_unary_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_unary_nonzero_warnv_p): Moved to fold-const.h.
      	(update_alignment_for_field): Moved to stor-layout.h.
      	(use_register_for_decl): Moved to function.h.
      	(variable_size): Moved to rtl.h.
      	(vector_type_mode): Moved to stor-layout.h.
      	* cgraph.h: Corresponding changes.
      	* emit-rtl.h: Corresponding changes.
      	* expr.h: Corresponding changes.
      	* function.h: Corresponding changes.
      	* optabs.h: Corresponding changes.
      	* trans-mem.h: Corresponding changes.
      	Protect against multiple inclusion.
      	* tree-inline.h: Corresponding changes.
      	* tree-iterator.h: Corresponding changes.
      	* tree-dfa.h: Include expr.h.
      	* tree-ssanames.h: Include stringpool.h.
      	* attribs.h: New file.
      	* calls.h: New file.
      	* fold-const.h: New file.
      	* gcc-symtab.h: New file.
      	* print-rtl.h: New file.
      	* print-tree.h: New file.
      	* stmt.h: New file.
      	* stor-layout.h: New file.
      	* strinpool.h: New file.
      	* tree-nested.h: New file
      	* tree-object-size.h: New file.
      	* varasm.h: New file.
      	* Makefile.in (PLUGIN_HEADERS): Add stringpool.h.
      
      	* alias.c: Include varasm.h.
      	Include expr.h.
      	* asan.c: Include calls.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* attribs.c: Include stringpool.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	* builtins.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	Include tree-object-size.h.
      	* calls.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	Include attribs.h.
      	* cfgexpand.c: Include stringpool.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	Include stmt.h.
      	Include print-tree.h.
      	* cgraph.c: Include varasm.h.
      	Include calls.h.
      	Include print-tree.h.
      	* cgraphclones.c: Include stringpool.h.
      	Include function.h.
      	Include emit-rtl.h.
      	Move inclusion of rtl.h earlier in the file.
      	* cgraphunit.c: Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* cilk-common.c: Include stringpool.h.
      	Include stor-layout.h.
      	* combine.c: Include stor-layout.h.
      	* config/aarch64/aarch64-builtins.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/aarch64/aarch64.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/alpha/alpha.c: Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/arc/arc.c: Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/arm/arm.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/avr/avr-c.c: Include stor-layout.h.
      	* config/avr/avr-log.c: Include print-tree.h.
      	* config/avr/avr.c: Include print-tree.h.
      	Include calls.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* config/bfin/bfin.c: Include varasm.h.
      	Include calls.h.
      	* config/c6x/c6x.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	* config/cr16/cr16.c: Include stor-layout.h.
      	Include calls.h.
      	* config/cris/cris.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include stmt.h.
      	* config/darwin.c: Include stringpool.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	* config/epiphany/epiphany.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	* config/fr30/fr30.c: Include stor-layout.h.
      	Include varasm.h.
      	* config/frv/frv.c: Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* config/h8300/h8300.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	* config/i386/i386.c: Include stringpool.h.
      	Include attribs.h.
      	Include calls.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* config/i386/winnt-cxx.c: Include stringpool.h.
      	Include attribs.h.
      	* config/i386/winnt.c: Include stringpool.h.
      	Include varasm.h.
      	* config/ia64/ia64-c.c: Include stringpool.h.
      	* config/ia64/ia64.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/iq2000/iq2000.c: Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/lm32/lm32.c: Include calls.h.
      	* config/m32c/m32c.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/m32r/m32r.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/m68k/m68k.c: Include calls.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* config/mcore/mcore.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/mep/mep.c: Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	* config/microblaze/microblaze.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/mips/mips.c: Include varasm.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/mmix/mmix.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/mn10300/mn10300.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/moxie/moxie.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/msp430/msp430.c: Include stor-layout.h.
      	Include calls.h.
      	* config/nds32/nds32.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/pa/pa.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/pdp11/pdp11.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/picochip/picochip.c: Include calls.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	* config/rl78/rl78.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/rs6000/rs6000-c.c: Include stor-layout.h.
      	Include stringpool.h.
      	* config/rs6000/rs6000.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include print-tree.h.
      	Include varasm.h.
      	* config/rx/rx.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/s390/s390.c: Include print-tree.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/score/score.c: Include stringpool.h.
      	Include calls.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	* config/sh/sh-c.c: Include stringpool.h.
      	Include attribs.h.h.
      	* config/sh/sh.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/sol2-c.c: Include stringpool.h.
      	Include attribs.h.
      	* config/sol2-cxx.c: Include stringpool.h.
      	* config/sol2.c: Include stringpool.h.
      	Include varasm.h.
      	* config/sparc/sparc.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/spu/spu-c.c: Include stringpool.h.
      	* config/spu/spu.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/stormy16/stormy16.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/tilegx/tilegx.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/tilepro/tilepro.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/v850/v850-c.c: Include stringpool.h.
      	Include attribs.h.
      	* config/v850/v850.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/vax/vax.c: Include calls.h.
      	Include varasm.h.
      	* config/vms/vms.c: Include stringpool.h.
      	* config/vxworks.c: Include stringpool.h.
      	* config/xtensa/xtensa.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* convert.c: Include stor-layout.h.
      	* coverage.c: Include stringpool.h.
      	Include stor-layout.h.
      	* dbxout.c: Include varasm.h.
      	Include stor-layout.h.
      	* dojump.c: Include stor-layout.h.
      	* dse.c: Include stor-layout.h.
      	* dwarf2asm.c: Include stringpool.h.
      	Include varasm.h.
      	* dwarf2cfi.c: Include stor-layout.h.
      	* dwarf2out.c: Include rtl.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include function.h.
      	Include emit-rtl.h.
      	Move inclusion of rtl.h earlier in the file.
      	* emit-rtl.c: Include varasm.h.
      	* except.c: Include stringpool.h.
      	Include stor-layout.h.
      	* explow.c: Include stor-layout.h.
      	* expmed.c: Include stor-layout.h.
      	* expr.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include attribs.h.
      	Include varasm.h.
      	* final.c: Include varasm.h.
      	* fold-const.c: Include stor-layout.h.
      	Include calls.h.
      	Include tree-iterator.h.
      	* function.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	* genattrtab.c (write_header): Emit includes for varasm.h,
      	stor-layout.h and calls.h.
      	* genautomata.c (main): Likewise.
      	* genemit.c: Likewise.
      	* genopinit.c: Likewise.
      	* genoutput.c (output_prologue): Likewise.
      	* genpeep.c: Likewise.
      	* genpreds.c (write_insn_preds_c): Likewise.
      	* gengtype.c (open_base_files): Add stringpool.h.
      	* gimple-expr.c: Include stringpool.h.
      	Include stor-layout.h.
      	* gimple-fold.c: Include stringpool.h.
      	Include expr.h.
      	Include stmt.h.
      	Include stor-layout.h.
      	* gimple-low.c: Include tree-nested.h.
      	Include calls.h.
      	* gimple-pretty-print.c: Include stringpool.h.
      	* gimple-ssa-strength-reduction.c: Include stor-layout.h.
      	Include expr.h.
      	* gimple-walk.c: Include stmt.h.
      	* gimple.c: Include calls.h.
      	Include stmt.h.
      	Include stor-layout.h.
      	* gimplify.c: Include stringpool.h.
      	Include calls.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	Include stmt.h.
      	Include print-tree.h.
      	Include expr.h.
      	* gimplify-me.c: Include stmt.h
      	Include stor-layout.h
      	* internal-fn.c: Include stor-layout.h.
      	* ipa-devirt.c: Include print-tree.h.
      	Include calls.h.
      	* ipa-inline-analysis.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include print-tree.h.
      	* ipa-inline.c: Include trans-mem.h.
      	Include calls.h.
      	* ipa-prop.c: Include expr.h.
      	Include stor-layout.h.
      	Include print-tree.h.
      	* ipa-pure-const.c: Include print-tree.h.
      	Include calls.h.
      	* ipa-reference.c: Include calls.h.
      	* ipa-split.c: Include stringpool.h.
      	Include expr.h.
      	Include calls.h.
      	* ipa.c: Include calls.h.
      	Include stringpool.h.
      	* langhooks.c: Include stringpool.h.
      	Include attribs.h.
      	* lto-cgraph.c: Include stringpool.h.
      	* lto-streamer-in.c: Include stringpool.h.
      	* lto-streamer-out.c: Include stor-layout.h.
      	Include stringpool.h.
      	* omp-low.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include expr.h.
      	* optabs.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	* passes.c: Include varasm.h.
      	* predict.c: Include calls.h.
      	* print-rtl.c: Include print-tree.h.
      	* print-tree.c: Include varasm.h.
      	Include print-rtl.h.
      	Include stor-layout.h.
      	* realmpfr.c: Include stor-layout.h.
      	* reg-stack.c: Include varasm.h.
      	* sdbout.c: Include varasm.h.
      	Include stor-layout.h.
      	* simplify-rtx.c: Include varasm.h.
      	* stmt.c: Include varasm.h.
      	Include stor-layout.h.
      	* stor-layout.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	Include print-tree.h.
      	* symtab.c: Include rtl.h.
      	Include print-tree.h.
      	Include varasm.h.
      	Include function.h.
      	Include emit-rtl.h.
      	* targhooks.c: Include stor-layout.h.
      	Include varasm.h.
      	* toplev.c: Include varasm.h.
      	Include tree-inline.h.
      	* trans-mem.c: Include calls.h.
      	Include function.h.
      	Include rtl.h.
      	Include emit-rtl.h.
      	* tree-affine.c: Include expr.h.
      	* tree-browser.c: Include print-tree.h.
      	* tree-call-cdce.c: Include stor-layout.h.
      	* tree-cfg.c: Include trans-mem.h.
      	Include stor-layout.h.
      	Include print-tree.h.
      	* tree-complex.c: Include stor-layout.h.
      	* tree-data-ref.c: Include expr.h.
      	* tree-dfa.c: Include stor-layout.h.
      	* tree-eh.c: Include expr.h.
      	Include calls.h.
      	* tree-emutls.c: Include stor-layout.h.
      	Include varasm.h.
      	* tree-if-conv.c: Include stor-layout.h.
      	* tree-inline.c: Include stor-layout.h.
      	Include calls.h.
      	* tree-loop-distribution.c: Include stor-layout.h.
      	* tree-nested.c: Include stringpool.h.
      	Include stor-layout.h.
      	* tree-object-size.c: Include tree-object-size.h.
      	* tree-outof-ssa.c: Include stor-layout.h.
      	* tree-parloops.c: Include stor-layout.h.
      	Include tree-nested.h.
      	* tree-pretty-print.c: Include stor-layout.h.
      	Include expr.h.
      	* tree-profile.c: Include varasm.h.
      	Include tree-nested.h.
      	* tree-scalar-evolution.c: Include expr.h.
      	* tree-sra.c: Include stor-layout.h.
      	* tree-ssa-address.c: Include stor-layout.h.
      	* tree-ssa-ccp.c: Include stor-layout.h.
      	* tree-ssa-dce.c: Include calls.h.
      	* tree-ssa-dom.c: Include stor-layout.h.
      	* tree-ssa-forwprop.c: Include stor-layout.h.
      	* tree-ssa-ifcombine.c: Include stor-layout.h.
      	* tree-ssa-loop-ivopts.c: Include stor-layout.h.
      	* tree-ssa-loop-niter.c: Include calls.h.
      	Include expr.h.
      	* tree-ssa-loop-prefetch.c: Include stor-layout.h.
      	* tree-ssa-math-opts.c: Include stor-layout.h.
      	* tree-ssa-operands.c: Include stmt.h.
      	Include print-tree.h.
      	* tree-ssa-phiopt.c: Include stor-layout.h.
      	* tree-ssa-reassoc.c: Include stor-layout.h.
      	* tree-ssa-sccvn.c: Include stor-layout.h.
      	* tree-ssa-sink.c: Include stor-layout.h.
      	* tree-ssa-strlen.c: Include stor-layout.h.
      	* tree-ssa-structalias.c: Include stor-layout.h.
      	Include stmt.h.
      	* tree-ssa-tail-merge.c: Include stor-layout.h.
      	Include trans-mem.h.
      	* tree-ssa-uncprop.c: Include stor-layout.h.
      	* tree-ssa.c: Include stor-layout.h.
      	* tree-ssanames.c: Include stor-layout.h.
      	* tree-streamer-in.c: Include stringpool.h.
      	* tree-streamer-out.c: Include stor-layout.h.
      	* tree-switch-conversion.c: Include varasm.h.
      	Include stor-layout.h.
      	* tree-tailcall.c: Include stor-layout.h.
      	* tree-vect-data-refs.c: Include stor-layout.h.
      	* tree-vect-generic.c: Include stor-layout.h.
      	* tree-vect-loop.c: Include stor-layout.h.
      	* tree-vect-patterns.c: Include stor-layout.h.
      	* tree-vect-slp.c: Include stor-layout.h.
      	* tree-vect-stmts.c: Include stor-layout.h.
      	* tree-vectorizer.c: Include stor-layout.h.
      	* tree-vrp.c: Include stor-layout.h.
      	Include calls.h.
      	* tree.c: Include stor-layout.h.
      	Include calls.h.
      	Include attribs.h.
      	Include varasm.h.
      	* tsan.c: Include expr.h.
      	* ubsan.c: Include stor-layout.h.
      	Include stringpool.h.
      	* value-prof.c: Include tree-nested.h.
      	Include calls.h.
      	* var-tracking.c: Include varasm.h.
      	Include stor-layout.h.
      	* varasm.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include gcc-symtab.h.
      	Include varasm.h.
      	* varpool.c: Include varasm.h.
      	* vmsdbgout.c: Include varasm.h.
      	* xcoffout.c: Include varasm.h.
      
      ada/ChangeLog
      
      	* gcc-interface/decl.c: Include stringpool.h
      	Include stor-layout.h
      	* gcc-interface/misc.c: Include stor-layout.h
      	Include print-tree.h
      	* gcc-interface/trans.c: Include stringpool.h
      	Include stor-layout.h
      	Include stmt.h
      	Include varasm.h
      	* gcc-interface/utils.c: Include stringpool.h
      	Include stor-layout.h
      	Include attribs.h
      	Include varasm.h
      	* gcc-interface/utils2.c: Include stringpool.h
      	Include stor-layout.h
      	Include attribs.h
      	Include varasm.h
      
      c-family/ChangeLog
      
      	* c-common.c: Include fold-const.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include stringpool.h.
      	Include attribs.h.
      	Include varasm.h.
      	Include trans-mem.h.
      	* c-cppbuiltin.c: Include stor-layout.h.
      	Include stringpool.h.
      	* c-format.c: Include stringpool.h.
      	* c-lex.c: Include stringpool.h.
      	Include stor-layout.h.
      	* c-pragma.c: Include stringpool.h.
      	Include attribs.h.
      	Include varasm.h.
      	Include gcc-symtab.h.
      	* c-pretty-print.c: Include stor-layout.h.
      	Include attribs.h.
      	* cilk.c: Include stringpool.h.
      	Include calls.h.
      
      c/ChangeLog
      
      	* c-decl.c: Include print-tree.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include stringpool.h.
      	* c-lang.c: Include fold-const.h.
      	* c-parser.c: Include stringpool.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include trans-mem.h.
      	* c-typeck.c: Include stor-layout.h.
      	Include trans-mem.h.
      	Include varasm.h.
      	Include stmt.h.
      
      cp/ChangeLog
      
      	* call.c: Include stor-layout.h.
      	Include trans-mem.h.
      	Include stringpool.h.
      	* class.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include attribs.h.
      	* cp-gimplify.c: Include stor-layout.h.
      	* cvt.c: Include stor-layout.h.
      	* decl.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include calls.h.
      	* decl2.c: Include stringpool.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* error.c: Include stringpool.h.
      	* except.c: Include stringpool.h.
      	Include trans-mem.h.
      	Include attribs.h.
      	* init.c: Include stringpool.h.
      	Include varasm.h.
      	* lambda.c: Include stringpool.h.
      	* lex.c: Include stringpool.h.
      	* mangle.c: Include stor-layout.h.
      	Include stringpool.h.
      	* method.c: Include stringpool.h.
      	Include varasm.h.
      	* name-lookup.c: Include stringpool.h.
      	Include print-tree.h.
      	Include attribs.h.
      	* optimize.c: Include stringpool.h.
      	* parser.c: Include print-tree.h.
      	Include stringpool.h.
      	Include attribs.h.
      	Include trans-mem.h.
      	* pt.c: Include stringpool.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	* ptree.c: Include print-tree.h.
      	* repo.c: Include stringpool.h.
      	* rtti.c: Include stringpool.h.
      	Include stor-layout.h.
      	* semantics.c: Include stmt.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* tree.c: Include stor-layout.h.
      	Include print-tree.h.
      	Include tree-iterator.h.
      	* typeck.c: Include stor-layout.h.
      	Include varasm.h.
      	* typeck2.c: Include stor-layout.h.
      	Include varasm.h.
      	* vtable-class-hierarchy.c: Include stringpool.h.
      	Include stor-layout.h.
      
      fortran/ChangeLog
      
      	* decl.c: Include stringpool.h.
      	* iresolve.c: Include stringpool.h.
      	* match.c: Include stringpool.h.
      	* module.c: Include stringpool.h.
      	* target-memory.c: Include stor-layout.h.
      	* trans-common.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* trans-const.c: Include stor-layout.h.
      	* trans-decl.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include attribs.h.
      	* trans-expr.c: Include stringpool.h.
      	* trans-intrinsic.c: Include stringpool.h.
      	Include tree-nested.h.
      	Include stor-layout.h.
      	* trans-io.c: Include stringpool.h.
      	Include stor-layout.h.
      	* trans-openmp.c: Include stringpool.h.
      	* trans-stmt.c: Include stringpool.h.
      	* trans-types.c: Include stor-layout.h.
      	Include stringpool.h.
      	* trans.c: Include stringpool.h.
      
      go/ChangeLog
      
      	* go-backend.c: Include stor-layout.h.
      	* go-gcc.cc: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* go-lang.c: Include stor-layout.h.
      
      java/ChangeLog
      
      	* builtins.c: Include stor-layout.h.
      	Include stringpool.h.
      	* class.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* constants.c: Include stringpool.h.
      	Include stor-layout.h.
      	* decl.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	* except.c: Include stringpool.h.
      	Include stor-layout.h.
      	* expr.c: Include stringpool.h.
      	Include stor-layout.h.
      	* jcf-parse.c: Include stringpool.h.
      	* mangle.c: Include stringpool.h.
      	* resource.c: Include stringpool.h.
      	Include stor-layout.h.
      	* typeck.c: Include stor-layout.h.
      	Include stringpool.h.
      	* verify-glue.c: Include stringpool.h.
      
      lto/ChangeLog
      	* lto-lang.c: Include stringpool.h.
      	Include stor-layout.h.
      	* lto-partition.c: Include gcc-symtab.h.
      	* lto.c: Include stor-layout.h.
      
      objc/ChangeLog
      	* objc-act.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include attribs.h.
      	* objc-encoding.c: Include stringpool.h.
      	Include stor-layout.h.
      	* objc-gnu-runtime-abi-01.c: Include stringpool.h.
      	* objc-next-runtime-abi-01.c:
      	Include stringpool.h.
      	* objc-next-runtime-abi-02.c: Include stringpool.h.
      	* objc-runtime-shared-support.c: Include stringpool.h.
      
      testsuite/ChangeLog
      
      	* gcc.dg/plugin/selfassign.c: Include stringpool.h.
      	* gcc.dg/plugin/start_unit_plugin.c: Likewise.
      
      From-SVN: r205023
      Diego Novillo committed
    • bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl. · b9a55b13
      config/
      	* bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl.
      gcc/c-family/
      	* c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
      	call.
      	(ubsan_instrument_shift): Likewise.
      	(ubsan_instrument_vla): Likewise.
      gcc/
      	* opts.c (common_handle_option): Add -fsanitize=null option.
      	Turn off -fdelete-null-pointer-checks option when doing the
      	NULL pointer checking.
      	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH): Add.
      	* tree-pass.h (make_pass_ubsan): Declare.
      	(make_pass_sanopt): Declare.
      	* timevar.def (TV_TREE_UBSAN): New timevar.
      	* passes.def: Add pass_sanopt and pass_ubsan.
      	* ubsan.h (ubsan_null_ckind): New enum.
      	(ubsan_mismatch_data): New struct.
      	(ubsan_expand_null_ifn): Declare.
      	(ubsan_create_data): Adjust declaration.
      	(ubsan_type_descriptor): Likewise.
      	* asan.c: Include "ubsan.h".
      	(pass_data_sanopt): New pass.
      	(execute_sanopt): New function.
      	(gate_sanopt): Likewise.
      	(make_pass_sanopt): Likewise.
      	(class pass_sanopt): New class.
      	* ubsan.c: Include tree-pass.h, gimple-ssa.h, gimple-walk.h,
      	gimple-iterator.h and cfgloop.h. 
      	(PROB_VERY_UNLIKELY): Define.
      	(tree_type_map_hash): New function.
      	(ubsan_type_descriptor): Add new parameter.
      	Improve type name generation.
      	(ubsan_create_data): Add new parameter.  Add pointer data into
      	ubsan structure.
      	(ubsan_expand_null_ifn): New function.
      	(instrument_member_call): Likewise.
      	(instrument_mem_ref): Likewise.
      	(instrument_null): Likewise.
      	(ubsan_pass): Likewise.
      	(gate_ubsan): Likewise.
      	(make_pass_ubsan): Likewise.
      	(ubsan_instrument_unreachable): Adjust ubsan_create_data call.
      	(class pass_ubsan): New class.
      	(pass_data_ubsan): New pass.
      	* flag-types.h (enum sanitize_code): Add SANITIZE_NULL.
      	* internal-fn.c (expand_UBSAN_NULL): New function.
      	* cgraphunit.c (varpool_finalize_decl): Call varpool_assemble_decl
      	even when !flag_toplevel_reorder.
      	* internal-fn.def (UBSAN_NULL): New.
      gcc/testsuite/
      	* c-c++-common/ubsan/null-1.c: New test.
      	* c-c++-common/ubsan/null-2.c: New test.
      	* c-c++-common/ubsan/null-3.c: New test.
      	* c-c++-common/ubsan/null-4.c: New test.
      	* c-c++-common/ubsan/null-5.c: New test.
      	* c-c++-common/ubsan/null-6.c: New test.
      	* c-c++-common/ubsan/null-7.c: New test.
      	* c-c++-common/ubsan/null-8.c: New test.
      	* c-c++-common/ubsan/null-9.c: New test.
      	* c-c++-common/ubsan/null-10.c: New test.
      	* c-c++-common/ubsan/null-11.c: New test.
      	* gcc.dg/ubsan/c99-shift-2.c: Adjust dg-output.
      	* c-c++-common/ubsan/shift-1.c: Likewise.
      	* c-c++-common/ubsan/div-by-zero-3.c: Likewise.
      
      From-SVN: r205021
      Marek Polacek committed
    • c11-complex-1.c: Use dg-add-options ieee. · a186c902
      	* gcc.dg/c11-complex-1.c: Use dg-add-options ieee.
      
      From-SVN: r205020
      Uros Bizjak committed
    • cgraph.c (cgraph_create_indirect_edge): Use get_polymorphic_call_info. · 68377e53
      
      	* cgraph.c (cgraph_create_indirect_edge): Use get_polymorphic_call_info.
      	* cgraph.h (cgraph_indirect_call_info): Add outer_type, maybe_in_construction
      	and maybe_derived_type.
      	* ipa-utils.h (ipa_polymorphic_call_context): New structure.
      	(ipa_dummy_polymorphic_call_context): New global var.
      	(possible_polymorphic_call_targets): Add context paramter.
      	(dump_possible_polymorphic_call_targets): Likewise; update
      	wrappers.
      	(possible_polymorphic_call_target_p): Likewise.
      	(get_polymorphic_call_info): New function.
      	* ipa-devirt.c (ipa_dummy_polymorphic_call_context): New function.
      	(add_type_duplicate): Remove forgotten debug output.
      	(method_class_type): Add sanity check.
      	(maybe_record_node): Add FINALP parameter.
      	(record_binfo): Add OUTER_TYPE and OFFSET; walk the inner
      	by info by get_binfo_at_offset.
      	(possible_polymorphic_call_targets_1): Add OUTER_TYPE/OFFSET parameters;
      	pass them to record-binfo.
      	(polymorphic_call_target_d): Add context and FINAL.
      	(polymorphic_call_target_hasher::hash): Hash context.
      	(polymorphic_call_target_hasher::equal): Compare context.
      	(free_polymorphic_call_targets_hash):
      	(get_class_context): New function.
      	(contains_type_p): New function.
      	(get_polymorphic_call_info): New function.
      	(walk_bases): New function.
      	(possible_polymorphic_call_targets): Add context parameter; honnor it.
      	(dump_possible_polymorphic_call_targets): Dump context.
      	(possible_polymorphic_call_target_p): Add context.
      	(update_type_inheritance_graph): Update comment.s
      	(ipa_set_jf_known_type): Assert that compoentn type is known.
      	(ipa_note_param_call): Do not tamper with offsets.
      	(ipa_analyze_indirect_call_uses): When offset is being changed; clear
      	outer type.
      	(update_indirect_edges_after_inlining): Likewise.
      	(ipa_write_indirect_edge_info): Stream new fields.
      	(ipa_read_indirect_edge_info): Stream in new fields.
      
      	* ipa/devirt9.C: Verify that the optimization happens already before.
      	whole-program.
      
      From-SVN: r205019
      Jan Hubicka committed
    • tree-pretty-print.c (dump_generic_node): Print class type of OBJ_TYPE_REF. · d345bb30
      
      
      	* tree-pretty-print.c (dump_generic_node): Print class type of
      	OBJ_TYPE_REF.
      
      From-SVN: r205017
      Jan Hubicka committed
    • arm.opt (-marm-pic-data-is-text-relative): New option. · 32d6e6c0
      2013-11-19  Joey Ye  <joey.ye@arm.com>
      
              * config/arm/arm.opt (-marm-pic-data-is-text-relative): New option.
              * doc/invoke.texi (-marm-pic-data-is-text-relative): Documentation
              for new option.
              * config/arm/arm.c (arm_option_override): By default disable
              -marm-pic-data-is-text-relative.
              (legitimize_pic_address): Use arm_pic_data_is_text_relative.
              (arm_assemble_integer): Likewise.
              * config/arm/arm.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE): 
              New macro to initialize -marm-pic-data-is-text-relative.
      
      From-SVN: r205016
      Joey Ye committed
    • tree-ssa-loop-ivopts.c (enum ainc_type): New. · cd047059
      	* tree-ssa-loop-ivopts.c (enum ainc_type): New.
      	(address_cost_data): New field.
      	(get_address_cost): Compute auto-increment rtx cost in ainc_costs.
      	Use ainc_costs for auto-increment rtx patterns.
      	Cleanup TWS.
      
      From-SVN: r205015
      Bin Cheng committed
    • [AArch64] Remove v8type attribute. · c1dfcec7
      gcc/
      	* config/aarch64/aarch64.md: Remove v8type from all insns.
      
      From-SVN: r205014
      James Greenhalgh committed
    • re PR tree-optimization/57517 (internal compiler error: in… · 7906dbe4
      re PR tree-optimization/57517 (internal compiler error: in eliminate_temp_copies, at tree-predcom.c:1913)
      
      2013-11-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/57517
      	* tree-predcom.c (combinable_refs_p): Verify the combination
      	is always executed when the refs are.
      
      	* gfortran.fortran-torture/compile/pr57517.f90: New testcase.
      	* gcc.dg/torture/pr57517.c: Likewise.
      
      From-SVN: r205010
      Richard Biener committed
    • * atomic.c: Include sys/types.h. · 64856e1e
      From-SVN: r205008
      Jakub Jelinek committed
    • tree-ssa-threadupdate.c: Include ssa-iterators.h · b06cbaac
      	* tree-ssa-threadupdate.c: Include ssa-iterators.h
      	(copy_phi_arg_into_existing_phi): New function.
      	(any_remaining_duplicated_blocks): Likewise.
      	(ssa_fix_duplicate_block_edges): Handle multiple duplicated
      	blocks on a jump threading path.
      
      From-SVN: r205004
      Jeff Law committed
    • tree-ssa-threadupdate.c (thread_through_loop_header): Do not thread through a… · 01ccc98e
      tree-ssa-threadupdate.c (thread_through_loop_header): Do not thread through a joiner which has the latch edge.
      
      	* tree-ssa-threadupdate.c (thread_through_loop_header):  Do not
      	thread through a joiner which has the latch edge.
      
      From-SVN: r205003
      Jeff Law committed
    • reflect: Handle calls to functions that take or return empty structs · 41674b9f
      Fixes issue 6761
      
      This simple change seems to work fine, slightly to my surprise.
      
      This includes the tests I submitted to the main Go repository at
      https://codereview.appspot.com/26570046
      
      From-SVN: r205001
      Ian Lance Taylor committed
    • libgo: Fix typo for is_dragonfly in configure script. · 824393bd
      From-SVN: r204999
      Ian Lance Taylor committed
    • md.texi (setmem): Document new parameter. · 672a6cc3
      
      	* md.texi (setmem): Document new parameter.
      	* optabs.c (maybe_gen_insn): Support 9 operands.
      	* builtins.c (determine_block_size): Add probable_max_size;
      	support anti-ranges.
      	(expand_builtin_memcpy. expand_builtin_memset_args): Pass around
      	probable_max_size.
      	* expr.c (emit_block_move_via_movmem, emit_block_move_hints,
      	emit_block_move, clear_storage_hints, set_storage_via_setmem):
      	Likewise.
      	* expr.h (emit_block_move_hints, clear_storage_hints,
      	set_storage_via_setmem): Update prototype.
      	* i386.md (setmem, movmem patterns): Add 9th operand.
      	* i386-protos.h (ix86_expand_set_or_movmem): Update prototype.
      	* i386.c (ix86_expand_set_or_movmem): Take probable_max_size_exp
      	argument; pass it to decide_alg.
      
      From-SVN: r204998
      Jan Hubicka committed
    • md.texi (setmem): Document new parameter. · 82bb7d4e
      
      	* md.texi (setmem): Document new parameter.
      	* optabs.c (maybe_gen_insn): Support 9 operands.
      	* builtins.c (determine_block_size): Add probable_max_size;
      	support anti-ranges.
      	(expand_builtin_memcpy. expand_builtin_memset_args): Pass around
      	probable_max_size.
      	* expr.c (emit_block_move_via_movmem, emit_block_move_hints,
      	emit_block_move, clear_storage_hints, set_storage_via_setmem):
      	Likewise.
      	* expr.h (emit_block_move_hints, clear_storage_hints,
      	set_storage_via_setmem): Update prototype.
      	* i386.md (setmem, movmem patterns): Add 9th operand.
      	* i386-protos.h (ix86_expand_set_or_movmem): Update prototype.
      	* i386.c (ix86_expand_set_or_movmem): Take probable_max_size_exp
      	argument; pass it to decide_alg.
      
      	* gcc.target/i386/memcpy-3.c: New testcase.
      
      From-SVN: r204997
      Jan Hubicka committed
    • re PR middle-end/59175 (gcc.target/i386/memcpy-2.c fails with -m32) · 0874db6e
      	PR middle-end/59175
      	* gcc.target/i386/memcpy-2.c: Fix template;
      	add +1 so the testcase passes at 32bit.
      
      Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>
      
      From-SVN: r204996
      Jan Hubicka committed
    • Eliminate n_basic_blocks macro · 0cae8d31
      gcc/
      	* basic-block.h (n_basic_blocks_for_function): Rename macro to...
      	(n_basic_blocks_for_fn): ...this.
      
      	(n_basic_blocks): Eliminate macro as work towards making uses of
      	cfun be explicit.
      
      	* cfgloop.c (init_loops_structure): Update for renaming of
      	"n_basic_blocks_for_function" to "n_basic_blocks_for_fn".
      	* graph.c (draw_cfg_nodes_no_loops): Likewise.
      	* ipa-utils.c (ipa_merge_profiles): Likewise.
      	* lto-streamer-in.c (make_new_block): Likewise.
      	* tree-cfg.c (init_empty_tree_cfg_for_function): Likewise.
      	(dump_function_to_file): Likewise.
      
      	* alias.c (init_alias_analysis): Replace usage of "n_basic_blocks"
      	macro with "n_basic_blocks_for_fn (cfun)".
      	* bb-reorder.c (partition_hot_cold_basic_blocks): Likewise.
      	(duplicate_computed_gotos): Likewise.
      	(reorder_basic_blocks): Likewise.
      	* bt-load.c (augment_live_range): Likewise.
      	* cfg.c (expunge_block): Likewise.
      	(compact_blocks): Likewise.
      	* cfganal.c (single_pred_before_succ_order): Likewise.
      	(compute_idf): Likewise.
      	(flow_dfs_compute_reverse_init): Likewise.
      	(pre_and_rev_post_order_compute): Likewise.
      	(pre_and_rev_post_order_compute_fn): Likewise.
      	(inverted_post_order_compute): Likewise.
      	(post_order_compute): Likewise.
      	(print_edge_list): Likewise.
      	(find_unreachable_blocks): Likewise.
      	(mark_dfs_back_edges): Likewise.
      	* cfgcleanup.c (try_optimize_cfg): Likewise.
      	(try_forward_edges): Likewise.
      	* cfghooks.c (dump_flow_info): Likewise.
      	* cfgloop.c (verify_loop_structure): Likewise.
      	(get_loop_body): Likewise.
      	(flow_loops_find): Likewise.
      	* cfgloopmanip.c (add_loop): Likewise.
      	(remove_path): Likewise.
      	(find_path): Likewise.
      	* cfgrtl.c (rtl_flow_call_edges_add): Likewise.
      	(rtl_verify_bb_layout): Likewise.
      	(entry_of_function): Likewise.
      	(rtl_create_basic_block): Likewise.
      	* coverage.c (coverage_compute_cfg_checksum): Likewise.
      	* cprop.c (one_cprop_pass): Likewise.
      	(is_too_expensive): Likewise.
      	* df-core.c (df_compute_cfg_image): Likewise.
      	(df_compact_blocks): Likewise.
      	(df_worklist_dataflow_doublequeue): Likewise.
      	* dominance.c (calculate_dominance_info): Likewise.
      	(calc_dfs_tree): Likewise.
      	(calc_dfs_tree_nonrec): Likewise.
      	(init_dom_info): Likewise.
      	* domwalk.c (cmp_bb_postorder): Likewise.
      	* function.c (thread_prologue_and_epilogue_insns): Likewise.
      	(generate_setjmp_warnings): Likewise.
      	* fwprop.c (build_single_def_use_links): Likewise.
      	* gcse.c (is_too_expensive): Likewise.
      	(one_code_hoisting_pass): Likewise.
      	(one_pre_gcse_pass): Likewise.
      	* graphite.c (graphite_initialize): Likewise.
      	* haifa-sched.c (haifa_sched_init): Likewise.
      	* ipa-inline-analysis.c (estimate_function_body_sizes): Likewise.
      	* ira.c (split_live_ranges_for_shrink_wrap): Likewise.
      	* ira-build.c (ira_build): Likewise.
      	* lcm.c (compute_nearerout): Likewise.
      	(compute_available): Likewise.
      	(compute_laterin): Likewise.
      	(compute_antinout_edge): Likewise.
      	* lra-lives.c (lra_create_live_ranges): Likewise.
      	* lra.c (has_nonexceptional_receiver): Likewise.
      	* mcf.c (create_fixup_graph): Likewise.
      	* profile.c (branch_prob): Likewise.
      	* reg-stack.c (convert_regs_2): Likewise.
      	* regrename.c (regrename_analyze): Likewise.
      	* reload1.c (has_nonexceptional_receiver): Likewise.
      	* reorg.c (dbr_schedule): Likewise.
      	* sched-deps.c (sched_deps_init): Likewise.
      	* sched-ebb.c (schedule_ebbs): Likewise.
      	* sched-rgn.c (extend_regions): Likewise.
      	(schedule_insns): Likewise.
      	(sched_rgn_init): Likewise.
      	(extend_rgns): Likewise.
      	(haifa_find_rgns): Likewise.
      	* sel-sched-ir.c (recompute_rev_top_order): Likewise.
      	(sel_recompute_toporder): Likewise.
      	* sel-sched.c (run_selective_scheduling): Likewise.
      	* store-motion.c (one_store_motion_pass): Likewise.
      	(remove_reachable_equiv_notes): Likewise.
      	* tracer.c (tracer): Likewise.
      	(tail_duplicate): Likewise.
      	* tree-cfg.c (gimple_flow_call_edges_add): Likewise.
      	(dump_cfg_stats): Likewise.
      	(gimple_dump_cfg): Likewise.
      	(create_bb): Likewise.
      	(build_gimple_cfg): Likewise.
      	* tree-cfgcleanup.c (merge_phi_nodes): Likewise.
      	* tree-inline.c (optimize_inline_calls): Likewise.
      	(fold_marked_statements): Likewise.
      	* tree-ssa-ifcombine.c (tree_ssa_ifcombine): Likewise.
      	* tree-ssa-loop-ch.c (copy_loop_headers): Likewise.
      	* tree-ssa-loop-im.c (analyze_memory_references): Likewise.
      	* tree-ssa-loop-manip.c (compute_live_loop_exits): Likewise.
      	* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
      	* tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Likewise.
      	* tree-ssa-pre.c (do_pre): Likewise.
      	(init_pre): Likewise.
      	(compute_avail): Likewise.
      	* tree-ssa-reassoc.c (init_reassoc): Likewise.
      	* tree-ssa-sccvn.c (init_scc_vn): Likewise.
      	* tree-ssa-tail-merge.c (alloc_cluster_vectors): Likewise.
      	(init_worklist): Likewise.
      	* tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
      	* var-tracking.c (variable_tracking_main_1): Likewise.
      	(vt_find_locations): Likewise.
      	(vt_stack_adjustments): Likewise.
      	* config/s390/s390.c (s390_optimize_nonescaping_tx): Likewise.
      	* config/spu/spu.c (spu_machine_dependent_reorg): Likewise.
      
      From-SVN: r204995
      David Malcolm committed
    • configure.ac: Check for support of __atomic extensions. · 49579c7e
      	* configure.ac: Check for support of __atomic extensions.
      	* internal.h: Declare or #define atomic functions for use in
      	backtrace code.
      	* atomic.c: New file.
      	* dwarf.c (dwarf_lookup_pc): Use atomic functions.
      	(dwarf_fileline, backtrace_dwarf_add): Likewise.
      	* elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
      	(backtrace_initialize): Likewise.
      	* fileline.c (fileline_initialize): Likewise.
      	* Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
      	* configure, config.h.in, Makefile.in: Rebuild.
      
      From-SVN: r204994
      Ian Lance Taylor committed
    • libgcov-driver.c (run_accounted): Make global level static. · 7f369373
      
      	* libgcov-driver.c (run_accounted): Make global level static.
      	(gcov_exit_merge_summary): Silence warning; do not clear
      	run_accounted here.
      	(gcov_exit): Clear it here.
      
      From-SVN: r204993
      Jan Hubicka committed
    • libgcov-driver.c (gcov_exit_merge_summary): Fix setting run_accounted. · 1d0b3334
      	* libgcov-driver.c (gcov_exit_merge_summary): Fix setting
      	run_accounted.
      
      From-SVN: r204991
      Jan Hubicka committed
    • Daily bump. · 254683fa
      From-SVN: r204990
      GCC Administrator committed
    • tree.c (int_fits_type_p): Change GET_MODE_BITSIZE to GET_MODE_PRECISION. · bd6337aa
      2013-11-18 Kenneth Zadeck <zadeck@naturalbridge.com>
      
      	* tree.c (int_fits_type_p): Change GET_MODE_BITSIZE to
      	GET_MODE_PRECISION.
      	* fold-const.c (fold_single_bit_test_into_sign_test)
      	(fold_binary_loc):  Change GET_MODE_BITSIZE to
      	GET_MODE_PRECISION.
      
      From-SVN: r204987
      Kenneth Zadeck committed
  2. 18 Nov, 2013 6 commits
    • This patch fixes an lto profiledbootstrap failure with -freorder-blocks-and-partition enabled. · 4ca19309
      This patch fixes an lto profiledbootstrap failure with
      -freorder-blocks-and-partition enabled. Currently compgotos
      is the only pass that goes into cfglayout mode after bb reordering,
      which is undesireable (and in the case of -freorder-blocks-and-partition
      can cause illegal partitioning) because of the optimizations performed
      on the cfg when going into cfglayout mode. Moved compgoto before
      bb reordering to avoid these problems.
      
      2013-11-18  Teresa Johnson  <tejohnson@google.com>
      
      	* gcc/cfgrtl.c (cfg_layout_initialize): Assert if we
      	try to go into cfglayout after bb reordering.
      	* gcc/passes.def: Move compgotos before bb reordering
      	since it goes into cfglayout.
      
      From-SVN: r204985
      Teresa Johnson committed
    • Remove all_lto_gen_passes, replace with plain function calls · 38f4f02f
      	* cgraphunit.c (ipa_passes): Don't execute all_lto_gen_passes.
      	* lto-streamer-out.c (lto_output, produce_asm_for_decls): No longer
      	static.
      	(pass_data_ipa_lto_gimple_out, pass_ipa_lto_gimple_out,
      	make_pass_ipa_lto_gimple_out, pass_data_ipa_lto_finish_out,
      	pass_ipa_lto_finish_out, make_pass_ipa_lto_finish_out): Remove.
      	* lto-streamer.h (lto_output, produce_asm_for_decls): Declare.
      	* pass-manager.h (GCC_PASS_LISTS, class pass_manager):
      	Remove all_lto_gen_passes.
      	* passes.c (pass_manager::dump_passes): Remove its use.
      	(pass_manager::register_pass): Likewise.
      	(ipa_read_summaries, ipa_read_optimization_summaries): Likewise.
      	(pass_manager::pass_manager): Don't initialize or use it.
      	(write_lto): New static function.
      	(ipa_write_summaries_1, ipa_write_optimization_summaries): Use it
      	instead of using all_lto_gen_passes.
      	* passes.def (all_lto_gen_passes, pass_ipa_lto_gimple_out,
      	pass_ipa_lto_finish_out): Delete.
      	* tree-pass.h (make_pass_ipa_lto_gimple_out,
      	make_pass_ipa_lto_finish_out): Don't declare.
      
      From-SVN: r204984
      Bernd Schmidt committed
    • libgcov-driver.c (get_gcov_dump_complete): Update comments. · 867c8b03
      	* libgcov-driver.c (get_gcov_dump_complete): Update comments.
      	(all_prg, crc32): Remove static vars.
      	(gcov_exit_compute_summary): Rewrite to return crc32; do not clear
      	all_prg.
      	(gcov_exit_merge_gcda): Add crc32 parameter.
      	(gcov_exit_merge_summary): Add crc32 and all_prg parameter;
      	do not account run if it was already accounted.
      	(gcov_exit_dump_gcov): Add crc32 and all_prg parameters.
      	(gcov_exit): Initialize all_prg; update.
      
      From-SVN: r204983
      Jan Hubicka committed
    • tree-ssa-threadupdate.c (redirection_data): Record two duplicated blocks instead of just one. · 2c2af141
      	* tree-ssa-threadupdate.c (redirection_data): Record two
      	duplicated blocks instead of just one.
      	(local_info): Explain why we don't create a template for the
      	second duplicated block in a thread path.
      	(create_block_for_threading): Accept argument indicating array
      	index into redirection_data to store its result.
      	(lookup_redirection_data): Initialize both duplicate blocks.
      	(ssa_create_duplicates): If a jump threading path needs multiple
      	blocks duplicated, then duplicate them.
      	(ssa_fix_duplicate_block_edges): Corresponding changes.
      	(ssa_fixup_template_block, thread_single_edge):  Likewise.
      
      From-SVN: r204982
      Jeff Law committed
    • invoke.texi: Extend -fsanitize=undefined documentation. · fc78704b
      	* doc/invoke.texi: Extend -fsanitize=undefined documentation.
      
      From-SVN: r204980
      Marek Polacek committed
    • re PR middle-end/56552 (conditional move can generate unnecessary conversion code) · 72b7c4bc
      2013-11-18  Andrew Pinski <apinski@cavium.com>
      	    Steve Ellcey  <sellcey@mips.com>
      
      	PR target/56552
      	* config/mips/mips.md (*mov<GPR:mode>_on_<MOVECC:mode>): Remove
      	type restriction from equality_operator on conditonal move.
      	(*mov<SCALARF:mode>_on_<MOVECC:mode>): Ditto.
      	(*mov<GPR:mode>_on_<GPR2:mode>_ne): New.
      
      Co-Authored-By: Steve Ellcey <sellcey@mips.com>
      
      From-SVN: r204979
      Andrew Pinski committed