This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/52754] [4.7/4.8 Regression] indirect indexing broken with -fpredictive-commoning
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Mar 2012 16:48:51 +0000
- Subject: [Bug other/52754] [4.7/4.8 Regression] indirect indexing broken with -fpredictive-commoning
- Auto-submitted: auto-generated
- References: <bug-52754-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52754
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-28 16:48:51 UTC ---
Seems ref_at_iteration is buggy, when iter is negative, but ARRAY_REF's index
is TYPE_UNSIGNED smaller than size of pointer, computing the ARRAY_REF's index
in the smaller unsigned type isn't a good idea, because then we end up with
those
0xfffffffdU etc. indexes while we want -3L.
Wonder if it is generally ok to do the computation in a wider type (if any),
or if we should just handle the simple cases (integer_onep (iv.step) ? ) and
punt otherwise.