From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A05433858C5F; Tue, 21 Mar 2023 00:35:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A05433858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679358903; bh=e4clFJT14MTloj/4xPgcH6FxVacC6a6qlj4r5hibThM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xqSkXXtAb+57AM6BfCFNQdC7HkT2cuV3N9oNCYAN3T9dDY6SvkPKLxG/jEe/vc9Lh R/ZiJ3IYBjHh+69kl5ayraS9JPip0LdZ1DtnXsrur/5PkglDGgbk/FYXt6feP+PDsG 3p4jvTajcfWzPW9wqgeIwLSbfP3oUfVlkx49ecwg= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109205] vector.resize( v.size() + 100 ) does unnecessary comparison Date: Tue, 21 Mar 2023 00:35:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109205 --- Comment #3 from Jonathan Wakely --- Huh, but that causes a test to FAIL with -D_GLIBCXX_DEBUG FAIL: 23_containers/vector/59829.cc (test for excess errors) /home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/s= tl_vector.h:989: error: no match for 'operator<' in '((const std::__cxx1998::vector >*)this)->std::__cxx1998::vector >::.std::__cxx1998::_Vector_base >::_M_impl.std::__cxx1998::_Vector_base >::_Vector_impl::.std::__cxx1998::_Vector_base >::_Vector_impl_data::_M_finish < ((const std::__cxx1998::vector >*)this)->std::__cxx1998::vector >::.std::__cxx1998::_Vector_base >::_M_impl.std::__cxx1998::_Vector_base >::_Vector_impl::.std::__cxx1998::_Vector_base >::_Vector_impl_data::_M_start' (operand types are 'const std::__cxx1998::_Vector_base >::pointer' {aka 'const std::allocator_traits >::pointer'} and 'const std::__cxx1998::_Vector_base >::pointer' {aka 'const std::allocator_traits >::pointer'})=