Commit 1f651229 by Jan Hubicka Committed by Jan Hubicka

re PR gcov-profile/20815 (-fprofile-use barfs with "coverage mismatch for…

re PR gcov-profile/20815 (-fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'.")


	PR profile/20815
	PR profile/26399
	* coverage.c (coverage_checksum_string): Reorganize loop to not read
	after buffer.
	* g++.dg/bprob/g++-bprob-2.C: New testcase.

From-SVN: r112738
parent 3425c35f
2006-04-06 Jan Hubicka <jh@suse.cz>
PR profile/20815
PR profile/26399
* coverage.c (coverage_checksum_string): Reorganize loop to not read
after buffer.
2006-04-06 Mike Stump <mrs@apple.com> 2006-04-06 Mike Stump <mrs@apple.com>
* builtins.c (expand_builtin_longjmp):Use #ifdef instead of #if * builtins.c (expand_builtin_longjmp):Use #ifdef instead of #if
......
...@@ -457,7 +457,7 @@ coverage_checksum_string (unsigned chksum, const char *string) ...@@ -457,7 +457,7 @@ coverage_checksum_string (unsigned chksum, const char *string)
to be no better chance then walk all possible offsets looking to be no better chance then walk all possible offsets looking
for magicnuber. */ for magicnuber. */
if (offset) if (offset)
for (;string[offset]; offset++) {
for (i = i + offset; string[i]; i++) for (i = i + offset; string[i]; i++)
if (string[i]=='_') if (string[i]=='_')
{ {
...@@ -482,6 +482,7 @@ coverage_checksum_string (unsigned chksum, const char *string) ...@@ -482,6 +482,7 @@ coverage_checksum_string (unsigned chksum, const char *string)
} }
break; break;
} }
}
chksum = crc32_string (chksum, string); chksum = crc32_string (chksum, string);
if (dup) if (dup)
......
2006-04-06 Jan Hubicka <jh@suse.cz>
PR profile/26399
* g++.dg/bprob/g++-bprob-2.C: New testcase.
2006-04-06 Roger Sayle <roger@eyesopen.com> 2006-04-06 Roger Sayle <roger@eyesopen.com>
* g++.dg/conversion/nullptr1.C: New test case. * g++.dg/conversion/nullptr1.C: New test case.
namespace {
int calc(int j)
{
if (j==0) return 0;
return calc(j-1)*j % 17;
}
}
int main(void)
{
return calc(25);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment