This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



On Thursday, August 21, 2003, at 4:45 PM, law@redhat.com wrote:


In message <622F711B-D416-11D7-B633-000393A6D2F2@physics.uc.edu>, Andrew Pinski
writes:
Here is more reduced sources:
union tree_node;
typedef union tree_node *tree;
typedef enum fallback_t {
  fb_none = 0,
  fb_rvalue=1,
  fb_lvalue=2,
  fb_either=1|2
} fallback_t;

int
gimplify_expr (tree *expr_p, fallback_t fallback)
{
if ((fallback & fb_rvalue) && *expr_p)
    {
        f_temp_2();
    }
  else
    {
        abort();
    }
  return 1;
}


The problem is gimplify_expr (which is weird as this is the function which is causing this ICE) These lines on 491-494: /* Strip away as many useless type conversions as possible at the toplevel. */ while (tree_ssa_useless_type_conversion (*expr_p)) *expr_p = TREE_OPERAND (*expr_p, 0); is removing the conversion to boolean_type: From tree_ssa_useless_type_conversion: /* If both the inner and outer types are integral types, then we can enter the equivalence if they have the same mode and signedness. */ 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)) return true; which is true in this case which cause it to remove the nop_expr which converts to boolean_type.

Jeff you added tree_ssa_useless_type_conversion can you say what is
going on and why is this happening?
It's pretty self explanatory -- it's trying to remove type conversions which
are unnecessary. I would ask, why do you think the conversion is necessary
in the first place? It's possible y'all have summarized this already and
I simply missed it -- in which case just point me to the appropriate point
in the archives.

This stripping you do undoes what gimple_boolify_expr did to convert it to a boolean_type.
Then invert_truthop aborts when it tries to invert a non-boolean_type tree.
So either
1. The conversion isn't useless, but gimplify_boolify_expr is not generating the conversion in a way that makes it seem un-useless.
2. The conversion isn't useless, and the above is not working like it should.
3. The conversion really is useless, and invert_truthop_value should let us invert it even though it's not a BOOLEAN_TYPE.

jeff




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]