1.1.2 repo/mangling bug

Henric Jungheim junghelh@pe-nelson.com
Tue Mar 16 23:38:00 GMT 1999


I've been having some trouble getting -frepo to work properly.  Then I
noticed that the one item that was not getting instantiated also happend
to be the only entry in the .rpo file that would not demangle (with
g++filt).   It would be nice if this generated some sort of warning.
(Why would a non-demanglable name ever be present in a .rpo file? Or is
is just g++filt that has trouble?). Anyway, I boiled it down to the
following example code (see the tar file for the .ii):

#include <list>
#include <algorithm>

using namespace std;

void f(int a)
{ }

main()
{
        int a;
        list<int>::iterator i;

        for_each(i, i, &f);
}


This generates the following .rpo file:

/tmp/tst/rpobug>cat repoBug.rpo 
M repoBug.cpp
D /tmp/tst/rpobug
A '-v' '-save-temps' '-frepo' '-c'
O for_each__H2Zt15__list_iterator3ZiZRiZPiZPFi_v_X01T0X11_X11
O __t15__list_iterator3ZiZRiZPiRCt15__list_iterator3ZiZRiZPi
O __t15__list_iterator3ZiZRiZPi
O lexicographical_compare_3way__H2ZPCScZPCSc_X01T0X11T2_i
O min__H1Zi_RCX01T0_RCX01
O lexicographical_compare__H2ZPCScZPCSc_X01T0X11T2_b
O min__H1ZUi_RCX01T0_RCX01

Which demangles to this:

/tmp/tst/rpobug>g++filt < repoBug.rpo 
M repoBug.cpp
D /tmp/tst/rpobug
A '-v' '-save-temps' '-frepo' '-c'
O for_each__H2Zt15__list_iterator3ZiZRiZPiZPFi_v_X01T0X11_X11
O __list_iterator<int, int &, int
*>::__list_iterator(__list_iterator<int, int &, int *> const &)
O __list_iterator<int, int &, int *>::__list_iterator(void)
O int lexicographical_compare_3way<signed char const *, signed char
const *>(signed char const *, signed char const *, signed char const *,
signed char const *)
O int const & min<int>(int const &, int const &)
O bool lexicographical_compare<signed char const *, signed char const
*>(signed char const *, signed char const *, signed char const *, signed
char const *)
O unsigned int const & min<unsigned int>(unsigned int const &, unsigned
int const &)


The compile looked like this:

/tmp/tst/rpobug>egcc -v --save-temps -frepo repoBug.cpp
Reading specs from
/usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/egcs-2.91.66/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=91 -Di386 -Dunix -D__ELF__ -D__FreeBSD__=3 -D__i386__
-D__unix__ -D__ELF__ -D__FreeBSD__=3 -D__i386 -D__unix -Asystem(unix)
-Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS
-Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
repoBug.cpp repoBug.iiGNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2
release) (i386 FreeBSD/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc-lib/i386-portbld-freebsd3.0/egcs-2.91.66/include/g++
 /usr/local/include
 /usr/local/i386-unknown-freebsd3.0/include
 /usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/egcs-2.91.66/include
/usr/include
End of search list.
 /usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/egcs-2.91.66/cc1plus
repoBug.ii -quiet -dumpbase repoBug.cc -version -frepo -o repoBug.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release)
(i386-unknown-freebsd3.0) compiled by GNU C version egcs-2.91.66
19990314 (egcs-1.1.2 release).
 as -V -Qy -o repoBug.o repoBug.s
GNU assembler version 2.9.1 (i386-unknown-freebsdelf), using BFD version
2.9.1
repoBug.tar.gz



More information about the Gcc-bugs mailing list