Fix tests that fail when compiled without optimisation
authorJonathan Wakely <jwakely@redhat.com>
Tue, 16 Oct 2018 12:06:05 +0000 (13:06 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 16 Oct 2018 12:06:05 +0000 (13:06 +0100)
* testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned
diagnostic to account for quotes around 'constexpr'.
* testsuite/23_containers/deque/capacity/max_size.cc: Define static
variable.
* testsuite/23_containers/vector/capacity/max_size.cc: Likewise.

From-SVN: r265190

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc
libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc
libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc

index 1b4179ee6d5c69a294185802506b7a0910e0f0ac..2f64fea7cf8b7fb6d03e1d1879245a6d648ac7f9 100644 (file)
@@ -1,5 +1,11 @@
 2018-10-16  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned
+       diagnostic to account for quotes around 'constexpr'.
+       * testsuite/23_containers/deque/capacity/max_size.cc: Define static
+       variable.
+       * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
+
        PR libstdc++/87618
        * config/abi/pre/gnu.ver: Fix typos in patterns for basic_stringbuf.
        * testsuite/27_io/basic_stringbuf/cons/char/default.cc: Disable
index f28f2f6a4e86a947c3cbb65254762b9d8f422165..7b76ecb1460cc34859028e39adf089cbdde9a119 100644 (file)
@@ -28,4 +28,4 @@ test01()
   auto h = 9223372036854775808h;
   // { dg-error "cannot be represented" "" { target *-*-* } 908 }
 }
-// { dg-prune-output "in constexpr expansion" } // needed for -O0
+// { dg-prune-output "in .constexpr. expansion" } // needed for -O0
index 1a38c4ed698e53e0c7f5b9b64d44f294aead08cb..99160700cffa8cefd5494dabc1a22413c22d690c 100644 (file)
@@ -121,6 +121,8 @@ private:
   static const char value = 'x';
 };
 
+const char Iter::value;
+
 Iter operator+(Iter i, Iter::difference_type n) { return i += n; }
 Iter operator+(Iter::difference_type n, Iter i) { return i += n; }
 Iter operator-(Iter::difference_type n, Iter i) { return i -= n; }
index 34d3c4ab96e41020161c5f41e8048b66a345494b..bde4c10ac92643a60df77acc5708ab271ac2cf4e 100644 (file)
@@ -121,6 +121,8 @@ private:
   static const char value = 'x';
 };
 
+const char Iter::value;
+
 Iter operator+(Iter i, Iter::difference_type n) { return i += n; }
 Iter operator+(Iter::difference_type n, Iter i) { return i += n; }
 Iter operator-(Iter::difference_type n, Iter i) { return i -= n; }