This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36038] [4.4 Regression] miscompiled loop in perlbmk for -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: 20 Oct 2008 13:45:21 -0000
- Subject: [Bug tree-optimization/36038] [4.4 Regression] miscompiled loop in perlbmk for -Os
- References: <bug-36038-4503@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jakub at gcc dot gnu dot org 2008-10-20 13:45 -------
Created an attachment (id=16516)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16516&action=view)
gcc44-pr36038.patch
My bet is that adding a zero based alternative IV for a pointer is always a
bug,
the zero based IV will necessarily act as an offset to some other pointer (the
original pointer).
With this patch the ivopts dump looks much saner, the ivtmp is sizetype and
so nothing is cast to and back from a pointer all the time, additionally vrp2
doesn't optimize it out and so the testcase succeeds.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36038