This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc miscompiling duff's device (probaby two different bugs)
- From: Andreas Schwab <schwab at redhat dot com>
- To: Peter Kourzanov <peter dot kourzanov at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 02 Mar 2010 11:58:26 +0100
- Subject: Re: gcc miscompiling duff's device (probaby two different bugs)
- References: <1267522699.2949.81.camel@io.cygnus.nl>
Peter Kourzanov <peter.kourzanov@gmail.com> writes:
> I think the compiler is generating wrong code for duff4_fails() when
> 'case 0' labels the for-loop. It somehow skips the first for-loop
> expression,
If rem != 0 you jump over the init expression, so it is never executed.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."