diff options
author | David Li <davidxl@google.com> | 2012-04-09 19:00:31 +0000 |
---|---|---|
committer | David Li <davidxl@google.com> | 2012-04-09 19:00:31 +0000 |
commit | 6fb25e3f3163a09a1a8553db1c347feb4dfdce02 (patch) | |
tree | 47093360d2852acd8fa452b9204821fe211d7f67 /libgcc/libgcov.c | |
parent | 0c3a8cdc6867467bcdd7a7dae900df2e39f4669f (diff) |
Fix a LIPO profile-gen bug
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/gcc-4_7@186245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/libgcov.c')
-rw-r--r-- | libgcc/libgcov.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libgcc/libgcov.c b/libgcc/libgcov.c index d4886a2330d..1365716d8f7 100644 --- a/libgcc/libgcov.c +++ b/libgcc/libgcov.c @@ -827,7 +827,7 @@ gcov_merge_gcda_file (struct gcov_info *gi_ptr) #ifndef __GCOV_KERNEL__ const struct gcov_fn_info *gfi_ptr; int error = 0; - gcov_unsigned_t tag, length; + gcov_unsigned_t tag, length, version, stamp; eof_pos = 0; summary_pos = 0; @@ -841,12 +841,12 @@ gcov_merge_gcda_file (struct gcov_info *gi_ptr) gcov_error ("profiling:%s:Not a gcov data file\n", gi_filename); goto read_fatal; } - length = gcov_read_unsigned (); - if (!gcov_version (gi_ptr, length, gi_filename)) + version = gcov_read_unsigned (); + if (!gcov_version (gi_ptr, version, gi_filename)) goto read_fatal; - length = gcov_read_unsigned (); - if (length != gi_ptr->stamp) + stamp = gcov_read_unsigned (); + if (stamp != gi_ptr->stamp) /* Read from a different compilation. Overwrite the file. */ goto rewrite; @@ -921,7 +921,7 @@ gcov_merge_gcda_file (struct gcov_info *gi_ptr) if ((error = gcov_is_error ())) goto read_error; } - if (tag) + if (tag && tag != GCOV_TAG_MODULE_INFO) { read_mismatch:; fprintf (stderr, "profiling:%s:Merge mismatch for %s\n", |