re PR tree-optimization/21923 (Ada compiler fails to build on gcc 4.1)

2005-06-15  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/21923
        * tree-ssa.c (tree_ssa_useless_type_conversion_1): Conversions between
        integer types whos ranges are different are not useless.

From-SVN: r100996
This commit is contained in:
Andrew Pinski 2005-06-15 20:13:11 +00:00 committed by Andrew Pinski
parent 3eee5bf485
commit 2decfada04
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-06-15 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/21923
* tree-ssa.c (tree_ssa_useless_type_conversion_1): Conversions between
integer types whos ranges are different are not useless.
2005-06-15 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/22024

View File

@ -902,7 +902,9 @@ tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
else if (INTEGRAL_TYPE_P (inner_type)
&& INTEGRAL_TYPE_P (outer_type)
&& TYPE_UNSIGNED (inner_type) == TYPE_UNSIGNED (outer_type)
&& TYPE_PRECISION (inner_type) == TYPE_PRECISION (outer_type))
&& TYPE_PRECISION (inner_type) == TYPE_PRECISION (outer_type)
&& simple_cst_equal (TYPE_MAX_VALUE (inner_type), TYPE_MAX_VALUE (outer_type))
&& simple_cst_equal (TYPE_MIN_VALUE (inner_type), TYPE_MIN_VALUE (outer_type)))
{
bool first_boolean = (TREE_CODE (inner_type) == BOOLEAN_TYPE);
bool second_boolean = (TREE_CODE (outer_type) == BOOLEAN_TYPE);