aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index d781a8a..d7baf22 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -604,6 +604,21 @@ extract_component (gimple_stmt_iterator *gsi, tree t, bool imagpart_p,
case COMPLEX_EXPR:
gcc_unreachable ();
+ case BIT_FIELD_REF:
+ {
+ tree inner_type = TREE_TYPE (TREE_TYPE (t));
+ t = unshare_expr (t);
+ TREE_TYPE (t) = inner_type;
+ TREE_OPERAND (t, 1) = TYPE_SIZE (inner_type);
+ if (imagpart_p)
+ TREE_OPERAND (t, 2) = size_binop (PLUS_EXPR, TREE_OPERAND (t, 2),
+ TYPE_SIZE (inner_type));
+ if (gimple_p)
+ t = force_gimple_operand_gsi (gsi, t, true, NULL, true,
+ GSI_SAME_STMT);
+ return t;
+ }
+
case VAR_DECL:
case RESULT_DECL:
case PARM_DECL: