summaryrefslogtreecommitdiff
path: root/patches/gcc/4.0.0/120-pr20815-fix.patch
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-23 17:08:09 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-23 17:08:09 (GMT)
commitb1e693e40281dc8c451e8892dfcdf55d78a4ade3 (patch)
treec276bc44f23b42895b459efbf2597f4bef378819 /patches/gcc/4.0.0/120-pr20815-fix.patch
parent3ad6464ffe38eb15591b404e0749aa89f4074fd1 (diff)
Renamed all patches file names so that locales are now irrelevant to sort the files.
Removed the locale check as it is now irrelevant. Removed the experimental binutils 2.17.50.0.xx: 2.18 is here now.
Diffstat (limited to 'patches/gcc/4.0.0/120-pr20815-fix.patch')
-rw-r--r--patches/gcc/4.0.0/120-pr20815-fix.patch121
1 files changed, 121 insertions, 0 deletions
diff --git a/patches/gcc/4.0.0/120-pr20815-fix.patch b/patches/gcc/4.0.0/120-pr20815-fix.patch
new file mode 100644
index 0000000..7ac8ab5
--- /dev/null
+++ b/patches/gcc/4.0.0/120-pr20815-fix.patch
@@ -0,0 +1,121 @@
+Date: 18 May 2005 22:47:59 -0000
+Message-ID: <20050518224759.7352.qmail@sourceware.org>
+From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
+To: dank@kegel.com
+References: <20050407215701.20815.dank@kegel.com>
+Reply-To: gcc-bugzilla@gcc.gnu.org
+Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
+
+
+------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
+Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
+
+>
+> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
+> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
+>
+> coverage_checksum_string already knows a bit about ignoring random seed
+> produced mess. It looks like this needs to be extended somehow to
+> handle namespaces too...
+
+This seems to solve the missmatch. Would it be possible to test it on
+bigger testcase and if it works distile a testcase that don't use
+file IO so it is more suitable for gcc regtesting?
+
+Index: coverage.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
+retrieving revision 1.6.2.12.2.12
+diff -c -3 -p -r1.6.2.12.2.12 coverage.c
+*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
+--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
+*************** coverage_checksum_string (unsigned chksu
+*** 471,505 ****
+ as the checksums are used only for sanity checking. */
+ for (i = 0; string[i]; i++)
+ {
+ if (!strncmp (string + i, "_GLOBAL__", 9))
+! for (i = i + 9; string[i]; i++)
+! if (string[i]=='_')
+! {
+! int y;
+! unsigned seed;
+! int scan;
+!
+! for (y = 1; y < 9; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 9 || string[i + 9] != '_')
+! continue;
+! for (y = 10; y < 18; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 18)
+! continue;
+! scan = sscanf (string + i + 10, "%X", &seed);
+! gcc_assert (scan);
+! if (seed != crc32_string (0, flag_random_seed))
+! continue;
+! string = dup = xstrdup (string);
+! for (y = 10; y < 18; y++)
+! dup[i + y] = '0';
+! break;
+! }
+ break;
+ }
+
+--- 471,511 ----
+ as the checksums are used only for sanity checking. */
+ for (i = 0; string[i]; i++)
+ {
++ int offset = 0;
++ if (!strncmp (string + i, "_GLOBAL__N_", 11))
++ offset = 11;
+ if (!strncmp (string + i, "_GLOBAL__", 9))
+! offset = 9;
+!
+! /* C++ namespaces do have scheme:
+! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
+! since filename might contain extra underscores there seems
+! to be no better chance then walk all possible offsets looking
+! for magicnuber. */
+! if (offset)
+! for (;string[offset]; offset++)
+! for (i = i + offset; string[i]; i++)
+! if (string[i]=='_')
+! {
+! int y;
+!
+! for (y = 1; y < 9; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 9 || string[i + 9] != '_')
+! continue;
+! for (y = 10; y < 18; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 18)
+! continue;
+! if (!dup)
+! string = dup = xstrdup (string);
+! for (y = 10; y < 18; y++)
+! dup[i + y] = '0';
+! }
+ break;
+ }
+
+
+
+--
+
+
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
+
+------- You are receiving this mail because: -------
+You reported the bug, or are watching the reporter.
+
+