Vector indexing patch
Richard Guenther
richard.guenther@gmail.com
Sat Jun 5 11:02:00 GMT 2010
On Fri, Jun 4, 2010 at 11:39 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Tue, Jun 1, 2010 at 12:21 PM, Artem Shinkarov
> <artyom.shinkaroff@gmail.com> wrote:
>
> + error_at (loc, "index value is out of bound");
>
> That is wrong. The Cell C/C++ language document says out of bounds
> accesses are undefined (that is at runtime).
I think we should implement whatever OpenCL specs and disregard
whatever the (dead) Cell C/C++ language docs say. The project is
to improve GCCs generic vector facility, not to implement the Cell
language spec.
But of course the above could be a pedwarn (though you'll get
stmt verification errors if you build a BIT_FIELD_REF with out-of-bounds
indices - so we'd need to emit sth like a zero index for out-of-bound accesses).
Richard.
> Thanks,
> Andrew Pinski
>
More information about the Gcc
mailing list