[Bug c++/43905] New: duplicate __PRETTY_FUNCTION__ symbol for functions differing in const-ness

wjp at usecode dot org gcc-bugzilla@gcc.gnu.org
Tue Apr 27 00:44:00 GMT 2010


When compiling the attached lll.ii file (from lll.c from the gfan maths package
at http://www.math.tu-berlin.de/~jensen/software/gfan/gfan.html ) with g++
4.5.0, I get the following error message:

g++  -O2 lll.ii -c -o lll.o
/tmp/ccRt1FUj.s: Assembler messages:
/tmp/ccRt1FUj.s:5145: Error: symbol
`_ZZN6MatrixIiEixEPiPP6VektorIiEiE19__PRETTY_FUNCTION__' is already defined


The error is not triggered with -O1, but it is triggered with -O1 -fipa-sra.

Looking at the generated .s, the problem appears to be that the same
XXX__PRETTY_FUNCTION__ symbol is generated for both an operator[] and its const
version.


g++ -v:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.5.0/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.5.0/src/gcc-4.5.0/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-gnu-as=/usr/local/binutils-2.20.1/bin/as --with-gnu-ld
--with-ld=/usr/local/binutils-2.20.1/bin/ld --with-gmp=/usr/local/mpir-1.2.2
--with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1
--prefix=/usr/local/gcc-4.5.0
Thread model: posix
gcc version 4.5.0 (GCC)


-- 
           Summary: duplicate __PRETTY_FUNCTION__ symbol for functions
                    differing in const-ness
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wjp at usecode dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43905



More information about the Gcc-bugs mailing list