diff options
author | Caroline Tice <cmtice@chromium.org> | 2013-06-21 12:05:49 -0700 |
---|---|---|
committer | Caroline Tice <cmtice@chromium.org> | 2013-06-21 12:05:49 -0700 |
commit | 9c1705845241cdea5cf61574218edef282901fbd (patch) | |
tree | 021da661f8a821bc7eea277521fa13f2043879a0 /gcc/tree.c | |
parent | 9bdedf4df4166718fa0a44811c643214c6880471 (diff) | |
parent | 8a46ed36b0449c870d0a938c1010ad610ebcf4f7 (diff) | |
download | gcc-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.c | 15 |
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. */ |