aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@mips.com>2012-12-13 19:55:13 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2012-12-13 19:55:13 +0000
commit01f4c821945d7f96f5f24cde63fce64ca0ef88a9 (patch)
treec17445c430b2d6bf47bb5aec3f772535878ba48d
parente1df04775d6d0c3f905b9e77e371be04a035e50e (diff)
downloadgcc-01f4c821945d7f96f5f24cde63fce64ca0ef88a9.zip
gcc-01f4c821945d7f96f5f24cde63fce64ca0ef88a9.tar.gz
gcc-01f4c821945d7f96f5f24cde63fce64ca0ef88a9.tar.bz2
18654.cc: Shrink memory usage under simulator.
2012-12-13 Steve Ellcey <sellcey@mips.com> * testsuite/21_strings/basic_string/capacity/char/18654.cc: Shrink memory usage under simulator. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Ditto. * testsuite/22_locale/collate/transform/char/28277.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/28277.cc: Ditto. From-SVN: r194488
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc8
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/char/28277.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/28277.cc8
5 files changed, 36 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index bde1123..84034d3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2012-12-13 Steve Ellcey <sellcey@mips.com>
+
+ * testsuite/21_strings/basic_string/capacity/char/18654.cc: Shrink
+ memory usage under simulator.
+ * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Ditto.
+ * testsuite/22_locale/collate/transform/char/28277.cc: Ditto.
+ * testsuite/22_locale/collate/transform/wchar_t/28277.cc: Ditto.
+
2012-12-12 Benjamin Kosnik <bkoz@redhat.com>
* doc/xml/manual/documentation_hacking.xml: Fix validation issue.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc
index e9fa200..78af79ad 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc
@@ -19,6 +19,12 @@
// 21.3.3 string capacity
+// { dg-options "-DMAX_SIZE=16" { target simulator } }
+
+#ifndef MAX_SIZE
+#define MAX_SIZE 20
+#endif
+
#include <string>
#include <testsuite_hooks.h>
@@ -34,7 +40,7 @@ void test01()
// and shrink-to-fit (in the future, maybe this will change
// for short strings).
const size_type minsize = 2 << 0;
- const size_type maxsize = 2 << 20;
+ const size_type maxsize = 2 << MAX_SIZE;
for (size_type i = minsize; i <= maxsize; i *= 2)
{
string str(i, 'x');
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc
index fd51175..df75f09 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc
@@ -19,6 +19,12 @@
// 21.3.3 string capacity
+// { dg-options "-DMAX_SIZE=16" { target simulator } }
+
+#ifndef MAX_SIZE
+#define MAX_SIZE 20
+#endif
+
#include <string>
#include <testsuite_hooks.h>
@@ -34,7 +40,7 @@ void test01()
// and shrink-to-fit (in the future, maybe this will change
// for short strings).
const size_type minsize = 2 << 0;
- const size_type maxsize = 2 << 20;
+ const size_type maxsize = 2 << MAX_SIZE;
for (size_type i = minsize; i <= maxsize; i *= 2)
{
wstring str(i, L'x');
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/28277.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/28277.cc
index bf8c494..7b94c7d 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/28277.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/28277.cc
@@ -19,6 +19,12 @@
// 22.2.4.1.1 collate members
+// { dg-options "-DMAX_SIZE=1000000" { target simulator } }
+
+#ifndef MAX_SIZE
+#define MAX_SIZE 10000000
+#endif
+
#include <locale>
#include <testsuite_hooks.h>
@@ -36,7 +42,7 @@ void test01()
// cache the collate facets
const collate<char>& coll_c = use_facet<collate<char> >(loc_c);
- const string_type sstr(10000000, 'a');
+ const string_type sstr(MAX_SIZE, 'a');
const string_type dstr = coll_c.transform(sstr.data(),
sstr.data() + sstr.size());
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/28277.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/28277.cc
index 4f21169..56ad605 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/28277.cc
@@ -19,6 +19,12 @@
// 22.2.4.1.1 collate members
+// { dg-options "-DMAX_SIZE=100000" { target simulator } }
+
+#ifndef MAX_SIZE
+#define MAX_SIZE 10000000
+#endif
+
#include <locale>
#include <testsuite_hooks.h>
@@ -36,7 +42,7 @@ void test01()
// cache the collate facets
const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c);
- const string_type sstr(10000000, L'a');
+ const string_type sstr(MAX_SIZE, L'a');
const string_type dstr = coll_c.transform(sstr.data(),
sstr.data() + sstr.size());