[Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618
uweigand at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Apr 23 13:51:00 GMT 2007
------- Comment #3 from uweigand at gcc dot gnu dot org 2007-04-23 14:51 -------
I don't think the patch is correct; according to the C standard,
the third argument of memset is of type size_t, which must be
an *unsigned* type, so it cannot in fact be negative.
What apparently happens is that the argument (after conversion to
size_t) is so big that it appears to be negative in its representation
as CONST_INT, so the assert in s390.c triggers.
A proper fix would probably be to remove the assert in s390_expand_setmem
and at the same time make sure those big sizes are handled correctly.
(In any case, the testcase certainly is broken anyway.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641
More information about the Gcc-bugs
mailing list