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

--- Comment #2 from erwan.adam at cea dot fr ---
(In reply to Andrew Pinski from comment #1)
> Taking the address of array [-1] is undefined according to the c standard.

Hi Andrew,

Thanks for you answer.

Strictly speaking, I don't access directly array[-1].
It will be the case if I have written _container(&data[-offset]).
In my case, I write _container(data-offset) and after I always
take indexes >= offset to access _container values.
Doing that, neither valgrind or sanitize complains.

Moreover, this piece of code works perfectly if CIS_data is
allocated in the heap via a double* CIS_data = new double[1];
and once again, neither valgrind or sanitize complains.

I possible, could you point me a link where I can find more
informations about this particular point ?

E.A.

Reply via email to