summaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-05-02 14:43:35 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-05-02 14:43:35 +0000
commit34efdaf078b01a7387007c4e6bde6db86384c4b7 (patch)
treed503eaf41d085669d1481bb46ec038bc866fece6 /gcc/tree-complex.c
parentf733cf303bcdc952c92b81dd62199a40a1f555ec (diff)
downloadgcc-tarball-master.tar.gz
gcc-7.1.0gcc-7.1.0
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index d781a8aa01..e0dd3d9922 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -1,5 +1,5 @@
/* Lower complex number operations to scalar operations.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
This file is part of GCC.
@@ -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:
@@ -1321,6 +1336,7 @@ expand_complex_division (gimple_stmt_iterator *gsi, tree inner_type,
rr = gimplify_build2 (gsi, code, inner_type, ai, bi);
ri = gimplify_build2 (gsi, code, inner_type, ar, bi);
ri = gimplify_build1 (gsi, NEGATE_EXPR, inner_type, ri);
+ break;
case PAIR (ONLY_REAL, VARYING):
case PAIR (ONLY_IMAG, VARYING):