From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31120 invoked by alias); 10 Apr 2004 18:22:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31112 invoked by uid 48); 10 Apr 2004 18:22:43 -0000 Date: Sat, 10 Apr 2004 19:39:00 -0000 From: "monge at sns dot it" To: gcc-bugs@gcc.gnu.org Message-ID: <20040410182243.14911.monge@sns.it> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/14911] New: static const symbols lost when referred in asm X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg00899.txt.bz2 List-Id: could not compile MPlayer with 3.4 prerelease :-( gcc -v : Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.0/specs Configured with: ../configure --prefix=/usr --program-suffix=-3.4 --with-gnu-as --with-gnu-ld --with-cpu=i686 --enable-__cxa_atexit --enable-languages=c,c++ Thread model: posix gcc version 3.4.0 20040407 (prerelease) the follwing code: //------------BEGIN--------------- static const int hello = 56; int main() { asm( "mov hello, %eax\n" ); return 0; } //------------END----------------- compiles with gcc code.c but fails with gcc -O2 code.c /tmp/ccgUsUmb.o(.text+0xd): In function `main': : undefined reference to `hello' collect2: ld returned 1 exit status gcc 3.2.3 always works. Thanx -- Summary: static const symbols lost when referred in asm Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: monge at sns dot it CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14911