This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ref_contains_indirect_ref always false?
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 4 Nov 2005 12:31:14 +0100 (CET)
- Subject: ref_contains_indirect_ref always false?
Hi!
it seems that
static inline bool
ref_contains_indirect_ref (tree ref)
{
while (handled_component_p (ref))
{
if (TREE_CODE (ref) == INDIRECT_REF)
return true;
ref = TREE_OPERAND (ref, 0);
}
return false;
}
always returns false, because handled_component_p (ref) returns
false for INDIRECT_REF:
int
handled_component_p (tree t)
{
switch (TREE_CODE (t))
{
case BIT_FIELD_REF:
case COMPONENT_REF:
case ARRAY_REF:
case ARRAY_RANGE_REF:
case VIEW_CONVERT_EXPR:
case REALPART_EXPR:
case IMAGPART_EXPR:
return 1;
default:
return 0;
}
}
am I missing something?
Richard.