aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2012-08-03 14:00:43 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2012-08-03 12:00:43 +0000
commit11f359257e79a5d8cd68458188b8c126f10b6fc9 (patch)
treebad319906ad8fc06833fc42d7aa9faaeb34411ef /gcc/cp
parentb2ec94d4409cfa7f064b3579705eefd3430ec237 (diff)
downloadgcc-11f359257e79a5d8cd68458188b8c126f10b6fc9.zip
gcc-11f359257e79a5d8cd68458188b8c126f10b6fc9.tar.gz
gcc-11f359257e79a5d8cd68458188b8c126f10b6fc9.tar.bz2
pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
gcc/cp/ChangeLog 2012-08-03 Marc Glisse <marc.glisse@inria.fr> * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars. * cp-tree.h (scalarish_type_p): Declare. * tree.c (scalarish_type_p): Make non-static. gcc/testsuite/ChangeLog 2012-08-03 Marc Glisse <marc.glisse@inria.fr> * g++.dg/ext/vector17.C: New testcase. From-SVN: r190123
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/tree.c2
4 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 92c9db1..f57769d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-03 Marc Glisse <marc.glisse@inria.fr>
+
+ * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
+ * cp-tree.h (scalarish_type_p): Declare.
+ * tree.c (scalarish_type_p): Make non-static.
+
2012-08-02 Jason Merrill <jason@redhat.com>
Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e40f114..44f3ac1 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -5697,6 +5697,7 @@ extern bool layout_pod_type_p (const_tree);
extern bool std_layout_type_p (const_tree);
extern bool trivial_type_p (const_tree);
extern bool trivially_copyable_p (const_tree);
+extern bool scalarish_type_p (const_tree);
extern bool type_has_nontrivial_default_init (const_tree);
extern bool type_has_nontrivial_copy_init (const_tree);
extern bool class_tmpl_impl_spec_p (const_tree);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2ae576d..ad81bab 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13851,7 +13851,7 @@ tsubst_copy_and_build (tree t,
/* We can't do much here. */;
else if (!CLASS_TYPE_P (object_type))
{
- if (SCALAR_TYPE_P (object_type))
+ if (scalarish_type_p (object_type))
{
tree s = NULL_TREE;
tree dtor = member;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 26e7fce..bfbde04 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2818,7 +2818,7 @@ is_dummy_object (const_tree ob)
/* Returns 1 iff type T is something we want to treat as a scalar type for
the purpose of deciding whether it is trivial/POD/standard-layout. */
-static bool
+bool
scalarish_type_p (const_tree t)
{
if (t == error_mark_node)