This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/59649] [4.9 regression] conftest.c miscompiled
- 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: Tue, 07 Jan 2014 19:17:04 +0000
- Subject: [Bug rtl-optimization/59649] [4.9 regression] conftest.c miscompiled
- Auto-submitted: auto-generated
- References: <bug-59649-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59649
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Two out of the 3 get_mode_bounds calls pass the same mode as the first and
third argument, so in that case it would be BImode in both cases and even
before Nick's change while min_val/max_val would be -128/127 for signed and
0/255 otherwise,
as the value is then trunc_int_for_mode (into BImode again), which will return
STORE_FLAG_VALUE for & 1 and 0 otherwise, the function returned 0 and
STORE_FLAG_VALUE (for STORE_FLAG_VALUE == -1 a wrong thing to do supposedly,
but that is not the case of ia64).
I wonder if get_mode_bounds is ever called with BImode and some wider mode,
that would mean there would need to be a conversion of some wider mode to
BImode in the IL I think, which is quite unlikely. Normally BImode is the
result of some comparison instead.