A question about SRA and out-of-bounds array accesses
Richard Guenther
richard.guenther@gmail.com
Tue Jan 20 13:27:00 GMT 2009
On Tue, Jan 20, 2009 at 2:17 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
>
>>> ----------------------------------------
>>> int *
>>> x(void)
>>> {
>>> register int *a asm("unknown_register"); /* { dg-error "invalid register" } */
>>> int *v[1] = {a};
>>> return v[1];
>>> }
>>> ----------------------------------------
>>
>> I think simply scalarizing for the above testcase is ok - the behavior
>> is undefined anyway.
>
> What about moving the error to the frontend?
Well, it requires backend knowledge - but sure. As always, patches
are welcome ;)
Richard.
More information about the Gcc
mailing list