[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#116823: marked as done (Debian's g++-3.0 forgets to generate some code.)



Your message dated Wed, 28 Nov 2001 18:24:45 +0000
with message-id <20011128182445.J3953@parcelfarce.linux.theplanet.co.uk>
and subject line submitter requested close
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 23 Oct 2001 19:37:36 +0000
>From kreckel@ginac.de Tue Oct 23 14:37:36 2001
Return-path: <kreckel@ginac.de>
Received: from higgs.physik.uni-mainz.de [134.93.128.134] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 15w7Ml-0004wB-00; Tue, 23 Oct 2001 14:37:35 -0500
Received: from localhost (kreckel@localhost)
	by higgs.physik.uni-mainz.de (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id VAA07176
	for <submit@bugs.debian.org>; Tue, 23 Oct 2001 21:37:33 +0200
X-Authentication-Warning: higgs.physik.uni-mainz.de: kreckel owned process doing -bs
Date: Tue, 23 Oct 2001 21:37:33 +0200 (CEST)
From: "Richard B. Kreckel" <kreckel@ginac.de>
X-Sender: kreckel@higgs.physik.uni-mainz.de
Reply-To: Richard.Kreckel@ginac.de
To: submit@bugs.debian.org
Subject: Debian's g++-3.0 forgets to generate some code.
Message-ID: <Pine.LNX.4.21.0110232105580.7150-100000@higgs.physik.uni-mainz.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Delivered-To: submit@bugs.debian.org

Package: g++-3.0
Version: 1:3.0.2-0pre011014
Severity: important

Summary: It seems like some bug crept into Debian's gcc-3.0.  The bug does
not seem to be present upstream.  This bug renders the CLN package
unlinkable with our compiler.

The following piece of code is extracted from CLN's PROVIDE/REQUIRE
mechanism for setting up global objects:

------------------------------------------------------------------------------------
extern "C" void module__prin_globals__firstglobalfun () {}
extern "C" void module__prin_globals__ctorend (void);
extern "C" void module__prin_globals__dtorend (void);
__asm__("\t.globl _GLOBAL__I_module__prin_globals__firstglobalfun");
__asm__("\t.globl _GLOBAL__D_module__prin_globals__firstglobalfun");
static int module__prin_globals__counter;
struct module__prin_globals__controller {
	inline module__prin_globals__controller ()
	{
		if (module__prin_globals__counter++)	{
			__asm__ ("jmp %*%0" : : "rm" ((void*)( module__prin_globals__ctorend ))) ;
		}
	}
	inline ~module__prin_globals__controller ()
	{
		__asm__  ("\n"  ""  "module__" "prin_globals" "__dtorend"  ":") ;
	}
};
static module__prin_globals__controller module__prin_globals__ctordummy;
------------------------------------------------------------------------------------

When compiled with `g++-3.0 -O -c' the resulting .o file starts with

         U _GLOBAL__D_module__prin_globals__firstglobalfun
00000058 T _GLOBAL__I_module__prin_globals__firstglobalfun

Rather, there should be a text section for `_GLOBAL__D_module_...' as
well, in the following fashion:

00000070 T _GLOBAL__D_module__prin_globals__firstglobalfun
00000050 T _GLOBAL__I_module__prin_globals__firstglobalfun

I am able to generate the above (correct) symbols with either RedHat's
`g++3' or with the snapshot `gcc-3.0.2-20011014' bootstrapped on a Woody
system with no configure-options other than --prefix.  The erroneously
missing symbols can also be reproducsed with Debian's version
1:3.0.2-0pre010922.  Also, analyzing the output directly with `cc1plus',
one finds that we cannot blame binutils.  The code is simply not generated
with Debian's compiler:

$ /usr/lib/gcc-lib/i386-linux/3.0.2/cc1plus -quiet -dumpbase foo.cpp -O -version -o foo.s foo.cpp
GNU CPP version 3.0.2 20011014 (Debian prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.2 20011014 (Debian prerelease) (i386-linux)
        compiled by GNU C version 3.0.2 20011014 (Debian prerelease).
$ grep _D_ foo.s   # WRONG
                .globl _GLOBAL__D_module__prin_globals__firstglobalfun
$ grep _I_ foo.s   # okay
                .globl _GLOBAL__I_module__prin_globals__firstglobalfun
        .type   _GLOBAL__I_module__prin_globals__firstglobalfun,@function
_GLOBAL__I_module__prin_globals__firstglobalfun:
        .size   _GLOBAL__I_module__prin_globals__firstglobalfun,.Lfe4-_GLOBAL__I_module__prin_globals__firstglobalfun
        .long   _GLOBAL__I_module__prin_globals__firstglobalfun

Whereas it is generated fine with the hand-bootstrapped compiler:

$ /home/kreckel/projects/gcc-3.0.2-20011014/lib/gcc-lib/i686-pc-linux-gnu/3.0.2/cc1plus -quiet -dumpbase foo.cpp -O -version -o foo.s foo.cpp
GNU CPP version 3.0.2 20011014 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.2 20011014 (prerelease) (i686-pc-linux-gnu)
        compiled by GNU C version 3.0.2 20011014 (prerelease).
$ grep _D_ foo.s   # okay
                .globl _GLOBAL__D_module__prin_globals__firstglobalfun
        .type   _GLOBAL__D_module__prin_globals__firstglobalfun,@function
_GLOBAL__D_module__prin_globals__firstglobalfun:
        .size   _GLOBAL__D_module__prin_globals__firstglobalfun,.Lfe4-_GLOBAL__D_module__prin_globals__firstglobalfun
        .long   _GLOBAL__D_module__prin_globals__firstglobalfun
$ grep _I_ foo.s   #okay
                .globl _GLOBAL__I_module__prin_globals__firstglobalfun
        .type   _GLOBAL__I_module__prin_globals__firstglobalfun,@function
_GLOBAL__I_module__prin_globals__firstglobalfun:
        .size   _GLOBAL__I_module__prin_globals__firstglobalfun,.Lfe3-_GLOBAL__I_module__prin_globals__firstglobalfun
        .long   _GLOBAL__I_module__prin_globals__firstglobalfun

All this suggests that some bad patch went into Debian's gcc-3.0 or that
some configure options break the compiler.  What is it?!?

Regards
     -richy.
--
  .''`.  Richard B. Kreckel
 : :' :  <kreckel@debian.org>
 `. `'   <kreckel@ginac.de>
   `-    <http://www.ginac.de/~kreckel/>


---------------------------------------
Received: (at 116823-done) by bugs.debian.org; 28 Nov 2001 18:24:46 +0000
>From willy@www.linux.org.uk Wed Nov 28 12:24:46 2001
Return-path: <willy@www.linux.org.uk>
Received: from parcelfarce.linux.theplanet.co.uk (www.linux.org.uk) [195.92.249.252] (exim)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 1699O2-0008O2-00; Wed, 28 Nov 2001 12:24:46 -0600
Received: from willy by www.linux.org.uk with local (Exim 3.33 #5)
	id 1699O1-0005Li-00
	for 116823-done@bugs.debian.org; Wed, 28 Nov 2001 18:24:45 +0000
Date: Wed, 28 Nov 2001 18:24:45 +0000
From: Matthew Wilcox <willy@debian.org>
To: 116823-done@bugs.debian.org
Subject: submitter requested close
Message-ID: <20011128182445.J3953@parcelfarce.linux.theplanet.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Sender:  <willy@www.linux.org.uk>
Delivered-To: 116823-done@bugs.debian.org


in the last message to this bug (dated wed 7th november), Richard
Kreckel decided the bug was in CLN and requested this bug be closed.

-- 
Revolutions do not require corporate support.



Reply to: