aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2009-01-29 00:25:17 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2009-01-29 00:25:17 +0000
commit5292c0337dd818598651217a49484aa010428a2b (patch)
treecd5f316e71130f64f0f1fb6e661f67e68c32714f /libstdc++-v3
parente8eef5963f88a6a9f156c6703d9c4d06b38de38a (diff)
downloadgcc-5292c0337dd818598651217a49484aa010428a2b.zip
gcc-5292c0337dd818598651217a49484aa010428a2b.tar.gz
gcc-5292c0337dd818598651217a49484aa010428a2b.tar.bz2
testsuite_common_types.h (has_trivial_cons_dtor): New.
2009-01-28 Benjamin Kosnik <bkoz@redhat.com> * testsuite/util/testsuite_common_types.h (has_trivial_cons_dtor): New. (standard_layout): Just use !has_virtual_destructor for now. * testsuite/30_threads/mutex/requirements/standard_layout.cc: New. * testsuite/30_threads/timed_mutex/requirements/standard_layout.cc: New. * testsuite/30_threads/recursive_mutex/requirements/ standard_layout.cc: New. * testsuite/30_threads/condition_variable/requirements/ standard_layout.cc: New. * testsuite/29_atomics/atomic_address/requirements/ standard_layout.cc: Adjust. * testsuite/29_atomics/atomic_flag/requirements/ standard_layout.cc: Same. * testsuite/29_atomics/atomic_address/requirements/trivial.cc: New. * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Same. * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Same. * testsuite/30_threads/condition_variable/requirements/typedefs.cc: New. * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust line numbers. * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/requirements/standard_layout.cc: Remove, not required. From-SVN: r143749
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog26
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/standard_layout.cc (renamed from libstdc++-v3/testsuite/29_atomics/atomic/requirements/standard_layout.cc)15
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/trivial.cc38
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc21
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc38
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc39
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable/requirements/standard_layout.cc40
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable/requirements/typedefs.cc41
-rw-r--r--libstdc++-v3/testsuite/30_threads/mutex/requirements/standard_layout.cc40
-rw-r--r--libstdc++-v3/testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc40
-rw-r--r--libstdc++-v3/testsuite/30_threads/timed_mutex/requirements/standard_layout.cc40
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_common_types.h32
16 files changed, 391 insertions, 31 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8ebbe31..6a58259 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,29 @@
+2009-01-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/testsuite_common_types.h (has_trivial_cons_dtor): New.
+ (standard_layout): Just use !has_virtual_destructor for now.
+ * testsuite/30_threads/mutex/requirements/standard_layout.cc: New.
+ * testsuite/30_threads/timed_mutex/requirements/standard_layout.cc: New.
+ * testsuite/30_threads/recursive_mutex/requirements/
+ standard_layout.cc: New.
+ * testsuite/30_threads/condition_variable/requirements/
+ standard_layout.cc: New.
+ * testsuite/29_atomics/atomic_address/requirements/
+ standard_layout.cc: Adjust.
+ * testsuite/29_atomics/atomic_flag/requirements/
+ standard_layout.cc: Same.
+ * testsuite/29_atomics/atomic_address/requirements/trivial.cc: New.
+ * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Same.
+ * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Same.
+ * testsuite/30_threads/condition_variable/requirements/typedefs.cc: New.
+ * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust
+ line numbers.
+ * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
+ * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
+ * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
+ * testsuite/29_atomics/atomic/requirements/standard_layout.cc:
+ Remove, not required.
+
2009-01-22 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/std/thread (__thread_data_base, thread): Rename member
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
index 021d1fe..820d5aa 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
@@ -38,7 +38,7 @@ int main()
return 0;
}
-// { dg-error "used here" "" { target *-*-* } 510 }
+// { dg-error "used here" "" { target *-*-* } 530 }
// { dg-error "deleted function" "" { target *-*-* } 239 }
// { dg-error "deleted function" "" { target *-*-* } 257 }
// { dg-error "deleted function" "" { target *-*-* } 275 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
index 9402228..b723066 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
@@ -38,7 +38,7 @@ int main()
return 0;
}
-// { dg-error "used here" "" { target *-*-* } 549 }
+// { dg-error "used here" "" { target *-*-* } 569 }
// { dg-error "deleted function" "" { target *-*-* } 238 }
// { dg-error "deleted function" "" { target *-*-* } 256 }
// { dg-error "deleted function" "" { target *-*-* } 274 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/requirements/standard_layout.cc b/libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/standard_layout.cc
index e51e8e4..3d5187d 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/requirements/standard_layout.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/standard_layout.cc
@@ -1,8 +1,7 @@
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
-// 2008-10-22 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -20,12 +19,20 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
#include <cstdatomic>
#include <testsuite_common_types.h>
void test01()
{
- // Check for standard layout requirements
__gnu_test::standard_layout test;
- __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl());
+ test.operator()<std::atomic_address>();
}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/trivial.cc b/libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/trivial.cc
new file mode 100644
index 0000000..de722ad
--- /dev/null
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/trivial.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <cstdatomic>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::has_trivial_cons_dtor test;
+ test.operator()<std::atomic_address>();
+}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc
index c748901..3542f0e 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc
@@ -1,6 +1,7 @@
// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -28,20 +29,10 @@
// the GNU General Public License.
#include <cstdatomic>
-#include <type_traits>
-#include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
-int main()
+void test01()
{
- bool test __attribute__((unused)) = true;
-
- typedef std::atomic_flag test_type;
-
- // libstdc++/37907
- // VERIFY( std::is_standard_layout<test_type>::value );
-
- VERIFY( std::has_trivial_default_constructor<test_type>::value );
- VERIFY( std::has_trivial_destructor<test_type>::value );
-
- return 0;
+ __gnu_test::standard_layout test;
+ test.operator()<std::atomic_flag>();
}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc
new file mode 100644
index 0000000..ae8e9a4
--- /dev/null
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <cstdatomic>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::has_trivial_cons_dtor test;
+ test.operator()<std::atomic_flag>();
+}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
index 724714ed..85c737e 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
@@ -39,11 +39,11 @@ int main()
return 0;
}
-// { dg-error "used here" "" { target *-*-* } 510 }
+// { dg-error "used here" "" { target *-*-* } 530 }
// { dg-excess-errors "deleted function" }
// { dg-excess-errors "deleted function" }
// { dg-error "instantiated from" "" { target *-*-* } 38 }
-// { dg-error "instantiated from" "" { target *-*-* } 517 }
+// { dg-error "instantiated from" "" { target *-*-* } 537 }
// { dg-error "instantiated from" "" { target *-*-* } 173 }
// { dg-error "instantiated from" "" { target *-*-* } 404 }
// { dg-error "instantiated from" "" { target *-*-* } 175 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
index f03cece..69e45d9 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
@@ -39,11 +39,11 @@ int main()
return 0;
}
-// { dg-error "used here" "" { target *-*-* } 549 }
+// { dg-error "used here" "" { target *-*-* } 569 }
// { dg-excess-errors "deleted function" }
// { dg-excess-errors "deleted function" }
// { dg-error "instantiated from" "" { target *-*-* } 38 }
-// { dg-error "instantiated from" "" { target *-*-* } 555 }
+// { dg-error "instantiated from" "" { target *-*-* } 575 }
// { dg-error "instantiated from" "" { target *-*-* } 173 }
// { dg-error "instantiated from" "" { target *-*-* } 404 }
// { dg-error "instantiated from" "" { target *-*-* } 175 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc
new file mode 100644
index 0000000..8866ba8
--- /dev/null
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc
@@ -0,0 +1,39 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <cstdatomic>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::has_trivial_cons_dtor test;
+ __gnu_cxx::typelist::apply_generator(test,
+ __gnu_test::atomic_integrals::type());
+}
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/requirements/standard_layout.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/requirements/standard_layout.cc
new file mode 100644
index 0000000..f50e5c8
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/requirements/standard_layout.cc
@@ -0,0 +1,40 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <condition_variable>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::standard_layout test;
+ test.operator()<std::condition_variable>();
+}
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/requirements/typedefs.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/requirements/typedefs.cc
new file mode 100644
index 0000000..aec35e2
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/requirements/typedefs.cc
@@ -0,0 +1,41 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// 2009-01-28 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <condition_variable>
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::condition_variable test_type;
+ typedef test_type::native_handle_type type;
+}
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/requirements/standard_layout.cc b/libstdc++-v3/testsuite/30_threads/mutex/requirements/standard_layout.cc
new file mode 100644
index 0000000..cbe76ad
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/mutex/requirements/standard_layout.cc
@@ -0,0 +1,40 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <mutex>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::standard_layout test;
+ test.operator()<std::mutex>();
+}
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc
new file mode 100644
index 0000000..e736312
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc
@@ -0,0 +1,40 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <mutex>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::standard_layout test;
+ test.operator()<std::recursive_mutex>();
+}
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/requirements/standard_layout.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/requirements/standard_layout.cc
new file mode 100644
index 0000000..57231b3
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/requirements/standard_layout.cc
@@ -0,0 +1,40 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <mutex>
+#include <testsuite_common_types.h>
+
+void test01()
+{
+ __gnu_test::standard_layout test;
+ test.operator()<std::timed_mutex>();
+}
diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h
index 6dc0dfa..1ead6bf 100644
--- a/libstdc++-v3/testsuite/util/testsuite_common_types.h
+++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h
@@ -1,7 +1,7 @@
// -*- C++ -*-
// typelist for the C++ library testsuite.
//
-// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -446,6 +446,29 @@ namespace __gnu_test
// Generator to test standard layout
#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ struct has_trivial_cons_dtor
+ {
+ template<typename _Tp>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ {
+ typedef std::has_trivial_default_constructor<_Tp> ctor_p;
+ static_assert(ctor_p::value, "default constructor not trivial");
+
+ typedef std::has_trivial_destructor<_Tp> dtor_p;
+ static_assert(dtor_p::value, "destructor not trivial");
+ }
+ };
+
+ void (_Concept::*__x)() __attribute__((unused))
+ = &_Concept::__constraint;
+ }
+ };
+
struct standard_layout
{
template<typename _Tp>
@@ -459,12 +482,9 @@ namespace __gnu_test
// libstdc++/37907
// typedef std::is_standard_layout<_Tp> standard_layout_p;
// static_assert(standard_layout_p::value, "not standard_layout");
-
- typedef std::has_trivial_default_constructor<_Tp> ctor_p;
- static_assert(ctor_p::value, "default ctor not trivial");
- typedef std::has_trivial_destructor<_Tp> dtor_p;
- static_assert(dtor_p::value, "dtor not trivial");
+ typedef std::has_virtual_destructor<_Tp> ctor_p;
+ static_assert(!ctor_p::value, "has virtual destructor");
}
};