This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PING][middle-end only!] PR tree-optimization/38572 (VRP and C++ enums)
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 29 Dec 2008 11:36:05 +0100
- Subject: [PING][middle-end only!] PR tree-optimization/38572 (VRP and C++ enums)
- References: <494FB8A6.5080409@gnu.org>
> It is a latent bug in the handling of out-of-bounds values. In the
> testcase, values 256 and 257 are assigned to an enum whose maximum value
> is 6 (and the TYPE_MAX_VALUE is 7).
>
> During VRP a phi's value range changes from [256, 256] to [256, 257] and
> VRP then forces the upper bound to the max-value of the type. This
> however generates the invalid range [256, 7]. After the patch we punt
> and give VARYING.
Patch at http://gcc.gnu.org/ml/gcc-patches/2008-12/msg01120.html
Paolo