This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19985] [3.4/4.0/4.1 Regression] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
- From: "matz at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jun 2005 20:31:22 -0000
- Subject: [Bug middle-end/19985] [3.4/4.0/4.1 Regression] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
- References: <20050215214329.19985.lothar@xcerla.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From matz at suse dot de 2005-06-21 20:31 -------
This patch seems to be the reason for warnings like:
In file included from ../../gcc/gcov-io.h:239,
from ../../gcc/libgcov.c:51:
./auto-host.h:23:1: warning: "DEFAULT_USE_CXA_ATEXIT" redefined
In file included from ./tm.h:12,
from ../../gcc/libgcov.c:39:
../../gcc/defaults.h:712:1: warning: this is the location of the previous
definition
There are now many warnings of this type during building gcc. This is
because auto-host.h is now included, but _after_ all the other headers,
which do something like
#ifndef BLA
#define BLA ...
#endif
Because auto-host.h is not yet included there, BLA is not defined, so
the default will be defined, and then auto-host.h is included leading to
double definitions. libgcov.c talks about not able to include <config.h>
because that's for the host, not for the target. So I don't know if
auto-host.h (also for the host) should be included at all. But if it is,
then it has to be earlier. Perhaps in libgcov.c directly as first file.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985