public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-4528] libstdc++: Fix memory issue in ranges::lexicographical_compare testcase
@ 2020-10-29 14:14 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2020-10-29 14:14 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:2e0216f9c4db8fde09706f57e6a6d80161c0da07

commit r11-4528-g2e0216f9c4db8fde09706f57e6a6d80161c0da07
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Oct 29 10:11:12 2020 -0400

    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.

Diff:
---
 .../testsuite/25_algorithms/lexicographical_compare/constrained.cc      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) );


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-29 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 14:14 [gcc r11-4528] libstdc++: Fix memory issue in ranges::lexicographical_compare testcase Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).