This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/30629] New: [Regression:4.3/4.2] -g causes undefined references
- From: "mueller at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2007 15:46:15 -0000
- Subject: [Bug debug/30629] New: [Regression:4.3/4.2] -g causes undefined references
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider this testcase:
=== Cut ===
static int hacky_auxmaps[20000];
static signed int auxmap_used = 0;
static int *auxmap = &hacky_auxmaps[0];
static void
mc_pre_reg_read ( unsigned size)
{
vgPlain_message ("memcheck: auxmaps: %d auxmap entries in use", auxmap_used);
}
=== Cut ===
compiling it with -O2 -g results in an undefined reference to "hacky_auxmaps".
just compiling with -O2 or with -O0 fixes it.
--
Summary: [Regression:4.3/4.2] -g causes undefined references
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mueller at gcc dot gnu dot org
GCC host triplet: i686-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30629