2014-07-10 Rong Xu <xur@google.com>
Add gcov-tool: an offline gcda profile processing tool
Support.
* gcc/gcov-io.c (gcov_position): Make avaialble to gcov-tool.
(gcov_is_error): Ditto.
(gcov_read_string): Ditto.
(gcov_read_sync): Ditto.
* gcc/gcov-io.h: Move counter defines to gcov-counter.def.
* gcc/gcov-dump.c (tag_counters): Use gcov-counter.def.
* gcc/coverage.c: Ditto.
* gcc/gcov-tool.c: Offline gcda profile processing tool.
(unlink_gcda_file): Remove one gcda file.
(unlink_profile_dir): Remove gcda files from the profile path.
(gcov_output_files): Output gcda files to an output dir.
(profile_merge): Merge two profiles in directory.
(print_merge_usage_message): Print merge usage.
(merge_usage): Print merge usage and exit.
(do_merge): Driver for profile merge sub-command.
(profile_rewrite): Rewrite profile.
(print_rewrite_usage_message): Print rewrite usage.
(rewrite_usage): Print rewrite usage and exit.
(do_rewrite): Driver for profile rewrite sub-command.
(print_usage): Print gcov-info usage and exit.
(print_version): Print gcov-info version.
(process_args): Process arguments.
(main): Main routine for gcov-tool.
* gcc/Makefile.in: Build and install gcov-tool.
* gcc/gcov-counter.def: New file split from gcov-io.h.
* libgcc/libgcov-driver.c (gcov_max_filename): Make available
to gcov-tool.
* libgcc/libgcov-merge.c (__gcov_merge_add): Replace
gcov_read_counter() with a Macro.
(__gcov_merge_ior): Ditto.
(__gcov_merge_time_profile): Ditto.
(__gcov_merge_single): Ditto.
(__gcov_merge_delta): Ditto.
* libgcc/libgcov-util.c (void gcov_set_verbose): Set the verbose flag
in the utility functions.
(set_fn_ctrs): Utility function for reading gcda files to in-memory
gcov_list object link lists.
(tag_function): Ditto.
(tag_blocks): Ditto.
(tag_arcs): Ditto.
(tag_lines): Ditto.
(tag_counters): Ditto.
(tag_summary): Ditto.
(read_gcda_finalize): Ditto.
(read_gcda_file): Ditto.
(ftw_read_file): Ditto.
(read_profile_dir_init): Ditto.
(gcov_read_profile_dir): Ditto.
(gcov_read_counter_mem): Ditto.
(gcov_get_merge_weight): Ditto.
(merge_wrapper): A wrapper function that calls merging handler.
(gcov_merge): Merge two gcov_info objects with weights.
(find_match_gcov_info): Find the matched gcov_info in the list.
(gcov_profile_merge): Merge two gcov_info object lists.
(__gcov_add_counter_op): Process edge profile counter values.
(__gcov_ior_counter_op): Process IOR profile counter values.
(__gcov_delta_counter_op): Process delta profile counter values.
(__gcov_single_counter_op): Process single profile counter values.
(fp_scale): Callback function for float-point scaling.
(int_scale): Callback function for integer fraction scaling.
(gcov_profile_scale): Scaling profile counters.
(gcov_profile_normalize): Normalize profile counters.
* libgcc/libgcov.h: Add headers and functions for gcov-tool use.
(gcov_get_counter): New.
(gcov_get_counter_target): Ditto.
(struct gcov_info): Make the functions field mutable in gcov-tool
compilation.
* gcc/doc/gcc.texi: Include gcov-tool.texi.
* gcc/doc/gcov-tool.texi: Document for gcov-tool.
From-SVN: r212448
2014-07-10 Edward Smith-Rowland <3dw4rd@verizon.net>
Jonathan Wakely <jwakely@redhat.com>
PR CPP/61389
* macro.c (_cpp_arguments_ok, parse_params, create_iso_definition):
Warning messages mention C++11 in c++ mode and C99 in c mode.
* lex.c (lex_identifier_intern, lex_identifier): Ditto
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r212441
PR c++/61659
PR c++/61687
gcc/c-family/
* c.opt (-fuse-all-virtuals): New.
gcc/cp/
* decl2.c (mark_all_virtuals): New variable.
(maybe_emit_vtables): Check it instead of flag_devirtualize.
(cp_write_global_declarations): Set it and give helpful diagnostic
if it introduces errors.
* class.c (finish_struct_1): Check it.
* decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
From-SVN: r212436
2014-07-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/61757
* tree-ssa-dom.c (loop_depth_of_name): Restore.
(propagate_rhs_into_lhs): Revert part of last change.
From-SVN: r212433
PR tree-optimization/61742
gcc/testsuite/
* gcc.dg/torture/pr61742.c: New test.
* gcc.gg/vect/cond-reduc-1.c: Rename it to vect-cond-reduc-1.c
* gcc.gg/vect/cond-reduc-2.c: Rename it to vect-cond-reduc-2.c
From-SVN: r212421
/cp
2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60686
* decl.c (grokdeclarator): Adjust error messages about 'explicit'
outside class declaration, in friend declaration, and neither on
constructor nor conversion operator.
/testsuite
2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60686
* g++.dg/cpp0x/explicit8.C: New.
From-SVN: r212415
2014-07-09 Tom de Vries <tom@codesourcery.com>
* final.c (get_call_fndecl): Declare.
(self_recursive_call_p): New function.
(collect_fn_hard_reg_usage): Handle self-recursive function calls.
* gcc.target/i386/fuse-caller-save-rec.c: New test.
From-SVN: r212409
2014-07-09 Richard Biener <rguenther@suse.de>
PR c-family/61741
* c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
using unsigned arithmetic if overflow does not wrap instead of
if overflow is undefined.
* c-c++-common/torture/pr61741.c: New testcase.
From-SVN: r212400
* rs6000/rs6000-protos.h (rs6000_xcoff_declare_object_name): Declare.
* rs6000/rs6000.c: Inline output of .set instruction.
(declare_alias_data): New struct.
(rs6000_declare_alias): New function.
(rs6000_xcoff_declare_function_name): Use it.
(rs6000_xcoff_declare_object_name): New function.
* config/rs6000/xcoff.h: Define ASM_DECLARE_OBJECT_NAME.
(ASM_OUTPUT_DEF): Turn to empty definition.
From-SVN: r212394
libcpp/
2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
by preprocessor
* lex.c (lex_raw_string ()): Do not warn about invalid suffix
if skipping. (lex_string ()): Ditto.
gcc/testsuite/
2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
g++.dg/cpp0x/pr58155.C: New.
From-SVN: r212392
gcc/
PR bootstrap/61679
* hash-table.h: use hash_table::value_type instead of
Descriptor::value_type in the return types of several methods.
From-SVN: r212384
PR rtl-optimization/61673
* combine.c (simplify_comparison): Test just mode's sign bit
in tmode rather than the sign bit and any bits above it.
* gcc.c-torture/execute/pr61673.c: New test.
From-SVN: r212364
PR tree-optimization/61725
* tree-vrp.c (extract_range_basic): Don't assume vr0 is unsigned
range, use range_includes_zerop_p instead of integer_zerop on
vr0->min, only use log2 of max if min is not negative.
* gcc.dg/tree-ssa/vrp93.c: New test.
* gcc.c-torture/execute/pr61725.c: New test.
From-SVN: r212353