This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fix for execute/991221-1.c -O1 failure
- To: gcc at gcc dot gnu dot org
- Subject: Re: fix for execute/991221-1.c -O1 failure
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Fri, 24 Dec 1999 06:45:24 +0000 (GMT)
- CC: gcc-patches at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu, amylaar at pasanda dot cygnus dot co dot uk
> *************** range_binop (code, type, arg0, upper0_p,
> *** 3180,3187 ****
> We can therefore make the transformation of any unbounded range with
> the value Z, Z being greater than any representable number. This permits
> us to treat unbounded ranges as equal. */
> ! sgn0 = arg0 != 0 ? 0 : (upper0_p ? 1 : -1);
> ! sgn1 = arg1 != 0 ? 0 : (upper1_p ? 1 : -1);
> switch (code)
> {
> case EQ_EXPR:
> --- 3180,3199 ----
> We can therefore make the transformation of any unbounded range with
> the value Z, Z being greater than any representable number. This permits
> us to treat unbounded ranges as equal. */
> ! sgn0 = (upper0_p
> ! ? ((! arg0
> ! || operand_equal_p (arg0, TYPE_MAX_VALUE (TREE_TYPE (arg0)), 1))
> ! ? 1 : 0)
> ! : ((! arg0
> ! || operand_equal_p (arg0, TYPE_MIN_VALUE (TREE_TYPE (arg0)), 1))
> ! ? -1 : 0));
> ! sgn1 = (upper1_p
> ! ? ((! arg1
> ! || operand_equal_p (arg1, TYPE_MAX_VALUE (TREE_TYPE (arg1)), 1))
> ! ? 1 : 0)
> ! : ((! arg1
> ! || operand_equal_p (arg1, TYPE_MIN_VALUE (TREE_TYPE (arg1)), 1))
> ! ? -1 : 0));
> switch (code)
> {
> case EQ_EXPR:
Hmmm, I forgot to re-generate the patch after I fixed this to actually use
TYPE.
Bu I have a different problem here: the bootstrap fails when compiling reload.
It encounters a pointer_type, and this has no min nor max value.
(gdb) call debug_tree(type)
<pointer_type 0x4028c280
type <integer_type 0x4001a300 short int
permanent HI
size <integer_cst 0x40019320 constant permanent 16>
align 16 symtab 8 alias set 24 precision 16
min <integer_cst 0x400194a0 constant permanent -32768>
max <integer_cst 0x400194c0 constant permanent 32767>
pointer_to_this <pointer_type 0x4028c280>>
unsigned permanent SI
size <integer_cst 0x40019560 type <integer_type 0x4001b580 unsigned int> constant permanent 32>
align 32 symtab 352 alias set 93>
Should I get the limits from somewhere else? Or should pointers be treated as
having indeed no bounds?
*************** range_binop (code, type, arg0, upper0_p,
*** 3180,3187 ****
We can therefore make the transformation of any unbounded range with
the value Z, Z being greater than any representable number. This permits
us to treat unbounded ranges as equal. */
! sgn0 = arg0 != 0 ? 0 : (upper0_p ? 1 : -1);
! sgn1 = arg1 != 0 ? 0 : (upper1_p ? 1 : -1);
switch (code)
{
case EQ_EXPR:
--- 3180,3195 ----
We can therefore make the transformation of any unbounded range with
the value Z, Z being greater than any representable number. This permits
us to treat unbounded ranges as equal. */
! sgn0 = (upper0_p
! ? (! arg0 || operand_equal_p (arg0, TYPE_MAX_VALUE (type), 1)
! ? 1 : 0)
! : (! arg0 || operand_equal_p (arg0, TYPE_MIN_VALUE (type), 1)
! ? -1 : 0));
! sgn1 = (upper1_p
! ? (! arg1 || operand_equal_p (arg1, TYPE_MAX_VALUE (type), 1)
! ? 1 : 0)
! : (! arg1 || operand_equal_p (arg1, TYPE_MIN_VALUE (type), 1)
! ? -1 : 0));
switch (code)
{
case EQ_EXPR: