summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/bitset
diff options
context:
space:
mode:
authorLuc Hermitte <hermitte@free.fr>2010-09-18 03:29:31 +0200
committerPaolo Carlini <paolo@gcc.gnu.org>2010-09-18 01:29:31 +0000
commitfc99f7809e92e922356761380539cf4c388f48b8 (patch)
treec0307de0de4cf2d8e1498c3c23ee0401553757f7 /libstdc++-v3/testsuite/23_containers/bitset
parent7b458ccc8d474217045c53f9ffc0becd948edc49 (diff)
downloadgcc-fc99f7809e92e922356761380539cf4c388f48b8.tar.gz
re PR libstdc++/45713 (sizeof std::bitset<ULONG_MAX> == 1)
2010-09-17 Luc Hermitte <hermitte@free.fr> Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/45713 * include/std/bitset: Fix _GLIBCXX_BITSET_WORDS macro. * testsuite/23_containers/bitset/45713.cc: New. Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com> From-SVN: r164388
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/bitset')
-rw-r--r--libstdc++-v3/testsuite/23_containers/bitset/45713.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/45713.cc b/libstdc++-v3/testsuite/23_containers/bitset/45713.cc
new file mode 100644
index 00000000000..8d369d63e18
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/bitset/45713.cc
@@ -0,0 +1,25 @@
+// Copyright (C) 2010 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 compile }
+
+#include <bitset>
+
+// libstdc++/45713
+#if __SIZEOF_SIZE_T__ >= 4
+int test[sizeof(std::bitset<0xffffffff>) != 1 ? 1 : -1];
+#endif