From 6c0782b190ae85409e2b509586553cd540e3cc02 Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 11 Nov 2009 19:08:44 +0000 Subject: * lto-cgraph.c: Include gcov-io.h (output_profile_summary): New function. (output_cgraph): Use it. (input_profile_summary): New function. (input_cgraph): Use it. * coverage.c (build_ctr_info_value): Use varpool; initalize DECL_ASSEMBLER_NAME. (create_coverage): Likewise. * tree-profile.c (tree_init_ic_make_global_vars): Likewise. (tree_init_edge_profiler): Likewise. * Makefile.in (lto-cgraph.o): Add dependency on gcov-io.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154100 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index ebdc696218b..a223bc067e6 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -776,7 +776,7 @@ build_ctr_info_value (unsigned int counter, tree type) TREE_TYPE (tree_ctr_tables[counter]) = array_type; DECL_SIZE (tree_ctr_tables[counter]) = TYPE_SIZE (array_type); DECL_SIZE_UNIT (tree_ctr_tables[counter]) = TYPE_SIZE_UNIT (array_type); - assemble_variable (tree_ctr_tables[counter], 0, 0, 0); + varpool_finalize_decl (tree_ctr_tables[counter]); value = tree_cons (fields, build1 (ADDR_EXPR, TREE_TYPE (fields), @@ -795,6 +795,7 @@ build_ctr_info_value (unsigned int counter, tree type) TREE_PUBLIC (fn) = 1; DECL_ARTIFICIAL (fn) = 1; TREE_NOTHROW (fn) = 1; + DECL_ASSEMBLER_NAME (fn); /* Initialize assembler name so we can stream out. */ value = tree_cons (fields, build1 (ADDR_EXPR, TREE_TYPE (fields), fn), value); @@ -971,7 +972,7 @@ create_coverage (void) DECL_INITIAL (gcov_info) = t; /* Build structure. */ - assemble_variable (gcov_info, 0, 0, 0); + varpool_finalize_decl (gcov_info); /* Build a decl for __gcov_init. */ t = build_pointer_type (TREE_TYPE (gcov_info)); @@ -980,6 +981,7 @@ create_coverage (void) FUNCTION_DECL, get_identifier ("__gcov_init"), t); TREE_PUBLIC (t) = 1; DECL_EXTERNAL (t) = 1; + DECL_ASSEMBLER_NAME (t); /* Initialize assembler name so we can stream out. */ gcov_init = t; /* Generate a call to __gcov_init(&gcov_info). */ -- cgit v1.2.1 From 48e1416a24d50cacbb2a5e06a9ee61dd8cbee313 Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 25 Nov 2009 10:55:54 +0000 Subject: Remove trailing white spaces. 2009-11-25 H.J. Lu * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154645 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index a223bc067e6..e04d22b7a88 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -201,7 +201,7 @@ read_counts_file (void) /* Read and discard the stamp. */ gcov_read_unsigned (); - + counts_hash = htab_create (10, htab_counts_entry_hash, htab_counts_entry_eq, htab_counts_entry_del); @@ -779,7 +779,7 @@ build_ctr_info_value (unsigned int counter, tree type) varpool_finalize_decl (tree_ctr_tables[counter]); value = tree_cons (fields, - build1 (ADDR_EXPR, TREE_TYPE (fields), + build1 (ADDR_EXPR, TREE_TYPE (fields), tree_ctr_tables[counter]), value); } @@ -1003,14 +1003,14 @@ coverage_init (const char *filename) int len = strlen (filename); /* + 1 for extra '/', in case prefix doesn't end with /. */ int prefix_len; - + if (profile_data_prefix == 0 && filename[0] != '/') profile_data_prefix = getpwd (); prefix_len = (profile_data_prefix) ? strlen (profile_data_prefix) + 1 : 0; /* Name of da file. */ - da_file_name = XNEWVEC (char, len + strlen (GCOV_DATA_SUFFIX) + da_file_name = XNEWVEC (char, len + strlen (GCOV_DATA_SUFFIX) + prefix_len + 1); if (profile_data_prefix) -- cgit v1.2.1 From 21cd990df370bfeb0ed410b024a41176014959ad Mon Sep 17 00:00:00 2001 From: nvachhar Date: Tue, 4 May 2010 23:45:58 +0000 Subject: Sanitize the behavior of -Wcoverage-mismatch. 2010-05-04 Neil Vachharajani * doc/invoke.texi (-Wcoverage-mismatch): Updated documentation as per new semantics. * opts.c (decode_options): Enable -Werror=coverage-mismatch. * coverage.c (get_coverage_counts): Always emit a warning. Adjust conditions for printing notes. * common.opt (-Wcoverage-mismatch): Allow negative, default to true, update documentation. * Makefile.in (coverage.o): Add dependence on DIAGNOSTIC_H and intl.h. * testsuite/gcc.dg/tree-prof/wcoverage-mismatch.c: Adjusted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159050 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index e04d22b7a88..addfac90c21 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -46,6 +46,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-iterator.h" #include "cgraph.h" #include "tree-pass.h" +#include "diagnostic.h" +#include "intl.h" #include "gcov-io.c" @@ -357,34 +359,33 @@ get_coverage_counts (unsigned counter, unsigned expected, || entry->summary.num != expected) { static int warned = 0; + bool warning_printed = false; tree id = DECL_ASSEMBLER_NAME (current_function_decl); - if (warn_coverage_mismatch) - warning (OPT_Wcoverage_mismatch, "coverage mismatch for function " - "%qE while reading counter %qs", id, ctr_names[counter]); - else - error ("coverage mismatch for function %qE while reading counter %qs", - id, ctr_names[counter]); - - if (!inhibit_warnings) + warning_printed = + warning_at (input_location, OPT_Wcoverage_mismatch, + "coverage mismatch for function " + "%qE while reading counter %qs", id, ctr_names[counter]); + if (warning_printed) { if (entry->checksum != checksum) - inform (input_location, "checksum is %x instead of %x", entry->checksum, checksum); + inform (input_location, "checksum is %x instead of %x", + entry->checksum, checksum); else inform (input_location, "number of counters is %d instead of %d", entry->summary.num, expected); - } - - if (warn_coverage_mismatch - && !inhibit_warnings - && !warned++) - { - inform (input_location, "coverage mismatch ignored due to -Wcoverage-mismatch"); - inform (input_location, flag_guess_branch_prob - ? "execution counts estimated" - : "execution counts assumed to be zero"); - if (!flag_guess_branch_prob) - inform (input_location, "this can result in poorly optimized code"); + + if (!(errorcount || sorrycount) + && !warned++) + { + inform (input_location, "coverage mismatch ignored"); + inform (input_location, flag_guess_branch_prob + ? G_("execution counts estimated") + : G_("execution counts assumed to be zero")); + if (!flag_guess_branch_prob) + inform (input_location, + "this can result in poorly optimized code"); + } } return NULL; -- cgit v1.2.1 From 2100aa42ca651d9cb833b501a71d6a5a0f3967ad Mon Sep 17 00:00:00 2001 From: froydnj Date: Wed, 12 May 2010 15:33:10 +0000 Subject: * coverage.c (build_fn_info_value): Call build_constructor instead of build_constructor_from_list. (build_ctr_info_value): Likewise. (build_gcov_info): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159326 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 118 ++++++++++++++++++++++++--------------------------------- 1 file changed, 49 insertions(+), 69 deletions(-) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index addfac90c21..5ef4dddd812 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -672,40 +672,34 @@ build_fn_info_type (unsigned int counters) static tree build_fn_info_value (const struct function_list *function, tree type) { - tree value = NULL_TREE; tree fields = TYPE_FIELDS (type); unsigned ix; - tree array_value = NULL_TREE; + VEC(constructor_elt,gc) *v1 = NULL; + VEC(constructor_elt,gc) *v2 = NULL; /* ident */ - value = tree_cons (fields, build_int_cstu (get_gcov_unsigned_t (), - function->ident), value); + CONSTRUCTOR_APPEND_ELT (v1, fields, + build_int_cstu (get_gcov_unsigned_t (), + function->ident)); fields = TREE_CHAIN (fields); /* checksum */ - value = tree_cons (fields, build_int_cstu (get_gcov_unsigned_t (), - function->checksum), value); + CONSTRUCTOR_APPEND_ELT (v1, fields, + build_int_cstu (get_gcov_unsigned_t (), + function->checksum)); fields = TREE_CHAIN (fields); /* counters */ for (ix = 0; ix != GCOV_COUNTERS; ix++) if (prg_ctr_mask & (1 << ix)) - { - tree counters = build_int_cstu (get_gcov_unsigned_t (), - function->n_ctrs[ix]); + CONSTRUCTOR_APPEND_ELT (v2, NULL, + build_int_cstu (get_gcov_unsigned_t (), + function->n_ctrs[ix])); - array_value = tree_cons (NULL_TREE, counters, array_value); - } + CONSTRUCTOR_APPEND_ELT (v1, fields, + build_constructor (TREE_TYPE (fields), v2)); - /* FIXME: use build_constructor directly. */ - array_value = build_constructor_from_list (TREE_TYPE (fields), - nreverse (array_value)); - value = tree_cons (fields, array_value, value); - - /* FIXME: use build_constructor directly. */ - value = build_constructor_from_list (type, nreverse (value)); - - return value; + return build_constructor (type, v1); } /* Creates the gcov_ctr_info RECORD_TYPE. */ @@ -753,15 +747,14 @@ build_ctr_info_type (void) static tree build_ctr_info_value (unsigned int counter, tree type) { - tree value = NULL_TREE; tree fields = TYPE_FIELDS (type); tree fn; + VEC(constructor_elt,gc) *v = NULL; /* counters */ - value = tree_cons (fields, - build_int_cstu (get_gcov_unsigned_t (), - prg_n_ctrs[counter]), - value); + CONSTRUCTOR_APPEND_ELT (v, fields, + build_int_cstu (get_gcov_unsigned_t (), + prg_n_ctrs[counter])); fields = TREE_CHAIN (fields); if (prg_n_ctrs[counter]) @@ -779,13 +772,12 @@ build_ctr_info_value (unsigned int counter, tree type) DECL_SIZE_UNIT (tree_ctr_tables[counter]) = TYPE_SIZE_UNIT (array_type); varpool_finalize_decl (tree_ctr_tables[counter]); - value = tree_cons (fields, - build1 (ADDR_EXPR, TREE_TYPE (fields), - tree_ctr_tables[counter]), - value); + CONSTRUCTOR_APPEND_ELT (v, fields, + build1 (ADDR_EXPR, TREE_TYPE (fields), + tree_ctr_tables[counter])); } else - value = tree_cons (fields, null_pointer_node, value); + CONSTRUCTOR_APPEND_ELT (v, fields, null_pointer_node); fields = TREE_CHAIN (fields); fn = build_decl (BUILTINS_LOCATION, @@ -797,14 +789,9 @@ build_ctr_info_value (unsigned int counter, tree type) DECL_ARTIFICIAL (fn) = 1; TREE_NOTHROW (fn) = 1; DECL_ASSEMBLER_NAME (fn); /* Initialize assembler name so we can stream out. */ - value = tree_cons (fields, - build1 (ADDR_EXPR, TREE_TYPE (fields), fn), - value); - - /* FIXME: use build_constructor directly. */ - value = build_constructor_from_list (type, nreverse (value)); + CONSTRUCTOR_APPEND_ELT (v, fields, build1 (ADDR_EXPR, TREE_TYPE (fields), fn)); - return value; + return build_constructor (type, v); } /* Creates the gcov_info RECORD_TYPE and initializer for it. Returns a @@ -819,12 +806,13 @@ build_gcov_info (void) tree fn_info_ptr_type; tree ctr_info_type, ctr_info_ary_type, ctr_info_value = NULL_TREE; tree field, fields = NULL_TREE; - tree value = NULL_TREE; tree filename_string; int da_file_name_len; unsigned n_fns; const struct function_list *fn; tree string_type; + VEC(constructor_elt,gc) *v1 = NULL; + VEC(constructor_elt,gc) *v2 = NULL; /* Count the number of active counters. */ for (n_ctr_types = 0, ix = 0; ix != GCOV_COUNTERS; ix++) @@ -839,23 +827,23 @@ build_gcov_info (void) FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); TREE_CHAIN (field) = fields; fields = field; - value = tree_cons (field, build_int_cstu (TREE_TYPE (field), GCOV_VERSION), - value); + CONSTRUCTOR_APPEND_ELT (v1, field, + build_int_cstu (TREE_TYPE (field), GCOV_VERSION)); /* next -- NULL */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, build_pointer_type (const_type)); TREE_CHAIN (field) = fields; fields = field; - value = tree_cons (field, null_pointer_node, value); + 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; fields = field; - value = tree_cons (field, build_int_cstu (TREE_TYPE (field), local_tick), - value); + CONSTRUCTOR_APPEND_ELT (v1, field, + build_int_cstu (TREE_TYPE (field), local_tick)); /* Filename */ string_type = build_pointer_type (build_qualified_type (char_type_node, @@ -869,17 +857,17 @@ build_gcov_info (void) TREE_TYPE (filename_string) = build_array_type (char_type_node, build_index_type (build_int_cst (NULL_TREE, da_file_name_len))); - value = tree_cons (field, build1 (ADDR_EXPR, string_type, filename_string), - value); + CONSTRUCTOR_APPEND_ELT (v1, field, + build1 (ADDR_EXPR, string_type, filename_string)); /* Build the fn_info type and initializer. */ fn_info_type = build_fn_info_type (n_ctr_types); fn_info_ptr_type = build_pointer_type (build_qualified_type (fn_info_type, TYPE_QUAL_CONST)); for (fn = functions_head, n_fns = 0; fn; fn = fn->next, n_fns++) - fn_info_value = tree_cons (NULL_TREE, - build_fn_info_value (fn, fn_info_type), - fn_info_value); + CONSTRUCTOR_APPEND_ELT (v2, NULL_TREE, + build_fn_info_value (fn, fn_info_type)); + if (n_fns) { tree array_type; @@ -887,9 +875,7 @@ build_gcov_info (void) array_type = build_index_type (build_int_cst (NULL_TREE, n_fns - 1)); array_type = build_array_type (fn_info_type, array_type); - /* FIXME: use build_constructor directly. */ - fn_info_value = build_constructor_from_list (array_type, - nreverse (fn_info_value)); + fn_info_value = build_constructor (array_type, v2); fn_info_value = build1 (ADDR_EXPR, fn_info_ptr_type, fn_info_value); } else @@ -900,52 +886,46 @@ build_gcov_info (void) FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); TREE_CHAIN (field) = fields; fields = field; - value = tree_cons (field, - build_int_cstu (get_gcov_unsigned_t (), n_fns), - value); + CONSTRUCTOR_APPEND_ELT (v1, field, + build_int_cstu (get_gcov_unsigned_t (), n_fns)); /* fn_info table */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, fn_info_ptr_type); TREE_CHAIN (field) = fields; fields = field; - value = tree_cons (field, fn_info_value, value); + 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; fields = field; - value = tree_cons (field, - build_int_cstu (get_gcov_unsigned_t (), prg_ctr_mask), - value); + CONSTRUCTOR_APPEND_ELT (v1, field, + build_int_cstu (get_gcov_unsigned_t (), + prg_ctr_mask)); /* counters */ ctr_info_type = build_ctr_info_type (); ctr_info_ary_type = build_index_type (build_int_cst (NULL_TREE, n_ctr_types)); ctr_info_ary_type = build_array_type (ctr_info_type, ctr_info_ary_type); + v2 = NULL; for (ix = 0; ix != GCOV_COUNTERS; ix++) if (prg_ctr_mask & (1 << ix)) - ctr_info_value = tree_cons (NULL_TREE, - build_ctr_info_value (ix, ctr_info_type), - ctr_info_value); - /* FIXME: use build_constructor directly. */ - ctr_info_value = build_constructor_from_list (ctr_info_ary_type, - nreverse (ctr_info_value)); + CONSTRUCTOR_APPEND_ELT (v2, NULL_TREE, + build_ctr_info_value (ix, ctr_info_type)); + ctr_info_value = build_constructor (ctr_info_ary_type, v2); field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, ctr_info_ary_type); TREE_CHAIN (field) = fields; fields = field; - value = tree_cons (field, ctr_info_value, value); + CONSTRUCTOR_APPEND_ELT (v1, field, ctr_info_value); finish_builtin_struct (type, "__gcov_info", fields, NULL_TREE); - /* FIXME: use build_constructor directly. */ - value = build_constructor_from_list (type, nreverse (value)); - - return value; + return build_constructor (type, v1); } /* Write out the structure which libgcov uses to locate all the -- cgit v1.2.1 From a79e752360d02b4d5cc3989801535727e4e82644 Mon Sep 17 00:00:00 2001 From: steven Date: Sun, 23 May 2010 15:40:15 +0000 Subject: * regs.h: Do not include obstack.h, basic-block.h. Include machmode.h. * jump.c: Include basic-block.h. * profile.c: Likewise. * tree-profile.c: Likewise. * coverage.c: Likewise. * basic-block.h (optimize_function_for_size_p): Move to function.h. (optimize_function_for_speed_p): Likewise. * function.h (optimize_function_for_size_p, optimize_function_for_speed_p): Moved here from basic-block.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159761 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index 5ef4dddd812..065c87cd364 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "regs.h" #include "expr.h" #include "function.h" +#include "basic-block.h" #include "toplev.h" #include "tm_p.h" #include "ggc.h" -- cgit v1.2.1 From 852f689eb9b7f6d7aafc2f72007e96129ac9bd45 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Thu, 27 May 2010 20:16:07 +0000 Subject: * diagnostic-core.h: New. Contents moved from diagnostic.h and toplev.h. * diagnostic.c: Don't include toplev.h. (progname): Define. Moved from toplev.c. (seen_error): New function. * diagnostic.h: Include diagnostic-core.h. (diagnostic_t, emit_diagnostic): Don't declare here. * toplev.c (progname): Move to toplev.c. (emit_debug_global_declarations, compile_file, finalize, do_compile, toplev_main): Use seen_error. * toplev.h: Include diagnostic-core.h. (trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG, internal_error, warning, warning_at, error, error_n, error_at, fatal_error, pedwarn, permerror, sorry, inform, inform_n, verbatim, fnotice, progname): Move to diagnostic-core.h. * builtins.c: Include diagnostic-core.h instead of diagnostic.h. (expand_builtin_expect): Use seen_error. * c-decl.c: Include diagnostic-core.h instead of diagnostic.h. (c_make_fname_decl, c_write_global_declarations): Use seen_error. * c-format.c: Include diagnostic-core.h instead of diagnostic.h. * c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h. * c-lang.c: Include diagnostic-core.h instead of diagnostic.h. * c-lex.c (c_lex_with_flags, interpret_float): Don't increment errorcount for errors. * c-opts.c (c_common_finish): Use seen_error. * cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * cgraphunit.c (verify_cgraph_node, verify_cgraph, cgraph_output_pending_asms, cgraph_optimize): Use seen_error. * coverage.c: Include diagnostic-core.h instead of diagnostic.h. (get_coverage_counts): Use seen_error. * dwarf2out.c (dwarf2out_finish): Use seen_error. * gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup, gimplify_body): Use seen_error. * ipa-inline.c (cgraph_early_inlining): Use seen_error. * ipa-pure-const.c (gate_pure_const): Use seen_error. * ipa-reference.c (gate_reference): Use seen_error. * jump.c: Include diagnostic-core.h instead of diagnostic.h. * lambda-code.c: Include diagnostic-core.h instead of diagnostic.h. * lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * lto-compress.c: Include diagnostic-core.h instead of diagnostic.h. * lto-section-in.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer-out.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer.c: Include diagnostic-core.h instead of diagnostic.h. (gate_lto_out): Use seen_error. * matrix-reorg.c: Include diagnostic-core.h instead of diagnostic.h. * omega.c: Include diagnostic-core.h instead of diagnostic.h. * omp-low.c: Include diagnostic-core.h instead of diagnostic.h. (gate_expand_omp, lower_omp_1): Use seen_error. * passes.c: Include diagnostic-core.h instead of diagnostic.h. (rest_of_decl_compilation, rest_of_type_compilation, gate_rest_of_compilation, ipa_write_summaries): Use seen_error. * tree-cfg.c (label_to_block_fn): Use seen_error. * tree-inline.c (optimize_inline_calls): Use seen_error. * tree-mudflap.c (mudflap_finish_file): Use seen_error. * tree-optimize.c (gate_all_optimizations, gate_all_early_local_passes, gate_all_early_optimizations): Use seen_error. * tree-ssa-structalias.c (gate_ipa_pta): Use seen_error. * varpool.c: Include diagnostic-core.h instead of diagnostic.h. (varpool_remove_unreferenced_decls, varpool_assemble_pending_decls): Use seen_error. * Makefile.in (DIAGNOSTIC_CORE_H): Define. (TOPLEV_H, DIAGNOSTIC_H): Update. (c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o, lto-streamer-out.o, lto-section-in.o, lto-streamer.o, c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o, builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o, coverage.o, lambda-code.o): Update dependencies. cp: * call.c: Include diagnostic-core.h instead of diagnostic.h. * cp-lang.c: Don't include diagnostic.h * name-lookup.c: Include diagnostic-core.h instead of diagnostic.h. (cp_emit_debug_info_for_using): Use seen_error. * optimize.c: Include diagnostic-core.h instead of diagnostic.h. * parser.c: Include diagnostic-core.h instead of diagnostic.h. * pt.c (iterative_hash_template_arg): Use seen_error. * repo.c: Include diagnostic-core.h instead of diagnostic.h. * typeck2.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o, cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update dependencies. lto: * lto.c: Include diagnostic-core.h instead of diagnostic.h. (read_cgraph_and_symbols, lto_main): Use seen_error. * Make-lang.in (lto/lto.o): Update dependencies. objc: * objc-act.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (objc/objc-act.o): Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159947 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index 065c87cd364..9b8a6900e6b 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -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. @@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see #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" @@ -376,7 +376,7 @@ get_coverage_counts (unsigned counter, unsigned expected, 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"); -- cgit v1.2.1 From 1767a056f10a2ccbc900df04d01193da73a3d272 Mon Sep 17 00:00:00 2001 From: froydnj Date: Thu, 15 Jul 2010 14:31:28 +0000 Subject: gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162223 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/coverage.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'gcc/coverage.c') diff --git a/gcc/coverage.c b/gcc/coverage.c index 9b8a6900e6b..20aaa1074ce 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -648,7 +648,7 @@ build_fn_info_type (unsigned int counters) /* 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); @@ -658,7 +658,7 @@ build_fn_info_type (unsigned int counters) /* 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); @@ -682,13 +682,13 @@ build_fn_info_value (const struct function_list *function, tree type) 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++) @@ -716,13 +716,13 @@ build_ctr_info_type (void) /* 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 */ @@ -733,7 +733,7 @@ build_ctr_info_type (void) 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); @@ -756,7 +756,7 @@ build_ctr_info_value (unsigned int counter, tree type) 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]) { @@ -779,7 +779,7 @@ build_ctr_info_value (unsigned int counter, tree type) } else CONSTRUCTOR_APPEND_ELT (v, fields, null_pointer_node); - fields = TREE_CHAIN (fields); + fields = DECL_CHAIN (fields); fn = build_decl (BUILTINS_LOCATION, FUNCTION_DECL, @@ -826,7 +826,7 @@ build_gcov_info (void) /* 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)); @@ -834,14 +834,14 @@ build_gcov_info (void) /* 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)); @@ -851,7 +851,7 @@ build_gcov_info (void) 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); @@ -885,7 +885,7 @@ build_gcov_info (void) /* 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)); @@ -893,14 +893,14 @@ build_gcov_info (void) /* 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 (), @@ -920,7 +920,7 @@ build_gcov_info (void) 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); -- cgit v1.2.1