Fix tests that fail when compiled without optimisation

* 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
This commit is contained in:
Jonathan Wakely 2018-10-16 13:06:05 +01:00 committed by Jonathan Wakely
parent d30096b45f
commit b57d432bdd
4 changed files with 11 additions and 1 deletions

View 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

View 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

View 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; }

View 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; }