aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-09 21:37:13 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-09 22:14:04 +0200
commit65ba91b79e1664ba7e7f60f68e4cb956453b692e (patch)
tree65d9b2f0e7fdd202b43b2904e14a15d159eb9794 /gcc/tree.c
parent8415ced06ed9690dfbce8b8b5f2f4f98f15598b6 (diff)
downloadgcc-65ba91b79e1664ba7e7f60f68e4cb956453b692e.zip
gcc-65ba91b79e1664ba7e7f60f68e4cb956453b692e.tar.gz
gcc-65ba91b79e1664ba7e7f60f68e4cb956453b692e.tar.bz2
Remove last use of expr_align
It was in the ada/gcc-interface repository and is outdated. * tree.h (expr_align): Delete. * tree.c (expr_align): Likewise. ada/ * gcc-interface/utils2.c: Include builtins.h. (known_alignment) <ADDR_EXPR>: Use DECL_ALIGN for DECL_P operands and get_object_alignment for the rest.
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 3974749..5b7d3fd 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3351,51 +3351,6 @@ int_byte_position (const_tree field)
return tree_to_shwi (byte_position (field));
}
-/* Return the strictest alignment, in bits, that T is known to have. */
-
-unsigned int
-expr_align (const_tree t)
-{
- unsigned int align0, align1;
-
- switch (TREE_CODE (t))
- {
- CASE_CONVERT: case NON_LVALUE_EXPR:
- /* If we have conversions, we know that the alignment of the
- object must meet each of the alignments of the types. */
- align0 = expr_align (TREE_OPERAND (t, 0));
- align1 = TYPE_ALIGN (TREE_TYPE (t));
- return MAX (align0, align1);
-
- case SAVE_EXPR: case COMPOUND_EXPR: case MODIFY_EXPR:
- case INIT_EXPR: case TARGET_EXPR: case WITH_CLEANUP_EXPR:
- case CLEANUP_POINT_EXPR:
- /* These don't change the alignment of an object. */
- return expr_align (TREE_OPERAND (t, 0));
-
- case COND_EXPR:
- /* The best we can do is say that the alignment is the least aligned
- of the two arms. */
- align0 = expr_align (TREE_OPERAND (t, 1));
- align1 = expr_align (TREE_OPERAND (t, 2));
- return MIN (align0, align1);
-
- /* FIXME: LABEL_DECL and CONST_DECL never have DECL_ALIGN set
- meaningfully, it's always 1. */
- case LABEL_DECL: case CONST_DECL:
- case VAR_DECL: case PARM_DECL: case RESULT_DECL:
- case FUNCTION_DECL:
- gcc_assert (DECL_ALIGN (t) != 0);
- return DECL_ALIGN (t);
-
- default:
- break;
- }
-
- /* Otherwise take the alignment from that of the type. */
- return TYPE_ALIGN (TREE_TYPE (t));
-}
-
/* Return, as a tree node, the number of elements for TYPE (which is an
ARRAY_TYPE) minus one. This counts only elements of the top array. */