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
This commit is contained in:
Jan Hubicka 2006-04-06 22:33:21 +02:00 committed by Jan Hubicka
parent 3425c35fca
commit 1f651229f0
4 changed files with 51 additions and 23 deletions

View File

@ -1,3 +1,10 @@
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>
* builtins.c (expand_builtin_longjmp):Use #ifdef instead of #if

View File

@ -457,7 +457,7 @@ coverage_checksum_string (unsigned chksum, const char *string)
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]=='_')
{
@ -482,6 +482,7 @@ coverage_checksum_string (unsigned chksum, const char *string)
}
break;
}
}
chksum = crc32_string (chksum, string);
if (dup)

View File

@ -1,3 +1,8 @@
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>
* g++.dg/conversion/nullptr1.C: New test case.

View File

@ -0,0 +1,15 @@
namespace {
int calc(int j)
{
if (j==0) return 0;
return calc(j-1)*j % 17;
}
}
int main(void)
{
return calc(25);
}