This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-3.0 20010314: Miscompiled C source with -O3 -fomit-frame-pointer
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc-3.0 20010314: Miscompiled C source with -O3 -fomit-frame-pointer
- From: pavenis at lanet dot lv
- Date: Sat, 17 Mar 2001 15:59:42 +0200
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
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: text7.i.gz
Date: 17 Mar 2001, 15:25
Size: 12287 bytes.
Type: Unknown
text7.i.gz
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: text7.s.gz
Date: 17 Mar 2001, 15:47
Size: 1225 bytes.
Type: Unknown
text7.s.gz