Fwd: [tree-ssa] bootstrap problem on powerpc-apple-darwin6.6

Andrew Pinski pinskia@physics.uc.edu
Fri Aug 22 02:48:00 GMT 2003


Forward from gcc@.
Committed to the tree-ssa branch.

Begin forwarded message:

> From: Andrew Pinski <pinskia@physics.uc.edu>
> Date: Thu Aug 21, 2003  22:30:55 US/Eastern
> Subject: Re: [tree-ssa] bootstrap problem on powerpc-apple-darwin6.6
>
>>
>> On Thu, 21 Aug 2003 20:01:03 -0400 (EDT), Andrew Pinski 
>> <pinskia@physics.uc.edu> wrote:
>>
>>> +              && TYPE_MIN_VALUE (inner_type) == TYPE_MIN_VALUE 
>>> (outer_type)
>>> +              && TYPE_MAX_VALUE (inner_type) == TYPE_MAX_VALUE 
>>> (outer_type))
>>
>> These are trees, which can't be reliably compared with ==.  It's 
>> probably
>> simpler to just compare TYPE_PRECISION.
>>
>
> You are right I should have checked to make sure that they were not 
> trees.
>
> Here is a newer patch which compares the TYPE_PRECISION and it adds 
> some commentary
> about the problem so this part will not be reverted or if we see 
> another place we
> can point them to here.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> 	* tree-ssa.c (tree_ssa_useless_type_conversion): Check also the 
> precision of
> 	the type to make sure they are really useless type conversions.
>
>
> Index: tree-ssa.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
> retrieving revision 1.1.4.118
> diff -u -p -r1.1.4.118 tree-ssa.c
> --- tree-ssa.c  20 Aug 2003 03:43:02 -0000      1.1.4.118
> +++ tree-ssa.c  22 Aug 2003 02:27:07 -0000
> @@ -2448,10 +2448,15 @@ tree_ssa_useless_type_conversion (tree e
>
>        /* If both the inner and outer types are integral types, then
>           we can enter the equivalence if they have the same mode
> -         and signedness.  */
> +         and signedness and precision (The type _Bool can have size 
> of 4
> +         (only happens on powerpc-darwin right now but can happen on 
> any
> +         target that defines BOOL_TYPE_SIZE to be INT_TYPE_SIZE) and a
> +         precision of 1 while unsigned int is the same expect for a
> +         precision of 4 so testing of precision is nessary).  */
>        else if (INTEGRAL_TYPE_P (inner_type) && INTEGRAL_TYPE_P 
> (outer_type)
>                && TYPE_MODE (inner_type) == TYPE_MODE (outer_type)
> -              && TREE_UNSIGNED (inner_type) == TREE_UNSIGNED 
> (outer_type))
> +              && TREE_UNSIGNED (inner_type) == TREE_UNSIGNED 
> (outer_type)
> +              && TYPE_PRECISION (inner_type) == TYPE_PRECISION 
> (outer_type))
>         return true;
>      }
>
>
>



More information about the Gcc-patches mailing list