This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2005 21:16:56 -0000
- Subject: [Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
- References: <20050302203320.20290.jakub@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2005-03-02 21:16 -------
It seems loop_iterations incorrectly counts number of iterations of the second
loop:
ivtmp.2 = 113;
goto <bb 4> (<L4>);
<L3>:;
*(ivtmp.52 + 4294967292B) = 9;
i = i + 1;
<L4>:;
ivtmp.2 = ivtmp.2 - 1;
ivtmp.52 = ivtmp.52 + 4B;
if (ivtmp.2 != 0) goto <L3>; else goto <L16>;
<L16>:;
loop's n_iterations is 113, but only the loop header is executed 113 times,
while the loop body is executed only 112 times.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-03-02 20:40:05 |2005-03-02 21:16:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20290