summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-11-07 00:42:19 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-11-07 00:42:19 +0000
commit0611ce440a4e5a460b185cb2b64684bd51f94d51 (patch)
tree741a30909f4921e02c019708ac9d7d15e93ecafe /libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
parentbff0e5295af23c7947f7b4804a72e86aeca0ce56 (diff)
downloadgcc-0611ce440a4e5a460b185cb2b64684bd51f94d51.tar.gz
re PR libstdc++/51850 (debug mode for std::array and tr1::array)
2012-11-06 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/51850 * include/debug/array: New, debug-mode implementation. * include/profile/array: New. * include/std/array: Adjust. * include/std/tuple: Just include <array>. * include/Makefile.am: Add. * include/Makefile.in: Regenerate. * testsuite/23_containers/array/debug/front1_neg.cc: New. * testsuite/23_containers/array/debug/ square_brackets_operator1_neg.cc: Likewise. * testsuite/23_containers/array/debug/front2_neg.cc: Likewise. * testsuite/23_containers/array/debug/ square_brackets_operator2_neg.cc: Likewise. * testsuite/23_containers/array/debug/back1_neg.cc: Likewise. * testsuite/23_containers/array/debug/back2_neg.cc: Likewise. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Tweak to run only in normal-mode. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Likewise. * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: New. * testsuite/23_containers/array/tuple_interface/ tuple_element_debug_neg.cc: Likewise. From-SVN: r193278
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc')
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
new file mode 100644
index 00000000000..03a11c8bc3d
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
@@ -0,0 +1,34 @@
+// Copyright (C) 2012 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-do run { xfail *-*-* } }
+// { dg-options "-std=gnu++11" }
+// { dg-require-debug-mode "" }
+
+#include <array>
+
+void test01()
+{
+ std::array<int, 0> a;
+ a.front();
+}
+
+int main()
+{
+ test01();
+ return 0;
+}