From b57d432bdd7d16e552c24ef80777eb27ecb1f973 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 16 Oct 2018 13:06:05 +0100 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 6 ++++++ .../testsuite/20_util/duration/literals/range_neg.cc | 2 +- .../testsuite/23_containers/deque/capacity/max_size.cc | 2 ++ .../testsuite/23_containers/vector/capacity/max_size.cc | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1b4179ee6d5..2f64fea7cf8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2018-10-16 Jonathan Wakely + * 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 diff --git a/libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc b/libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc index f28f2f6a4e8..7b76ecb1460 100644 --- a/libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc +++ b/libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc @@ -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 diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc index 1a38c4ed698..99160700cff 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc @@ -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; } diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc index 34d3c4ab96e..bde4c10ac92 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc @@ -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; } -- 2.30.2