This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/30629] New: [Regression:4.3/4.2] -g causes undefined references


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]