[gnu.g++.bug] libg++ 1.36.1 on Sun 4/110: -g flag introduced a spurious symbol

root%glycine@HARVARD.HARVARD.EDU (01/05/90)

While compiling libg++ 1.36.1 on a Sun 4/110 (running Sun OS 4.0.1) I
encountered what I think might be a g++ bug.  I apologize in advance
for not understanding the origin of this bug.

The error occurred while trying to link tPlex, one of the test
programs included with the libg++ distribution:

    g++  tPlex.o -o tPlex -L. -ltest  -L../src -lg++ -lm 
    iMPlex.o: Undefined symbol "LBE242" referenced

Sure enough, when iMPlex.cc is compiled with the -g flag the very
first symbol that appears is LBE242:

    g++  -I../g++-include -g -O -fstrength-reduce -felide-constructors \
    -fschedule-insns -fdelayed-branch  -fsave-memoized   -pipe -c  iMPlex.cc

    nm iMPlex.o
             U LBE242
    00003210 T _OK__8intMPlex
             U _OK__9intIChunk
    ...

However, compiling that module without the -g flag causes the LBE242
symbol not to be listed as undefined:

    g++  -I../g++-include -O -fstrength-reduce  -felide-constructors
    -fschedule-insns -fdelayed-branch  -fsave-memoized   -pipe -c  iMPlex.cc

    !nm
    00003210 T _OK__8intMPlex
             U _OK__9intIChunk
    ...

And tPlex compiles fine using that module.

    This was the only error of its type in the entire distribution.
Is this a bug, or am I just not understanding things?

--Tom Ngo
  ngo@harvard.harvard.edu