[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2023-06-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

--- Comment #29 from Jonathan Wakely  ---
I've pushed the workaround from comment 17 to the gcc-12 branch.

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2023-06-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

--- Comment #28 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
:

https://gcc.gnu.org/g:636795a6dfc17ead7b22b9f76b0fc47bdb9d357d

commit r12-9716-g636795a6dfc17ead7b22b9f76b0fc47bdb9d357d
Author: Jason Merrill 
Date:   Thu Aug 18 23:53:16 2022 -0400

libstdc++: avoid bogus -Wrestrict [PR105651]

PR tree-optimization/105651

libstdc++-v3/ChangeLog:

* include/bits/basic_string.tcc (_M_replace): Add an assert
to avoid -Wrestrict false positive.

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2023-05-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|12.3|12.4

--- Comment #27 from Richard Biener  ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2023-04-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jvb at cyberscience dot com

--- Comment #26 from Jonathan Wakely  ---
*** Bug 105545 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2023-04-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

Andrew Pinski  changed:

   What|Removed |Added

 CC||f.heckenb...@fh-soft.de

--- Comment #25 from Andrew Pinski  ---
*** Bug 109563 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2023-02-13 Thread jg at jguk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

Jonny Grant  changed:

   What|Removed |Added

 CC||jg at jguk dot org

--- Comment #24 from Jonny Grant  ---
Hi, Glad it is fixed in trunk. I saw this fail in 12.2 - test case below.

#include 

typedef struct a_bc
{
std::string a;
std::string b;
} a_t;


void f()
{
a_t c;

c.a = " sdfsdf fsdfsdf fdfsfdsdf ";   // seems to need this long string to
reproduce, down to 8 bytes it didn't
c.b = "E";
}

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2022-12-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

Richard Biener  changed:

   What|Removed |Added

   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org
 Status|ASSIGNED|NEW

[Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3

2022-10-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

Richard Biener  changed:

   What|Removed |Added

Summary|[12/13 Regression] bogus|[12 Regression] bogus "may
   |"may overlap" memcpy|overlap" memcpy warning
   |warning with std::string|with std::string and
   |and operator+ at -O3|operator+ at -O3
  Known to work||13.0
  Known to fail|13.0|

--- Comment #23 from Richard Biener  ---
The testcase from comment#5 is fixed on trunk, the preprocessed source of
course not as the workaround was in the library.  Still, fixed in GCC 13.