aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 880e1bc..3ba5743 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6709,47 +6709,6 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
return exp;
}
-/* Given an expression EXP that may be a COMPONENT_REF, an ARRAY_REF or an
- ARRAY_RANGE_REF, look for whether EXP or any nested component-refs within
- EXP is marked as PACKED. */
-
-bool
-contains_packed_reference (const_tree exp)
-{
- bool packed_p = false;
-
- while (1)
- {
- switch (TREE_CODE (exp))
- {
- case COMPONENT_REF:
- {
- tree field = TREE_OPERAND (exp, 1);
- packed_p = DECL_PACKED (field)
- || TYPE_PACKED (TREE_TYPE (field))
- || TYPE_PACKED (TREE_TYPE (exp));
- if (packed_p)
- goto done;
- }
- break;
-
- case BIT_FIELD_REF:
- case ARRAY_REF:
- case ARRAY_RANGE_REF:
- case REALPART_EXPR:
- case IMAGPART_EXPR:
- case VIEW_CONVERT_EXPR:
- break;
-
- default:
- goto done;
- }
- exp = TREE_OPERAND (exp, 0);
- }
- done:
- return packed_p;
-}
-
/* Return a tree of sizetype representing the size, in bytes, of the element
of EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */