gcc-3.0 20010314: Miscompiled C source with -O3 -fomit-frame-pointer
pavenis@lanet.lv
pavenis@lanet.lv
Sat Mar 17 06:00:00 GMT 2001
I got following C source (see preprocessed source in attachment and
assembler output in attachment) miscompiled with gcc-3.0 20010314
(targets i586-pc-msdosdjgpp and i686-pc-linux-gnu):
Compiler command line:
gcc -O3 -fomit-frame-pointer -S text7.i
Bad asembler output:
In procedure _outtextxy contents of register %ebp used but is
undefined. As result I'm getting SIGSEGV when running
applications that uses this procedure.
This output is for target i586-pc-msdosdjgpp but I got practically the
same problem also for i686-pc-linux-gnu
Andris
.p2align 4
.globl _outtextxy
_outtextxy:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $56, %esp
movl 16(%ebp), %ecx
pushl %ecx
call _strlen
movl %eax, %edi
movl ___gr_vpt, %ebx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text7.i.gz
Type: application/x-gzip
Size: 12287 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20010317/1c86290f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text7.s.gz
Type: application/x-gzip
Size: 1225 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20010317/1c86290f/attachment-0001.bin>
More information about the Gcc-bugs
mailing list