summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@chromium.org>2013-06-21 12:05:49 -0700
committerCaroline Tice <cmtice@chromium.org>2013-06-21 12:05:49 -0700
commit9c1705845241cdea5cf61574218edef282901fbd (patch)
tree021da661f8a821bc7eea277521fa13f2043879a0 /gcc/tree.c
parent9bdedf4df4166718fa0a44811c643214c6880471 (diff)
parent8a46ed36b0449c870d0a938c1010ad610ebcf4f7 (diff)
downloadgcc-9c1705845241cdea5cf61574218edef282901fbd.tar.gz
Merge branch 'master' into vtv
Conflicts: gcc/ChangeLog gcc/cp/ChangeLog gcc/cp/decl2.c gcc/varasm.c libstdc++-v3/ChangeLog
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 6c71025b6b4..2c93c0e7c21 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1643,6 +1643,21 @@ build_one_cst (tree type)
}
}
+/* Return an integer of type TYPE containing all 1's in as much precision as
+ it contains, or a complex or vector whose subparts are such integers. */
+
+tree
+build_all_ones_cst (tree type)
+{
+ if (TREE_CODE (type) == COMPLEX_TYPE)
+ {
+ tree scalar = build_all_ones_cst (TREE_TYPE (type));
+ return build_complex (type, scalar, scalar);
+ }
+ else
+ return build_minus_one_cst (type);
+}
+
/* Return a constant of arithmetic type TYPE which is the
opposite of the multiplicative identity of the set TYPE. */