re PR gcov-profile/55650 (Firefox profiledbuild: libxul.so: cannot map zero-fill pages: Cannot allocate memory)

PR gcov-profile/55650
	* coverage.c (coverage_obj_init): Return false if no functions
	are being emitted.

	* g++.dg/other/pr55650.C: New test.
	* g++.dg/other/pr55650.cc: New file.

From-SVN: r194470
This commit is contained in:
Jakub Jelinek 2012-12-13 11:11:39 +01:00 committed by Jakub Jelinek
parent 3c53f55a97
commit 0f9fb22fd5
5 changed files with 40 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2012-12-13 Jakub Jelinek <jakub@redhat.com>
PR gcov-profile/55650
* coverage.c (coverage_obj_init): Return false if no functions
are being emitted.
2012-12-13 Steven Bosscher <steven@gcc.gnu.org>
* bitmap.c (struct bitmap_descriptor): Remove forward declaration.

View file

@ -999,6 +999,9 @@ coverage_obj_init (void)
/* The function is not being emitted, remove from list. */
*fn_prev = fn->next;
if (functions_head == NULL)
return false;
for (ix = 0; ix != GCOV_COUNTERS; ix++)
if ((1u << ix) & prg_ctr_mask)
n_counters++;

View file

@ -1,3 +1,9 @@
2012-12-13 Jakub Jelinek <jakub@redhat.com>
PR gcov-profile/55650
* g++.dg/other/pr55650.C: New test.
* g++.dg/other/pr55650.cc: New file.
2012-12-12 Jakub Jelinek <jakub@redhat.com>
PR debug/55665

View file

@ -0,0 +1,21 @@
// PR gcov-profile/55650
// { dg-do link }
// { dg-options "-O2 -fprofile-generate" }
// { dg-additional-sources "pr55650.cc" }
struct A
{
virtual void foo ();
};
struct B : public A
{
B ();
void foo () {}
};
inline A *
bar ()
{
return new B;
}

View file

@ -0,0 +1,4 @@
int
main ()
{
}