[Bug c/14911] New: static const symbols lost when referred in asm
monge at sns dot it
gcc-bugzilla@gcc.gnu.org
Sat Apr 10 19:39:00 GMT 2004
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
More information about the Gcc-bugs
mailing list