This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/54471] [4.8 Regression] FAIL: gcc.dg/sms-8.c execution test
- 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, 21 Nov 2012 14:42:13 +0000
- Subject: [Bug tree-optimization/54471] [4.8 Regression] FAIL: gcc.dg/sms-8.c execution test
- Auto-submitted: auto-generated
- References: <bug-54471-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54471
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-21 14:42:13 UTC ---
Created attachment 28755
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28755
gcc48-pr54471.patch
Untested fix. I believe the bug is in invalid canonicalization. When
sizem1 is { -1, -1 } double_int, sizem1 + double_int_one is { 0, 0 }, as it
wrapped, instead of { 0, 0, 1, 0 } quad_int. And if min0 or min1 is zero, then
size - min{0,1} is also zero, and so is very likely smaller than max{0,1}
(unless min{0,1} == max{0,1}), but we still don't want to "canonicalize" that
to signed. IMHO testing min2.is_zero () is sufficient, as min0 or min1 should
be a valid double_int in the range 0 to { -1, -1 }, which is always smaller
than the maximum unsigned integer + 1 in infinite precision and thus min2
should never be zero, unless size overflowed to 0 and min{0,1} is zero.