This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC bug!
- To: falemagn at studenti dot unina dot it
- Subject: Re: GCC bug!
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Mon, 14 Feb 2000 22:56:52 +0100
- CC: egcs-bugs at egcs dot cygnus dot com
- References: <38A82852.BF1E54D1@studenti.unina.it>
> I've dicovered a bug in gcc. It happens only in some circumstances: I've
> discovered one of these, maybe there are others.
Thanks for your bug report. Please note that egcs 1.1 is not the
current version; I could not reproduce the problem with gcc-2.95.2.
I had some difficulties with understanding your report. If you provide
the full source with the program, it would be nice if you give
instructions on how to run it, so I can see whether it works as
intended or not.
It might be better *not* to give full source code, but only the
preprocessor output of the file that got miscompiled. Run 'gcc
--save-temps <other-flags> copper.c', and send the resulting file
copper.i, together with copper.s (as you did).
Anyway, gcc 2.95.2 generates the following code at -O2 at the
beginning of do_copper:
do_copper:
movl cop_pc,%eax
movl chipmem_bank+16,%edx
subl $12,%esp
movl $0,jump_latency
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
call *%edx
movl %eax,%ebx
movl cop_pc,%eax
movl chipmem_bank+16,%edx
movl $4,%ebp
addl $2,%eax
movl %eax,cop_pc
call *%edx
This looks pretty much as what you want to me.
Regards,
Martin