diff options
author | Andreas Jaeger <aj@suse.de> | 2001-07-30 20:04:33 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2001-07-30 20:04:33 +0200 |
commit | 57cb6d521aff11ba862ad3b72fa4eb97fcf5c116 (patch) | |
tree | 6f14be388d2d55c84523eb6739cdd6963a3f8f37 /gcc/gcov.c | |
parent | d76cbbc844a6f08555965f384c094f0626da8d3d (diff) | |
download | gcc-57cb6d521aff11ba862ad3b72fa4eb97fcf5c116.zip gcc-57cb6d521aff11ba862ad3b72fa4eb97fcf5c116.tar.gz gcc-57cb6d521aff11ba862ad3b72fa4eb97fcf5c116.tar.bz2 |
jump.c: Add prototype for mark_modified_reg.
* jump.c: Add prototype for mark_modified_reg.
* cse.c (set_live_p): Add unused attribute.
* gcov.c (calculate_branch_probs): Use gcov_type to avoid
overflow.
(scan_for_source_files): Use long for count to avoid overflow.
(output_data): Likewise.
(output_data): Don't use string concatatenation to silence gcc
-traditional.
* predict.c: Fix typos and grammar.
* gcse.c (insert_insn_end_bb): Remove unused variables.
For cp:
* decl2.c: Remove unused var global_temp_name_counter.
From-SVN: r44479
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 56 |
1 files changed, 34 insertions, 22 deletions
@@ -788,7 +788,7 @@ scan_for_source_files () { struct sourcefile *s_ptr = NULL; char *ptr; - int count; + long count; long line_num; /* Search the bb_data to find: @@ -878,7 +878,7 @@ calculate_branch_probs (current_graph, block_num, branch_probs, last_line_num) struct arcdata **branch_probs; int last_line_num; { - int total; + gcov_type total; struct adj_list *arcptr; struct arcdata *end_ptr, *a_ptr; @@ -990,7 +990,7 @@ output_data () char *source_file_name; FILE *source_file; struct bb_info_list *current_graph; - int count; + long count; char *cptr; long block_num; long line_num; @@ -1360,16 +1360,23 @@ output_data () else { if (output_branch_counts) - fnotice (gcov_file, - "call %d returns = " - HOST_WIDEST_INT_PRINT_DEC "\n", - i, a_ptr->total - a_ptr->hits); + { + char c[20]; + sprintf (c, HOST_WIDEST_INT_PRINT_DEC, + a_ptr->total - a_ptr->hits); + fnotice (gcov_file, + "call %d returns = %s\n", i, c); + } else - fnotice (gcov_file, - "call %d returns = " - HOST_WIDEST_INT_PRINT_DEC "%%\n", - i, 100 - ((a_ptr->hits * 100) + - (a_ptr->total >> 1))/a_ptr->total); + { + char c[20]; + sprintf (c, HOST_WIDEST_INT_PRINT_DEC, + 100 - ((a_ptr->hits * 100) + + (a_ptr->total >> 1)) + / a_ptr->total); + fnotice (gcov_file, + "call %d returns = %s%%\n", i, c); + } } } else @@ -1380,18 +1387,23 @@ output_data () else { if (output_branch_counts) - fnotice (gcov_file, - "branch %d taken = " - HOST_WIDEST_INT_PRINT_DEC "\n", - i, a_ptr->hits); + { + char c[20]; + sprintf (c, HOST_WIDEST_INT_PRINT_DEC, + a_ptr->hits); + fnotice (gcov_file, + "branch %d taken = %s\n", i, c); + } else + { + char c[20]; + sprintf (c, HOST_WIDEST_INT_PRINT_DEC, + ((a_ptr->hits * 100) + + (a_ptr->total >> 1)) + / a_ptr->total); fnotice (gcov_file, - "branch %d taken = " - HOST_WIDEST_INT_PRINT_DEC "%%\n", i, - ((a_ptr->hits * 100) + - (a_ptr->total >> 1))/ - a_ptr->total); - + "branch %d taken = %s%%\n", i, c); + } } } } |