diff options
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index e3007ee..0127b82 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -774,12 +774,13 @@ create_access (tree expr, gimple stmt, bool write) disqualify_candidate (base, "Encountered a variable sized access."); return NULL; } - if ((offset % BITS_PER_UNIT) != 0 || (size % BITS_PER_UNIT) != 0) + if (TREE_CODE (expr) == COMPONENT_REF + && DECL_BIT_FIELD (TREE_OPERAND (expr, 1))) { - disqualify_candidate (base, - "Encountered an acces not aligned to a byte."); + disqualify_candidate (base, "Encountered a bit-field access."); return NULL; } + gcc_checking_assert ((offset % BITS_PER_UNIT) == 0); if (ptr) mark_parm_dereference (base, offset + size, stmt); |