This is the mail archive of the gcc-patches@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: [gij] Fix array accesses


On Tue, 2007-01-09 at 15:50 +0000, Andrew Haley wrote:
> This patch changes code generations fo arrays in libgcj; it generates
> 
>   *((elemtype)(&array->data) + index*size_exp)
> 
> instead of 
> 
>   (array->data)[n]
> 
> Now, you might say "That's the same thing."  Well, it is, kinda sorta,
> but the array is defined as something like
> 
> typedef struct jcharArray
> {
>   short length;
>   jchar data[];
> } jcharArray;

Both of these should mean the same thing to IR, and if they don't there
is a bug else also.

I wonder if this failure of the aliasing issue is related to
"gcc.c-torture/execute/pr15262-1.c" failing at -O2 also.

Thanks,
Andrew Pinski


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