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