From owner-freebsd-stable@FreeBSD.ORG Thu Oct 12 09:54:54 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 CA21F16A415; Thu, 12 Oct 2006 09:54:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2982143D5A; Thu, 12 Oct 2006 09:54:43 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k9C9jFM7065028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Oct 2006 12:45:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k9C9sF63010036; Thu, 12 Oct 2006 12:54:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k9C9sFid009940; Thu, 12 Oct 2006 12:54:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 12 Oct 2006 12:54:14 +0300 From: Kostik Belousov To: Mikhail Teterin Message-ID: <20061012095414.GM60834@deviant.kiev.zoral.com.ua> References: <200610111322.57735.mi+mx@aldan.algebra.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1rguoi8KZGYj2k4L" Content-Disposition: inline In-Reply-To: <200610111322.57735.mi+mx@aldan.algebra.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: stable@freebsd.org, gerald@freebsd.org Subject: 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 09:54:55 -0000 --1rguoi8KZGYj2k4L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 11, 2006 at 01:22:57PM -0400, Mikhail Teterin wrote: > GCC would not fix the bug described in >=20 > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D29390 >=20 > because the compiler is of an unsupported version (they only support 4.x = now). >=20 > 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= =20 > report, is enough to reproduce the problem. Compiling with `-march=3Dpent= ium4'=20 > triggers the bug -- a bogus symbol is inserted: >=20 > % c++ -O0 -g -c -pipe -march=3Dpentium4 loctest.ii > % nm locate.o | fgrep .LC > U .LC786 >=20 > Compiling without the -march (or with -O2) does not insert the bogus symb= ol: >=20 > % c++ -O2 -g -c -pipe -march=3Dpentium4 loctest.ii > % nm loctest.o | fgrep .LC > % c++ -O0 -g -c -pipe loctest.ii > % nm loctest.o | fgrep .LC > % >=20 > I'm seeing this with both 3.4.4 and 3.4.6 versions of GCC... Thanks! >=20 > -mi deviant% /usr/local/opt/gcc-3.4.6/bin/g++ -O0 -g -c -fno-strict-aliasing -p= ipe -march=3Dpentium4 loctest.ii deviant% nm loctest.o | grep LC U _ZNK7icu_3_66Locale7getLCIDEv deviant% c++ -O0 -g -c -fno-strict-aliasing -pipe -march=3Dpentium4 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=20 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=3D/usr/local/opt/gcc-3.4.6= --enable-shared --enable-threads --with-system-zlib --enable-__cxa_atexit = --disable-nls --enable-long-long --with-as=3D/usr/local/opt/binutils/bin/as= --with-ld=3D/usr/local/opt/binutils/bin/ld --enable-languages=3Dc,c++,f77,= objc,ada,java --host=3Di386-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). --1rguoi8KZGYj2k4L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFLhDGC3+MBN1Mb4gRAoqMAJ9U/m0IUN+3/jw3Mi2FqRBMdjGZYwCfUm/p 5dQgxgC3o7fuKAnmtQef2dM= =bL/d -----END PGP SIGNATURE----- --1rguoi8KZGYj2k4L--