[Bug c++/70178] Loop-invariant memory loads from std::string innards are not hoisted

zackw at panix dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 11 12:10:00 GMT 2016


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

--- Comment #2 from Zack Weinberg <zackw at panix dot com> ---
That was my working hypothesis as well.  Isn't there some way we can annotate
s->data to reassure the compiler that *this* char* doesn't alias?  I don't know
enough about the guts of std::string to know whether 'restrict' is accurate,
but it certainly shouldn't be pointing to anything but string contents.


More information about the Gcc-bugs mailing list