This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc-3.0 unroll bug
- To: edmar at motorola dot com, gcc at gcc dot gnu dot org
- Subject: Re: Gcc-3.0 unroll bug
- From: Zoltan Hidvegi <hzoli at hzoli dot 2y dot net>
- Date: Fri, 20 Jul 2001 14:35:13 -0500 (CDT)
> Consider the following for statement:
> for (i = UINT_MAX - 1; i > 5; i++)
> This statement should execute 2 times because, after that,
> the i.v. will turn 0 and the condition (i > 5) will be false.
Try the patch in
http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01080.html
Also note that the behavior is undefined in the ANSI C++ standard
(probably in C as well).
Zoli