summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-10-29 10:11:12 -0400
committerPatrick Palka <ppalka@redhat.com>2020-10-29 10:11:12 -0400
commit2e0216f9c4db8fde09706f57e6a6d80161c0da07 (patch)
treeb69908dd67b6d2211c3daafffaee1aaf20a93ddf /libstdc++-v3/testsuite
parent6e23549157d671f4f2e61756a0d0924cc59718ab (diff)
downloadgcc-2e0216f9c4db8fde09706f57e6a6d80161c0da07.tar.gz
libstdc++: Fix memory issue in ranges::lexicographical_compare testcase
libstdc++-v3/ChangeLog: * testsuite/25_algorithms/lexicographical_compare/constrained.cc: (test03): Fix initializing the vector vy with the array y of size 4.
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
index b82c872bbbb..2019bbc75e4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
@@ -136,7 +136,7 @@ test03()
VERIFY( !ranges::lexicographical_compare(cy.begin(), cy.end(),
cz.begin(), cz.end()) );
- std::vector<int> vx(x, x+5), vy(y, y+5);
+ std::vector<int> vx(x, x+5), vy(y, y+4);
VERIFY( ranges::lexicographical_compare(vx, vy) );
VERIFY( !ranges::lexicographical_compare(vx, vy, ranges::greater{}) );
VERIFY( !ranges::lexicographical_compare(vy, vx) );