* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194470
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
/* 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++;
+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
--- /dev/null
+// 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;
+}
--- /dev/null
+int
+main ()
+{
+}