This is the mail archive of the 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, wrote:

In message <>, Andrew Pinski
Here is more reduced sources:
union tree_node;
typedef union tree_node *tree;
typedef enum fallback_t {
  fb_none = 0,
} fallback_t;

gimplify_expr (tree *expr_p, fallback_t fallback)
if ((fallback & fb_rvalue) && *expr_p)
  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.


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