This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95 19990629 miscompiles makeinfo.c
- To: Alexander Sokolov <robocop at amur dot rosnet dot ru>
- Subject: Re: gcc-2.95 19990629 miscompiles makeinfo.c
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 14 Jul 1999 23:32:09 -0600
- cc: egcs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.4.10.9907021517590.5518-100000@ns.amur.rosnet.ru>you wri
te:
> Building the latest gcc-2.95 snapshot I encountered with miscompilation
> of makeinfo which segfaulted in get_until() when attempting to make
> cpp.info. Take a look at the part of C source from makeinfo.c
This bug has been fixed for gcc-2.95.
> %eax now contains new_point returned by search_forward() which should be
> compared to 0. The obvious way is cmpl $0,%eax or even testl %eax,%eax but
> look what gcc generates instead:
The pseudo which holds the value "new_point" did not get a hard register, thus
it's home is in the stack and it must be reloaded into a hard register when it
is used.
The compiler was incorrectly optimizing away a store into the stack slot for
new_point.
jeff