[Bug tree-optimization/105329] [12/13 Regression] Bogus restrict warning when assigning 1-char string literal to std::string since r12-3347-g8af8abfbbace49e6
dan at stahlke dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 30 16:55:02 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
Dan Stahlke <dan at stahlke dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dan at stahlke dot org
--- Comment #24 from Dan Stahlke <dan at stahlke dot org> ---
Here is another test case, broken on 12.2 with "-std=c++20 -Wrestrict -O3" but
working on trunk and working on 12.2 with -O2 rather than -O3.
#include <string>
#include <tuple> // std::ignore
int main()
{
std::string s = "b";
std::ignore = "a" + std::move(s);
}
More information about the Gcc-bugs
mailing list