From owner-freebsd-stable@FreeBSD.ORG Thu Oct 12 13:03:20 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFAFF16A4B3; Thu, 12 Oct 2006 13:03:20 +0000 (UTC) (envelope-from ohartman@uni-mainz.de) Received: from mailgate01.zdv.uni-mainz.de (mailgate01.zdv.Uni-Mainz.DE [134.93.178.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2FDF43D5D; Thu, 12 Oct 2006 13:02:52 +0000 (GMT) (envelope-from ohartman@uni-mainz.de) Received: from exfront02.zdv.uni-mainz.de ([134.93.176.56]) by mailgate01.zdv.uni-mainz.de with ESMTP; 12 Oct 2006 15:02:51 +0200 Received: from mail.uni-mainz.de ([134.93.176.56]) by exfront02.zdv.Uni-Mainz.DE with Microsoft SMTPSVC(6.0.3790.1830); Thu, 12 Oct 2006 15:02:51 +0200 Received: from [130.133.86.198] ([130.133.86.198] RDNS failed) by mail.uni-mainz.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Thu, 12 Oct 2006 15:02:50 +0200 Message-ID: <452E3CF5.8010707@uni-mainz.de> Date: Thu, 12 Oct 2006 15:02:45 +0200 From: "O. Hartmann" User-Agent: Thunderbird 1.5.0.7 (X11/20060915) MIME-Version: 1.0 To: Kostik Belousov References: <200610111322.57735.mi+mx@aldan.algebra.com> <20061012095414.GM60834@deviant.kiev.zoral.com.ua> In-Reply-To: <20061012095414.GM60834@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Oct 2006 13:02:50.0696 (UTC) FILETIME=[B8F1AC80:01C6EDFE] Cc: Mikhail Teterin , gerald@freebsd.org, stable@freebsd.org Subject: OT: Re: Bug in 6.x' C++ compiler X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2006 13:03:20 -0000 Kostik Belousov wrote: > On Wed, Oct 11, 2006 at 01:22:57PM -0400, Mikhail Teterin wrote: >> GCC would not fix the bug described in >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29390 >> >> because the compiler is of an unsupported version (they only support 4.x now). >> >> Yet, the problem is rather real and hits when the devel/icu port is >> built with low optimization (-O1 or -O0). >> >> Any chance, someone with interest in GCC internals and FreeBSD can >> find the fix? >> >> Simply compiling the loctest.ii, that is attached to the above bugzilla >> report, is enough to reproduce the problem. Compiling with `-march=pentium4' >> triggers the bug -- a bogus symbol is inserted: >> >> % c++ -O0 -g -c -pipe -march=pentium4 loctest.ii >> % nm locate.o | fgrep .LC >> U .LC786 >> >> Compiling without the -march (or with -O2) does not insert the bogus symbol: >> >> % c++ -O2 -g -c -pipe -march=pentium4 loctest.ii >> % nm loctest.o | fgrep .LC >> % c++ -O0 -g -c -pipe loctest.ii >> % nm loctest.o | fgrep .LC >> % >> >> I'm seeing this with both 3.4.4 and 3.4.6 versions of GCC... Thanks! >> >> -mi > deviant% /usr/local/opt/gcc-3.4.6/bin/g++ -O0 -g -c -fno-strict-aliasing -pipe -march=pentium4 loctest.ii > deviant% nm loctest.o | grep LC > U _ZNK7icu_3_66Locale7getLCIDEv > deviant% c++ -O0 -g -c -fno-strict-aliasing -pipe -march=pentium4 loctest.ii > deviant% nm loctest.o | grep LC > U .LC786 > U _ZNK7icu_3_66Locale7getLCIDEv > deviant% /usr/local/opt/gcc-3.4.6/bin/g++ -v > Reading specs from /usr/local/opt/gcc-3.4.6/lib/gcc/i386-little-freebsd6/3.4.6/specs > Configured with: ../gcc-3.4.6/configure --prefix=/usr/local/opt/gcc-3.4.6 --enable-shared --enable-threads --with-system-zlib --enable-__cxa_atexit --disable-nls --enable-long-long --with-as=/usr/local/opt/binutils/bin/as --with-ld=/usr/local/opt/binutils/bin/ld --enable-languages=c,c++,f77,objc,ada,java --host=i386-little-freebsd6 > Thread model: posix > gcc version 3.4.6 > deviant% c++ -v > Using built-in specs. > Configured with: FreeBSD/i386 system compiler > Thread model: posix > gcc version 3.4.6 [FreeBSD] 20060305 > > opt/gcc-3.4.6 is the stock version of the 3.4.6 built directly from the FSF > sources (relatively long time ago). Well, I hope this bug has been sent by heaven and speeds up swapping system compiler of FreeBSD 6.X to 4.1 or 4.X :-)