https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637
--- Comment #5 from petschy at gmail dot com ---
Thanks, in this specific case __restrict works indeed.
On a side note, is it possible to achieve the same when a char is stored
through a char* member, and also incremented? eg:
if (m_cur < m_end)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637
--- Comment #4 from Richard Biener ---
Err, wrong function assembly pasted. Note you also can make this * restrict
via
__attribute__((noinline))
void Update(const void* b, unsigned int len) __restrict
{
i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637
--- Comment #3 from Richard Biener ---
__restrict should work fine for char pointers. With
__attribute__((noinline))
void Update(const void* __restrict b, unsigned int len)
{
if (len) {
...
I get with -O
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637
--- Comment #2 from petschy at gmail dot com ---
Thanks. For non-char types, one can use __restrict on ptrs, but for chars it
doesn't work, unfortunately (strict aliasing rules). Is there a way to tell the
compiler that a char ptr doesn't alias an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637
--- Comment #1 from Andrew Pinski ---
This is most likely because unsigned char is considered as aliasing any type.
That means the write to this->m_s1 and this->m_s2 can be read via *buf