aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 3f03b01..d2248ea 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -329,7 +329,7 @@ get_object_alignment_2 (tree exp, unsigned int *alignp,
/* Get the innermost object and the constant (bitpos) and possibly
variable (offset) offset of the access. */
exp = get_inner_reference (exp, &bitsize, &bitpos, &offset,
- &mode, &unsignedp, &volatilep);
+ &mode, &unsignedp, &volatilep, true);
/* Extract alignment information from the innermost object and
possibly adjust bitpos and offset. */
@@ -360,6 +360,10 @@ get_object_alignment_2 (tree exp, unsigned int *alignp,
align = DECL_ALIGN (exp);
known_alignment = true;
}
+ else if (TREE_CODE (exp) == VIEW_CONVERT_EXPR)
+ {
+ align = TYPE_ALIGN (TREE_TYPE (exp));
+ }
else if (TREE_CODE (exp) == INDIRECT_REF
|| TREE_CODE (exp) == MEM_REF
|| TREE_CODE (exp) == TARGET_MEM_REF)