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?