From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21850 invoked by alias); 27 Apr 2010 00:44:44 -0000 Received: (qmail 21808 invoked by uid 48); 27 Apr 2010 00:44:31 -0000 Date: Tue, 27 Apr 2010 00:44:00 -0000 Subject: [Bug c++/43905] New: duplicate __PRETTY_FUNCTION__ symbol for functions differing in const-ness X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "wjp at usecode dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg02797.txt.bz2 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