This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A question about SRA and out-of-bounds array accesses


>> ----------------------------------------
>> 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?

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]