Mercurial > hg > CbC > CbC_gcc
diff gcc/coverage.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
line wrap: on
line diff
--- a/gcc/coverage.c Tue May 25 18:58:51 2010 +0900 +++ b/gcc/coverage.c Tue Mar 22 17:18:12 2011 +0900 @@ -1,7 +1,7 @@ /* Read and write coverage files, and associated functionality. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, - 2000, 2001, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, - Inc. + 2000, 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. Contributed by James E. Wilson, UC Berkeley/Cygnus Support; based on some ideas from Dain Samples of UC Berkeley. Further mangling by Bob Manson, Cygnus Support. @@ -37,6 +37,7 @@ #include "regs.h" #include "expr.h" #include "function.h" +#include "basic-block.h" #include "toplev.h" #include "tm_p.h" #include "ggc.h" @@ -46,7 +47,7 @@ #include "tree-iterator.h" #include "cgraph.h" #include "tree-pass.h" -#include "diagnostic.h" +#include "diagnostic-core.h" #include "intl.h" #include "gcov-io.c" @@ -103,10 +104,6 @@ /* Trees representing the counter table arrays. */ static GTY(()) tree tree_ctr_tables[GCOV_COUNTERS]; -/* The names of the counter tables. Not used if we're - generating counters at tree level. */ -static GTY(()) rtx ctr_labels[GCOV_COUNTERS]; - /* The names of merge functions for counters. */ static const char *const ctr_merge_functions[GCOV_COUNTERS] = GCOV_MERGE_FUNCTIONS; static const char *const ctr_names[GCOV_COUNTERS] = GCOV_COUNTER_NAMES; @@ -375,7 +372,7 @@ inform (input_location, "number of counters is %d instead of %d", entry->summary.num, expected); - if (!(errorcount || sorrycount) + if (!seen_error () && !warned++) { inform (input_location, "coverage mismatch ignored"); @@ -647,7 +644,7 @@ /* checksum */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; array_type = build_int_cst (NULL_TREE, counters - 1); @@ -657,7 +654,7 @@ /* counters */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, array_type); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; finish_builtin_struct (type, "__gcov_fn_info", fields, NULL_TREE); @@ -681,13 +678,13 @@ CONSTRUCTOR_APPEND_ELT (v1, fields, build_int_cstu (get_gcov_unsigned_t (), function->ident)); - fields = TREE_CHAIN (fields); + fields = DECL_CHAIN (fields); /* checksum */ CONSTRUCTOR_APPEND_ELT (v1, fields, build_int_cstu (get_gcov_unsigned_t (), function->checksum)); - fields = TREE_CHAIN (fields); + fields = DECL_CHAIN (fields); /* counters */ for (ix = 0; ix != GCOV_COUNTERS; ix++) @@ -715,13 +712,13 @@ /* counters */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; /* values */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, gcov_ptr_type); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; /* merge */ @@ -732,7 +729,7 @@ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, build_pointer_type (gcov_merge_fn_type)); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; finish_builtin_struct (type, "__gcov_ctr_info", fields, NULL_TREE); @@ -755,7 +752,7 @@ CONSTRUCTOR_APPEND_ELT (v, fields, build_int_cstu (get_gcov_unsigned_t (), prg_n_ctrs[counter])); - fields = TREE_CHAIN (fields); + fields = DECL_CHAIN (fields); if (prg_n_ctrs[counter]) { @@ -778,7 +775,7 @@ } else CONSTRUCTOR_APPEND_ELT (v, fields, null_pointer_node); - fields = TREE_CHAIN (fields); + fields = DECL_CHAIN (fields); fn = build_decl (BUILTINS_LOCATION, FUNCTION_DECL, @@ -825,7 +822,7 @@ /* Version ident */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, build_int_cstu (TREE_TYPE (field), GCOV_VERSION)); @@ -833,14 +830,14 @@ /* next -- NULL */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, build_pointer_type (const_type)); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, null_pointer_node); /* stamp */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, build_int_cstu (TREE_TYPE (field), local_tick)); @@ -850,7 +847,7 @@ TYPE_QUAL_CONST)); field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, string_type); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; da_file_name_len = strlen (da_file_name); filename_string = build_string (da_file_name_len + 1, da_file_name); @@ -884,7 +881,7 @@ /* number of functions */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, build_int_cstu (get_gcov_unsigned_t (), n_fns)); @@ -892,14 +889,14 @@ /* fn_info table */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, fn_info_ptr_type); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, fn_info_value); /* counter_mask */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, build_int_cstu (get_gcov_unsigned_t (), @@ -919,7 +916,7 @@ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, ctr_info_ary_type); - TREE_CHAIN (field) = fields; + DECL_CHAIN (field) = fields; fields = field; CONSTRUCTOR_APPEND_ELT (v1, field, ctr_info_value);