This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/26348] [4.2 Regression] ICE compiling a-textio.adb at -O1 -ftree-vrp
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Feb 2006 17:29:13 -0000
- Subject: [Bug ada/26348] [4.2 Regression] ICE compiling a-textio.adb at -O1 -ftree-vrp
- References: <bug-26348-7210@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from law at redhat dot com 2006-02-28 17:29 -------
Subject: Re: [4.2 Regression] ICE compiling a-textio.adb at
-O1 -ftree-vrp
On Tue, 2006-02-28 at 17:21 +0000, rguenth at gcc dot gnu dot org wrote:
> sounds odd - adding 1 to the range [0, 0x7fffffff] for a type
> with the said min/max value should result in [1, 0x7fffffff],
> not [1, 0x80000000]. Why is the resulting range not clipped to
> the types min/max value? I can see no difference with this "special"
> case specifying 31bit precision to any other "non-special" min/max
> range like [5, 8]. But I must miss something.
The fold routines use TYPE_PRECISION for clipping, not
TYPE_MIN_VALUE/TYPE_MAX_VALUE. If you think about it for
a little while, it actually makes sense as they are basically
mimicking what's going to happen at the hardware level.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26348