aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-27 20:00:56 +0000
committerJakub Jelinek <jakub@redhat.com>2018-03-27 20:00:56 +0000
commit10ae4c0ef1ce32df05ad7dd6eded5c74ed5c721a (patch)
treeea10fd34e5bb3a747c9941d1ae3cc3fc692e200a /gcc/cp/cp-gimplify.c
parentf9e868bc596ccd43feff9a94ee7e4781989e715f (diff)
PR c++/85077
* cp-gimplify.c (cp_fold) <case CONSTRUCTOR>: For ctors with vector type call fold to generate VECTOR_CSTs when possible. * g++.dg/ext/vector35.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@258903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 3edecf24c92..fd0c37f9be2 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -2504,6 +2504,8 @@ cp_fold (tree x)
CONSTRUCTOR_PLACEHOLDER_BOUNDARY (x)
= CONSTRUCTOR_PLACEHOLDER_BOUNDARY (org_x);
}
+ if (VECTOR_TYPE_P (TREE_TYPE (x)))
+ x = fold (x);
break;
}
case TREE_VEC: