public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14911] New: static const symbols lost when referred in asm
@ 2004-04-10 19:39 monge at sns dot it
  2004-04-10 19:51 ` [Bug c/14911] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: monge at sns dot it @ 2004-04-10 19:39 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-18 13:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-10 19:39 [Bug c/14911] New: static const symbols lost when referred in asm monge at sns dot it
2004-04-10 19:51 ` [Bug c/14911] " pinskia at gcc dot gnu dot org
2004-04-22 17:35 ` pinskia at gcc dot gnu dot org
2004-05-14  8:58 ` pinskia at gcc dot gnu dot org
2004-05-18 23:38 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).