This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/26998] bootstrap failure building libdecnumber, ICE in compare_values, tree-vrp.c:432
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2006 09:47:26 -0000
- Subject: [Bug bootstrap/26998] bootstrap failure building libdecnumber, ICE in compare_values, tree-vrp.c:432
- References: <bug-26998-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from rguenth at gcc dot gnu dot org 2006-06-08 09:47 -------
This one:
/* Apply the operation to each end of the range and see what we end
up with. */
if (code == NEGATE_EXPR
&& !TYPE_UNSIGNED (TREE_TYPE (expr)))
{
/* NEGATE_EXPR flips the range around. */
min = (vr0.max == TYPE_MAX_VALUE (TREE_TYPE (expr)) && !flag_wrapv)
? TYPE_MIN_VALUE (TREE_TYPE (expr))
: fold_unary_to_constant (code, TREE_TYPE (expr), vr0.max);
max = (vr0.min == TYPE_MIN_VALUE (TREE_TYPE (expr)) && !flag_wrapv)
? TYPE_MAX_VALUE (TREE_TYPE (expr))
: fold_unary_to_constant (code, TREE_TYPE (expr), vr0.min);
}
is wrong for
(gdb) print vr0
$3 = {type = VR_ANTI_RANGE, min = 0xb7d2b3a8, max = 0xb7d2b3a8,
equiv = 0x896c298}
(gdb) call debug_generic_expr (vr0.min)
-2147483648
(gdb) call debug_generic_expr (vr0.max)
-2147483648
It needs to read:
min = (vr0.max == TYPE_MIN_VALUE (TREE_TYPE (expr)) && !flag_wrapv)
? TYPE_MAX_VALUE (TREE_TYPE (expr))
: fold_unary_to_constant (code, TREE_TYPE (expr), vr0.max);
values other than TYPE_MIN_VALUE are not special with inversion.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-06-08 09:13:37 |2006-06-08 09:47:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26998