This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21959] [4.1 Regression] vrp miscompiles Ada front-end, drops loop exit test in well-defined wrap-around circumstances
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2005 20:37:50 -0000
- Subject: [Bug tree-optimization/21959] [4.1 Regression] vrp miscompiles Ada front-end, drops loop exit test in well-defined wrap-around circumstances
- References: <20050608123145.21959.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-17 20:37 -------
(In reply to comment #10)
> > No because Ada front-end is creating:
> > signed_char <= 127 which is always true, removing this from fold would not
> > change the problem as it will still be optimized away.
>
> Where do you see signed_char? The type 0x556d9144 is unsigned.
Woops, I must have read something wrong.
This is still a bug in the VRP.
C Testcase:
unsigned char c[0xFF];
void f(void)
{
unsigned char i;
c[128] = 128;
i = 0;
while (1)
{
if (((signed char) i) < 0) break;
c[i] = ' ';
i++;
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu dot
| |org
Component|ada |tree-optimization
Summary|[4.1 Regression] Ada depends|[4.1 Regression] vrp
|on signed overflow |miscompiles Ada front-end,
| |drops loop exit test in
| |well-defined wrap-around
| |circumstances
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21959