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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190123
138bc75d-0d04-0410-961f-
82ee72b054a4
+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>
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);
/* 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;
/* 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)
+2012-08-03 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/ext/vector17.C: New testcase.
+
2012-08-02 Richard Sandiford <rdsandiford@googlemail.com>
PR target/51931
--- /dev/null
+/* { dg-do compile } */
+typedef double __attribute__((vector_size(1024) )) vec;
+
+template <class T>
+void f (T *p)
+{
+ p->~T();
+}
+void g (vec *p)
+{
+ f(p);
+}