public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106199] New: vector::insert optimization is broken with gcc-12
@ 2022-07-05 10:02 hewillk at gmail dot com
  2022-07-05 10:07 ` [Bug c++/106199] " hewillk at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hewillk at gmail dot com @ 2022-07-05 10:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199

            Bug ID: 106199
           Summary: vector::insert optimization is broken with gcc-12
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

Example from
https://stackoverflow.com/questions/72867072/why-g12-vector-insert-optimization-breaks-code

#include <vector>
#include <array>

std::vector<int> s_to_bytes() {
  std::vector<int> res;
  std::array<int, 4> s{};
  res.insert(res.begin(), s.begin(), s.end());
  return res;
}

https://godbolt.org/z/4YrzTso9o

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-20 13:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 10:02 [Bug c++/106199] New: vector::insert optimization is broken with gcc-12 hewillk at gmail dot com
2022-07-05 10:07 ` [Bug c++/106199] " hewillk at gmail dot com
2022-07-05 10:18 ` hewillk at gmail dot com
2022-07-05 16:30 ` [Bug middle-end/106199] " redi at gcc dot gnu.org
2022-07-05 23:17 ` [Bug tree-optimization/106199] incorrect memcpy writing 1 or more bytes into a region of size 0 overflows the destination with std::vector::insert pinskia at gcc dot gnu.org
2022-07-05 23:17 ` [Bug tree-optimization/106199] [12 Regression] incorrect warning: " pinskia at gcc dot gnu.org
2022-07-25 15:15 ` [Bug tree-optimization/106199] [12/13 " rguenth at gcc dot gnu.org
2022-11-29 15:58 ` redi at gcc dot gnu.org
2022-11-29 17:14 ` cvs-commit at gcc dot gnu.org
2023-04-20 13:57 ` cvs-commit at gcc dot gnu.org

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