c/10151: asm ("") to rename in assembler to the same name w/o postfix
etienne.lorrain@masroudeau.com
etienne.lorrain@masroudeau.com
Wed Mar 19 16:06:00 GMT 2003
>Number: 10151
>Category: c
>Synopsis: asm ("") to rename in assembler to the same name w/o postfix
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 19 15:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Etienne Lorrain
>Release: gcc version 3.2.3 20030309 (Debian prerelease)
>Organization:
>Environment:
Debian Linux ia32
>Description:
use of asm("") to forbid the compiler to append .0 to a static variable in a function does not work if the name is the same:
etienne@gujin:~/gcc$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.3 20030309 (Debian prerelease)
etienne@gujin:~/gcc$ cat bug_asm.c
void fct (void) {
static int the_C_name asm ("the_assembly_name") = 3;
static int PMseg asm ("PMseg") = 5;
}
etienne@gujin:~/gcc$ gcc -Os -S bug_asm.c
etienne@gujin:~/gcc$ cat bug_asm.s
.file "bug_asm.c"
.data
.align 4
.type the_assembly_name,@object
.size the_assembly_name,4
the_assembly_name:
.long 3
.align 4
.type PMseg.0,@object
.size PMseg.0,4
PMseg.0:
.long 5
.text
.globl fct
.type fct,@function
fct:
pushl %ebp
movl %esp, %ebp
leave
ret
.Lfe1:
.size fct,.Lfe1-fct
.ident "GCC: (GNU) 3.2.3 20030309 (Debian prerelease)"
etienne@gujin:~/gcc$
The first variable "the_assembly_name" is working.
The second one "PMseg.0" should be named "PMseg" in the
assembly file.
Etienne.
>How-To-Repeat:
>Fix:
Temporarily, use different names in C and assembler
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list