]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/25_algorithms/random_shuffle/moveable.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 25_algorithms / random_shuffle / moveable.cc
index 7cc1ef6289e2962ef8907db4ecd26fb6b4e5ed42..b2747bdb191a1c1bf505c162694211cdef8dba30 100644 (file)
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
 
-// Copyright (C) 2009-2013 Free Software Foundation, Inc.
+// Copyright (C) 2009-2021 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
@@ -34,8 +34,8 @@ using __gnu_test::rvalstruct;
 
 typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
 
-const int N = 200000;
-int A[N];
+const unsigned int N = 10000;
+int A[N]; // This is made global because we don't want it on the stack
 
 void fill_ascending()
 {
@@ -46,8 +46,6 @@ void fill_ascending()
 void
 test01()
 {
-  bool test __attribute__((unused)) = true;
-
   fill_ascending();
   rvalstruct rv[N];
   std::copy(A, A + N, rv);
@@ -68,9 +66,6 @@ int random_generator(int)
 void
 test02()
 {
-  bool test __attribute__((unused)) = true;
-
-  fill_ascending();
   rvalstruct rv[10] = {1,2,3,4,5,6,7,8,9,10};
   int result[10] = {10,1,2,3,4,5,6,7,8,9};
   Container con(rv, rv + 10);